mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-05-21 08:42:27 +00:00
Finish translation of landing page
This commit is contained in:
parent
51228b2ca1
commit
1e9f672d6c
7 changed files with 34 additions and 24 deletions
|
@ -53,4 +53,12 @@
|
|||
<value>You have {0} authentication attempts pending. Click here to view them.</value>
|
||||
<comment>A greeting on the main page of the website.</comment>
|
||||
</data>
|
||||
|
||||
<data name="newest_levels" xml:space="preserve">
|
||||
<value>Newest Levels</value>
|
||||
</data>
|
||||
|
||||
<data name="latest_team_picks" xml:space="preserve">
|
||||
<value>Latest Team Picks</value>
|
||||
</data>
|
||||
</root>
|
|
@ -7,7 +7,7 @@ namespace LBPUnion.ProjectLighthouse.Localization;
|
|||
public static class LocalizationManager
|
||||
{
|
||||
private static readonly string namespaceStr = typeof(LocalizationManager).Namespace ?? "";
|
||||
public const string DefaultLang = "en-US";
|
||||
public const string DefaultLang = "ja-JP";
|
||||
|
||||
public static string GetLocalizedString(TranslationAreas translationArea, string language, string key)
|
||||
{
|
||||
|
|
|
@ -9,6 +9,9 @@ public static class LandingPageStrings
|
|||
public static readonly TranslatableString UsersSingle = create("users_single");
|
||||
public static readonly TranslatableString UsersMultiple = create("users_multiple");
|
||||
|
||||
public static readonly TranslatableString LatestTeamPicks = create("latest_team_picks");
|
||||
public static readonly TranslatableString NewestLevels = create("newest_levels");
|
||||
|
||||
public static readonly TranslatableString AuthAttemptsPending = create("authAttemptsPending");
|
||||
|
||||
private static TranslatableString create(string key) => new(TranslationAreas.LandingPage, key);
|
||||
|
|
|
@ -13,6 +13,8 @@ public class TranslatableString
|
|||
|
||||
public string Translate(string language) => LocalizationManager.GetLocalizedString(this.Area, language, this.Key);
|
||||
|
||||
public string Translate(string language, params object?[] format) => string.Format(LocalizationManager.GetLocalizedString(this.Area, language, this.Key), format);
|
||||
|
||||
// CS0809 is a warning about obsolete methods overriding non-obsoleted methods.
|
||||
// That works against what we're trying to do here, so we disable the warning here.
|
||||
#pragma warning disable CS0809
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue