Skip to content

Commit

Permalink
decouple language and core projects
Browse files Browse the repository at this point in the history
  • Loading branch information
Scighost committed Jun 22, 2023
1 parent 7d76bc4 commit 65831b9
Show file tree
Hide file tree
Showing 8 changed files with 540 additions and 16 deletions.
24 changes: 12 additions & 12 deletions Starward.Core/EnumExtension.cs
Original file line number Diff line number Diff line change
Expand Up @@ -81,15 +81,15 @@ public static string ToLocalization(this GachaType gachaType)
{
return gachaType switch
{
GachaType.StellarWarp => Lang.GachaType_StellarWarp,
GachaType.DepartureWarp => Lang.GachaType_DepartureWarp,
GachaType.CharacterEventWarp => Lang.GachaType_CharacterEventWarp,
GachaType.LightConeEventWarp => Lang.GachaType_LightConeEventWarp,
GachaType.NoviceWish => Lang.GachaType_NoviceWish,
GachaType.PermanentWish => Lang.GachaType_PermanentWish,
GachaType.CharacterEventWish => Lang.GachaType_CharacterEventWish,
GachaType.CharacterEventWish_2 => Lang.GachaType_CharacterEventWish_2,
GachaType.WeaponEventWish => Lang.GachaType_WeaponEventWish,
GachaType.StellarWarp => CoreLang.GachaType_StellarWarp,
GachaType.DepartureWarp => CoreLang.GachaType_DepartureWarp,
GachaType.CharacterEventWarp => CoreLang.GachaType_CharacterEventWarp,
GachaType.LightConeEventWarp => CoreLang.GachaType_LightConeEventWarp,
GachaType.NoviceWish => CoreLang.GachaType_NoviceWish,
GachaType.PermanentWish => CoreLang.GachaType_PermanentWish,
GachaType.CharacterEventWish => CoreLang.GachaType_CharacterEventWish,
GachaType.CharacterEventWish_2 => CoreLang.GachaType_CharacterEventWish_2,
GachaType.WeaponEventWish => CoreLang.GachaType_WeaponEventWish,
_ => "",
};
}
Expand All @@ -100,9 +100,9 @@ public static string ToLocalization(this PostType postType)
{
return postType switch
{
PostType.POST_TYPE_ACTIVITY => Lang.PostType_Activity,
PostType.POST_TYPE_ANNOUNCE => Lang.PostType_Announcement,
PostType.POST_TYPE_INFO => Lang.PostType_Information,
PostType.POST_TYPE_ACTIVITY => CoreLang.PostType_Activity,
PostType.POST_TYPE_ANNOUNCE => CoreLang.PostType_Announcement,
PostType.POST_TYPE_INFO => CoreLang.PostType_Information,
_ => "",
};
}
Expand Down
2 changes: 1 addition & 1 deletion Starward.Core/Gacha/Genshin/GenshinGachaClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ protected override string GetGachaUrlPrefix(string gachaUrl, string? lang = null
}
return gachaUrl;
}
throw new ArgumentException(Lang.Core_CannotParseTheWishRecordURL);
throw new ArgumentException(CoreLang.Gacha_CannotParseTheWishRecordURL);
}


Expand Down
2 changes: 1 addition & 1 deletion Starward.Core/Gacha/StarRail/StarRailGachaClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ protected override string GetGachaUrlPrefix(string gachaUrl, string? lang = null
}
return gachaUrl;
}
throw new ArgumentException(Lang.Core_CannotParseTheWarpRecordURL);
throw new ArgumentException(CoreLang.Gacha_CannotParseTheWarpRecordURL);
}


Expand Down
2 changes: 1 addition & 1 deletion Starward.Core/GlobalUsing.cs
Original file line number Diff line number Diff line change
@@ -1 +1 @@
global using Starward.Language;
global using Starward.Core.Localization;
189 changes: 189 additions & 0 deletions Starward.Core/Localization/CoreLang.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 65831b9

Please sign in to comment.