Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added a new event enum value, "Festival" #1199

Merged
merged 4 commits into from
Sep 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions Tests/Domain/ReleaseEvents/ReleaseEventTypesTests.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
using VocaDb.Model.Domain.ReleaseEvents;

namespace VocaDb.Tests.Domain.ReleaseEvents;

[TestClass]
public class ArtistEventTypesTests
{
[DataRow("Unspecified", nameof(EventCategory.Unspecified))]
[DataRow("AlbumRelease", nameof(EventCategory.AlbumRelease))]
[DataRow("Anniversary", nameof(EventCategory.Anniversary))]
[DataRow("Club", nameof(EventCategory.Club))]
[DataRow("Concert", nameof(EventCategory.Concert))]
[DataRow("Contest", nameof(EventCategory.Contest))]
[DataRow("Convention", nameof(EventCategory.Convention))]
[DataRow("Other", nameof(EventCategory.Other))]
[DataRow("Festival", nameof(EventCategory.Festival))]
[TestMethod]
public void Name(string expected, string actual)
{
actual.Should().Be(expected);
}
}
58 changes: 32 additions & 26 deletions VocaDbModel/Domain/ReleaseEvents/EventCategory.cs
Original file line number Diff line number Diff line change
@@ -1,28 +1,34 @@
#nullable disable
namespace VocaDb.Model.Domain.ReleaseEvents;

namespace VocaDb.Model.Domain.ReleaseEvents
public enum EventCategory
{
public enum EventCategory
{
Unspecified = 0,
/// <summary>
/// Comiket, VoMas
/// </summary>
AlbumRelease = 1 << 0,
Anniversary = 1 << 1,
/// <summary>
/// Vocaloid Freak
/// </summary>
Club = 1 << 2,
/// <summary>
/// Magical Mirai
/// </summary>
Concert = 1 << 3,
Contest = 1 << 4,
/// <summary>
/// Nico Chokaigi
/// </summary>
Convention = 1 << 5,
Other = 1 << 6,
}
}
Unspecified = 0,

/// <summary>
/// Comiket, VoMas
/// </summary>
AlbumRelease = 1 << 0,
Anniversary = 1 << 1,

/// <summary>
/// Vocaloid Freak
/// </summary>
Club = 1 << 2,

/// <summary>
/// Magical Mirai
/// </summary>
Concert = 1 << 3,
Contest = 1 << 4,

/// <summary>
/// Nico Chokaigi
/// </summary>
Convention = 1 << 5,
Other = 1 << 6,

/// <summary>
/// J-POP Cover Festival
/// </summary>
Festival = 1 << 7,
}
1 change: 1 addition & 0 deletions VocaDbWeb/Scripts/Models/Events/EventCategory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ export enum EventCategory {
Contest = 1 << 4,
Convention = 1 << 5,
Other = 1 << 6,
Festival = 1 << 7,
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@
"Club": "Club",
"Concert": "Concert",
"Contest": "Contest",
"Convention": "Convention",
"Other": "Other",
"Festival": "Festival",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need to update not only json files, but also corresponding resx files on the VocaDB/vocadb-loc repo. These json files are intended to be automatically generated by this script (as part of #900). It would be nice if we could do this automatically at compile time though.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Convention": "Convention",
"Other": "Other",
"Unspecified": "Unspecified"
},
"EventSortRuleNames": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"Club": "クラブ",
"Concert": "コンサート",
"Contest": "コンテスト",
"Festival": "祭",
"Convention": "集会",
"Other": "その他",
"Unspecified": "カテゴリー無し"
Expand Down