From f0befef31fd13cbb40f9a763b1e518167c9957fc Mon Sep 17 00:00:00 2001 From: jvyden Date: Wed, 27 Jul 2022 16:37:38 -0400 Subject: [PATCH] Translate UserStatus, titles of pages in header --- .../General.lang-ar-SA.resx | 3 ++ .../General.lang-da-DK.resx | 45 ++++++++++--------- .../General.lang-de-DE.resx | 3 ++ .../General.lang-eo-UY.resx | 45 ++++++++++--------- .../General.lang-es-MX.resx | 45 ++++++++++--------- .../General.lang-fil-PH.resx | 3 ++ .../General.lang-fr-FR.resx | 3 ++ .../General.lang-ga-IE.resx | 3 ++ .../General.lang-ja-JP.resx | 45 ++++++++++--------- .../General.lang-no-NO.resx | 45 ++++++++++--------- .../General.lang-pl-PL.resx | 3 ++ .../General.lang-pt-PT.resx | 3 ++ .../General.lang-ru-RU.resx | 3 ++ .../General.lang-sv-SE.resx | 3 ++ .../General.lang-zh-CN.resx | 3 ++ .../General.lang-zh-TW.resx | 3 ++ ProjectLighthouse.Localization/General.resx | 3 ++ .../ProjectLighthouse.Localization.csproj | 4 ++ .../Status.lang-ar-SA.resx | 29 ++++++++++++ .../Status.lang-da-DK.resx | 29 ++++++++++++ .../Status.lang-de-DE.resx | 29 ++++++++++++ .../Status.lang-eo-UY.resx | 29 ++++++++++++ .../Status.lang-es-MX.resx | 29 ++++++++++++ .../Status.lang-fil-PH.resx | 29 ++++++++++++ .../Status.lang-fr-FR.resx | 29 ++++++++++++ .../Status.lang-ga-IE.resx | 29 ++++++++++++ .../Status.lang-ja-JP.resx | 29 ++++++++++++ .../Status.lang-no-NO.resx | 29 ++++++++++++ .../Status.lang-pl-PL.resx | 29 ++++++++++++ .../Status.lang-pt-PT.resx | 29 ++++++++++++ .../Status.lang-ru-RU.resx | 29 ++++++++++++ .../Status.lang-sv-SE.resx | 29 ++++++++++++ .../Status.lang-zh-CN.resx | 29 ++++++++++++ .../Status.lang-zh-TW.resx | 29 ++++++++++++ ProjectLighthouse.Localization/Status.resx | 30 +++++++++++++ .../StringLists/GeneralStrings.cs | 1 + .../StringLists/StatusStrings.cs | 10 +++++ .../Pages/Layouts/BaseLayout.cshtml.cs | 15 ++++--- .../Pages/Partials/UserCardPartial.cshtml | 5 ++- .../Pages/PhotosPage.cshtml | 3 +- .../Pages/SlotsPage.cshtml | 3 +- .../Pages/UserPage.cshtml | 3 ++ .../Pages/UsersPage.cshtml | 6 ++- ProjectLighthouse.sln.DotSettings | 2 +- .../PlayerData/Profiles/UserStatus.cs | 12 +++-- 45 files changed, 699 insertions(+), 120 deletions(-) create mode 100644 ProjectLighthouse.Localization/Status.lang-ar-SA.resx create mode 100644 ProjectLighthouse.Localization/Status.lang-da-DK.resx create mode 100644 ProjectLighthouse.Localization/Status.lang-de-DE.resx create mode 100644 ProjectLighthouse.Localization/Status.lang-eo-UY.resx create mode 100644 ProjectLighthouse.Localization/Status.lang-es-MX.resx create mode 100644 ProjectLighthouse.Localization/Status.lang-fil-PH.resx create mode 100644 ProjectLighthouse.Localization/Status.lang-fr-FR.resx create mode 100644 ProjectLighthouse.Localization/Status.lang-ga-IE.resx create mode 100644 ProjectLighthouse.Localization/Status.lang-ja-JP.resx create mode 100644 ProjectLighthouse.Localization/Status.lang-no-NO.resx create mode 100644 ProjectLighthouse.Localization/Status.lang-pl-PL.resx create mode 100644 ProjectLighthouse.Localization/Status.lang-pt-PT.resx create mode 100644 ProjectLighthouse.Localization/Status.lang-ru-RU.resx create mode 100644 ProjectLighthouse.Localization/Status.lang-sv-SE.resx create mode 100644 ProjectLighthouse.Localization/Status.lang-zh-CN.resx create mode 100644 ProjectLighthouse.Localization/Status.lang-zh-TW.resx create mode 100644 ProjectLighthouse.Localization/Status.resx create mode 100644 ProjectLighthouse.Localization/StringLists/StatusStrings.cs diff --git a/ProjectLighthouse.Localization/General.lang-ar-SA.resx b/ProjectLighthouse.Localization/General.lang-ar-SA.resx index 01a65cd5..47789ff9 100644 --- a/ProjectLighthouse.Localization/General.lang-ar-SA.resx +++ b/ProjectLighthouse.Localization/General.lang-ar-SA.resx @@ -35,4 +35,7 @@ دخول + + Unknown + \ No newline at end of file diff --git a/ProjectLighthouse.Localization/General.lang-da-DK.resx b/ProjectLighthouse.Localization/General.lang-da-DK.resx index 6db48d85..f1a96972 100644 --- a/ProjectLighthouse.Localization/General.lang-da-DK.resx +++ b/ProjectLighthouse.Localization/General.lang-da-DK.resx @@ -1,38 +1,41 @@ - - + + - - - text/microsoft-resx - - - 1.3 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - + + + text/microsoft-resx + + + 1.3 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + Brugernavn - + Adgangskode - + Registrer - + Glemt adgangskode? - + Åh nej! - + Log ind + + Unknown + \ No newline at end of file diff --git a/ProjectLighthouse.Localization/General.lang-de-DE.resx b/ProjectLighthouse.Localization/General.lang-de-DE.resx index 754a7deb..74fb5c8e 100644 --- a/ProjectLighthouse.Localization/General.lang-de-DE.resx +++ b/ProjectLighthouse.Localization/General.lang-de-DE.resx @@ -35,4 +35,7 @@ Anmelden + + Unknown + \ No newline at end of file diff --git a/ProjectLighthouse.Localization/General.lang-eo-UY.resx b/ProjectLighthouse.Localization/General.lang-eo-UY.resx index b3c93d7c..a4d94879 100644 --- a/ProjectLighthouse.Localization/General.lang-eo-UY.resx +++ b/ProjectLighthouse.Localization/General.lang-eo-UY.resx @@ -1,38 +1,41 @@ - - + + - - - text/microsoft-resx - - - 1.3 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - + + + text/microsoft-resx + + + 1.3 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + Username - + Password - + Register - + Forgot Password? - + Uh oh! - + Log In + + Unknown + \ No newline at end of file diff --git a/ProjectLighthouse.Localization/General.lang-es-MX.resx b/ProjectLighthouse.Localization/General.lang-es-MX.resx index b3c93d7c..a4d94879 100644 --- a/ProjectLighthouse.Localization/General.lang-es-MX.resx +++ b/ProjectLighthouse.Localization/General.lang-es-MX.resx @@ -1,38 +1,41 @@ - - + + - - - text/microsoft-resx - - - 1.3 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - + + + text/microsoft-resx + + + 1.3 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + Username - + Password - + Register - + Forgot Password? - + Uh oh! - + Log In + + Unknown + \ No newline at end of file diff --git a/ProjectLighthouse.Localization/General.lang-fil-PH.resx b/ProjectLighthouse.Localization/General.lang-fil-PH.resx index f4c93072..b7eb468b 100644 --- a/ProjectLighthouse.Localization/General.lang-fil-PH.resx +++ b/ProjectLighthouse.Localization/General.lang-fil-PH.resx @@ -35,4 +35,7 @@ Mag log in + + Unknown + \ No newline at end of file diff --git a/ProjectLighthouse.Localization/General.lang-fr-FR.resx b/ProjectLighthouse.Localization/General.lang-fr-FR.resx index 7a17625e..1ecc23be 100644 --- a/ProjectLighthouse.Localization/General.lang-fr-FR.resx +++ b/ProjectLighthouse.Localization/General.lang-fr-FR.resx @@ -35,4 +35,7 @@ Ouvrir une session + + Unknown + \ No newline at end of file diff --git a/ProjectLighthouse.Localization/General.lang-ga-IE.resx b/ProjectLighthouse.Localization/General.lang-ga-IE.resx index 903440b0..7252d310 100644 --- a/ProjectLighthouse.Localization/General.lang-ga-IE.resx +++ b/ProjectLighthouse.Localization/General.lang-ga-IE.resx @@ -35,4 +35,7 @@ Logáil isteach + + Unknown + \ No newline at end of file diff --git a/ProjectLighthouse.Localization/General.lang-ja-JP.resx b/ProjectLighthouse.Localization/General.lang-ja-JP.resx index 247008f3..47666d0a 100644 --- a/ProjectLighthouse.Localization/General.lang-ja-JP.resx +++ b/ProjectLighthouse.Localization/General.lang-ja-JP.resx @@ -1,38 +1,41 @@ - - + + - - - text/microsoft-resx - - - 1.3 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - + + + text/microsoft-resx + + + 1.3 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + ユーザーネーム - + パスワード - + 登録する - + パスワードを忘れましたか? - + おおっと! - + ログイン + + Unknown + \ No newline at end of file diff --git a/ProjectLighthouse.Localization/General.lang-no-NO.resx b/ProjectLighthouse.Localization/General.lang-no-NO.resx index eb66dc58..52a1ff93 100644 --- a/ProjectLighthouse.Localization/General.lang-no-NO.resx +++ b/ProjectLighthouse.Localization/General.lang-no-NO.resx @@ -1,38 +1,41 @@ - - + + - - - text/microsoft-resx - - - 1.3 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - + + + text/microsoft-resx + + + 1.3 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + Brukernavn - + Passord - + Registrer - + Glemt Passord? - + Ånei! - + Logg in + + Unknown + \ No newline at end of file diff --git a/ProjectLighthouse.Localization/General.lang-pl-PL.resx b/ProjectLighthouse.Localization/General.lang-pl-PL.resx index 0b0ee713..1b9d7ee1 100644 --- a/ProjectLighthouse.Localization/General.lang-pl-PL.resx +++ b/ProjectLighthouse.Localization/General.lang-pl-PL.resx @@ -35,4 +35,7 @@ Zaloguj się + + Unknown + \ No newline at end of file diff --git a/ProjectLighthouse.Localization/General.lang-pt-PT.resx b/ProjectLighthouse.Localization/General.lang-pt-PT.resx index 28cf11a0..630a52e4 100644 --- a/ProjectLighthouse.Localization/General.lang-pt-PT.resx +++ b/ProjectLighthouse.Localization/General.lang-pt-PT.resx @@ -35,4 +35,7 @@ Iniciar Sessão + + Unknown + \ No newline at end of file diff --git a/ProjectLighthouse.Localization/General.lang-ru-RU.resx b/ProjectLighthouse.Localization/General.lang-ru-RU.resx index 1ec2a1db..f7120d74 100644 --- a/ProjectLighthouse.Localization/General.lang-ru-RU.resx +++ b/ProjectLighthouse.Localization/General.lang-ru-RU.resx @@ -35,4 +35,7 @@ Вход + + Unknown + \ No newline at end of file diff --git a/ProjectLighthouse.Localization/General.lang-sv-SE.resx b/ProjectLighthouse.Localization/General.lang-sv-SE.resx index 345ed0ca..ee0009b1 100644 --- a/ProjectLighthouse.Localization/General.lang-sv-SE.resx +++ b/ProjectLighthouse.Localization/General.lang-sv-SE.resx @@ -35,4 +35,7 @@ Logga in + + Unknown + \ No newline at end of file diff --git a/ProjectLighthouse.Localization/General.lang-zh-CN.resx b/ProjectLighthouse.Localization/General.lang-zh-CN.resx index 1feba945..d520df7a 100644 --- a/ProjectLighthouse.Localization/General.lang-zh-CN.resx +++ b/ProjectLighthouse.Localization/General.lang-zh-CN.resx @@ -35,4 +35,7 @@ 登入 + + Unknown + \ No newline at end of file diff --git a/ProjectLighthouse.Localization/General.lang-zh-TW.resx b/ProjectLighthouse.Localization/General.lang-zh-TW.resx index 5128b654..341f4e41 100644 --- a/ProjectLighthouse.Localization/General.lang-zh-TW.resx +++ b/ProjectLighthouse.Localization/General.lang-zh-TW.resx @@ -35,4 +35,7 @@ 登入 + + Unknown + \ No newline at end of file diff --git a/ProjectLighthouse.Localization/General.resx b/ProjectLighthouse.Localization/General.resx index 2e014ac5..99b27d7d 100644 --- a/ProjectLighthouse.Localization/General.resx +++ b/ProjectLighthouse.Localization/General.resx @@ -36,4 +36,7 @@ Log In + + Unknown + \ No newline at end of file diff --git a/ProjectLighthouse.Localization/ProjectLighthouse.Localization.csproj b/ProjectLighthouse.Localization/ProjectLighthouse.Localization.csproj index 57dfbc18..f58feddd 100644 --- a/ProjectLighthouse.Localization/ProjectLighthouse.Localization.csproj +++ b/ProjectLighthouse.Localization/ProjectLighthouse.Localization.csproj @@ -21,6 +21,10 @@ ResXFileCodeGenerator LoggedOut.Designer.cs + + ResXFileCodeGenerator + Status.Designer.cs + diff --git a/ProjectLighthouse.Localization/Status.lang-ar-SA.resx b/ProjectLighthouse.Localization/Status.lang-ar-SA.resx new file mode 100644 index 00000000..6669ee19 --- /dev/null +++ b/ProjectLighthouse.Localization/Status.lang-ar-SA.resx @@ -0,0 +1,29 @@ + + + + + + + + + text/microsoft-resx + + + 1.3 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Currently online on {0} on {1} + + + Offline + + + Offline since {0} + + \ No newline at end of file diff --git a/ProjectLighthouse.Localization/Status.lang-da-DK.resx b/ProjectLighthouse.Localization/Status.lang-da-DK.resx new file mode 100644 index 00000000..6669ee19 --- /dev/null +++ b/ProjectLighthouse.Localization/Status.lang-da-DK.resx @@ -0,0 +1,29 @@ + + + + + + + + + text/microsoft-resx + + + 1.3 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Currently online on {0} on {1} + + + Offline + + + Offline since {0} + + \ No newline at end of file diff --git a/ProjectLighthouse.Localization/Status.lang-de-DE.resx b/ProjectLighthouse.Localization/Status.lang-de-DE.resx new file mode 100644 index 00000000..6669ee19 --- /dev/null +++ b/ProjectLighthouse.Localization/Status.lang-de-DE.resx @@ -0,0 +1,29 @@ + + + + + + + + + text/microsoft-resx + + + 1.3 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Currently online on {0} on {1} + + + Offline + + + Offline since {0} + + \ No newline at end of file diff --git a/ProjectLighthouse.Localization/Status.lang-eo-UY.resx b/ProjectLighthouse.Localization/Status.lang-eo-UY.resx new file mode 100644 index 00000000..6669ee19 --- /dev/null +++ b/ProjectLighthouse.Localization/Status.lang-eo-UY.resx @@ -0,0 +1,29 @@ + + + + + + + + + text/microsoft-resx + + + 1.3 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Currently online on {0} on {1} + + + Offline + + + Offline since {0} + + \ No newline at end of file diff --git a/ProjectLighthouse.Localization/Status.lang-es-MX.resx b/ProjectLighthouse.Localization/Status.lang-es-MX.resx new file mode 100644 index 00000000..6669ee19 --- /dev/null +++ b/ProjectLighthouse.Localization/Status.lang-es-MX.resx @@ -0,0 +1,29 @@ + + + + + + + + + text/microsoft-resx + + + 1.3 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Currently online on {0} on {1} + + + Offline + + + Offline since {0} + + \ No newline at end of file diff --git a/ProjectLighthouse.Localization/Status.lang-fil-PH.resx b/ProjectLighthouse.Localization/Status.lang-fil-PH.resx new file mode 100644 index 00000000..6669ee19 --- /dev/null +++ b/ProjectLighthouse.Localization/Status.lang-fil-PH.resx @@ -0,0 +1,29 @@ + + + + + + + + + text/microsoft-resx + + + 1.3 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Currently online on {0} on {1} + + + Offline + + + Offline since {0} + + \ No newline at end of file diff --git a/ProjectLighthouse.Localization/Status.lang-fr-FR.resx b/ProjectLighthouse.Localization/Status.lang-fr-FR.resx new file mode 100644 index 00000000..6669ee19 --- /dev/null +++ b/ProjectLighthouse.Localization/Status.lang-fr-FR.resx @@ -0,0 +1,29 @@ + + + + + + + + + text/microsoft-resx + + + 1.3 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Currently online on {0} on {1} + + + Offline + + + Offline since {0} + + \ No newline at end of file diff --git a/ProjectLighthouse.Localization/Status.lang-ga-IE.resx b/ProjectLighthouse.Localization/Status.lang-ga-IE.resx new file mode 100644 index 00000000..6669ee19 --- /dev/null +++ b/ProjectLighthouse.Localization/Status.lang-ga-IE.resx @@ -0,0 +1,29 @@ + + + + + + + + + text/microsoft-resx + + + 1.3 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Currently online on {0} on {1} + + + Offline + + + Offline since {0} + + \ No newline at end of file diff --git a/ProjectLighthouse.Localization/Status.lang-ja-JP.resx b/ProjectLighthouse.Localization/Status.lang-ja-JP.resx new file mode 100644 index 00000000..6669ee19 --- /dev/null +++ b/ProjectLighthouse.Localization/Status.lang-ja-JP.resx @@ -0,0 +1,29 @@ + + + + + + + + + text/microsoft-resx + + + 1.3 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Currently online on {0} on {1} + + + Offline + + + Offline since {0} + + \ No newline at end of file diff --git a/ProjectLighthouse.Localization/Status.lang-no-NO.resx b/ProjectLighthouse.Localization/Status.lang-no-NO.resx new file mode 100644 index 00000000..6669ee19 --- /dev/null +++ b/ProjectLighthouse.Localization/Status.lang-no-NO.resx @@ -0,0 +1,29 @@ + + + + + + + + + text/microsoft-resx + + + 1.3 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Currently online on {0} on {1} + + + Offline + + + Offline since {0} + + \ No newline at end of file diff --git a/ProjectLighthouse.Localization/Status.lang-pl-PL.resx b/ProjectLighthouse.Localization/Status.lang-pl-PL.resx new file mode 100644 index 00000000..6669ee19 --- /dev/null +++ b/ProjectLighthouse.Localization/Status.lang-pl-PL.resx @@ -0,0 +1,29 @@ + + + + + + + + + text/microsoft-resx + + + 1.3 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Currently online on {0} on {1} + + + Offline + + + Offline since {0} + + \ No newline at end of file diff --git a/ProjectLighthouse.Localization/Status.lang-pt-PT.resx b/ProjectLighthouse.Localization/Status.lang-pt-PT.resx new file mode 100644 index 00000000..6669ee19 --- /dev/null +++ b/ProjectLighthouse.Localization/Status.lang-pt-PT.resx @@ -0,0 +1,29 @@ + + + + + + + + + text/microsoft-resx + + + 1.3 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Currently online on {0} on {1} + + + Offline + + + Offline since {0} + + \ No newline at end of file diff --git a/ProjectLighthouse.Localization/Status.lang-ru-RU.resx b/ProjectLighthouse.Localization/Status.lang-ru-RU.resx new file mode 100644 index 00000000..6669ee19 --- /dev/null +++ b/ProjectLighthouse.Localization/Status.lang-ru-RU.resx @@ -0,0 +1,29 @@ + + + + + + + + + text/microsoft-resx + + + 1.3 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Currently online on {0} on {1} + + + Offline + + + Offline since {0} + + \ No newline at end of file diff --git a/ProjectLighthouse.Localization/Status.lang-sv-SE.resx b/ProjectLighthouse.Localization/Status.lang-sv-SE.resx new file mode 100644 index 00000000..6669ee19 --- /dev/null +++ b/ProjectLighthouse.Localization/Status.lang-sv-SE.resx @@ -0,0 +1,29 @@ + + + + + + + + + text/microsoft-resx + + + 1.3 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Currently online on {0} on {1} + + + Offline + + + Offline since {0} + + \ No newline at end of file diff --git a/ProjectLighthouse.Localization/Status.lang-zh-CN.resx b/ProjectLighthouse.Localization/Status.lang-zh-CN.resx new file mode 100644 index 00000000..6669ee19 --- /dev/null +++ b/ProjectLighthouse.Localization/Status.lang-zh-CN.resx @@ -0,0 +1,29 @@ + + + + + + + + + text/microsoft-resx + + + 1.3 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Currently online on {0} on {1} + + + Offline + + + Offline since {0} + + \ No newline at end of file diff --git a/ProjectLighthouse.Localization/Status.lang-zh-TW.resx b/ProjectLighthouse.Localization/Status.lang-zh-TW.resx new file mode 100644 index 00000000..6669ee19 --- /dev/null +++ b/ProjectLighthouse.Localization/Status.lang-zh-TW.resx @@ -0,0 +1,29 @@ + + + + + + + + + text/microsoft-resx + + + 1.3 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Currently online on {0} on {1} + + + Offline + + + Offline since {0} + + \ No newline at end of file diff --git a/ProjectLighthouse.Localization/Status.resx b/ProjectLighthouse.Localization/Status.resx new file mode 100644 index 00000000..93d96be1 --- /dev/null +++ b/ProjectLighthouse.Localization/Status.resx @@ -0,0 +1,30 @@ + + + + + + + + + + text/microsoft-resx + + + 1.3 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Currently online on {0} on {1} + + + Offline + + + Offline since {0} + + \ No newline at end of file diff --git a/ProjectLighthouse.Localization/StringLists/GeneralStrings.cs b/ProjectLighthouse.Localization/StringLists/GeneralStrings.cs index db134368..1b17015e 100644 --- a/ProjectLighthouse.Localization/StringLists/GeneralStrings.cs +++ b/ProjectLighthouse.Localization/StringLists/GeneralStrings.cs @@ -8,6 +8,7 @@ public static class GeneralStrings public static readonly TranslatableString ForgotPassword = create("forgot_password"); public static readonly TranslatableString Error = create("error"); public static readonly TranslatableString LogIn = create("log_in"); + public static readonly TranslatableString Unknown = create("unknown"); private static TranslatableString create(string key) => new(TranslationAreas.General, key); } \ No newline at end of file diff --git a/ProjectLighthouse.Localization/StringLists/StatusStrings.cs b/ProjectLighthouse.Localization/StringLists/StatusStrings.cs new file mode 100644 index 00000000..f80cad7d --- /dev/null +++ b/ProjectLighthouse.Localization/StringLists/StatusStrings.cs @@ -0,0 +1,10 @@ +namespace LBPUnion.ProjectLighthouse.Localization.StringLists; + +public static class StatusStrings +{ + public static readonly TranslatableString CurrentlyOnline = create("currently_online"); + public static readonly TranslatableString LastOnline = create("last_online"); // TODO: implement + public static readonly TranslatableString Offline = create("offline"); + + private static TranslatableString create(string key) => new(TranslationAreas.LoggedOut, key); +} \ No newline at end of file diff --git a/ProjectLighthouse.Servers.Website/Pages/Layouts/BaseLayout.cshtml.cs b/ProjectLighthouse.Servers.Website/Pages/Layouts/BaseLayout.cshtml.cs index 3537e4cb..93259557 100644 --- a/ProjectLighthouse.Servers.Website/Pages/Layouts/BaseLayout.cshtml.cs +++ b/ProjectLighthouse.Servers.Website/Pages/Layouts/BaseLayout.cshtml.cs @@ -46,16 +46,19 @@ public class BaseLayout : PageModel set => this.user = value; } - private string getLanguage() + private string? language; + + public string GetLanguage() { - if (ServerStatics.IsUnitTesting) return "en-US"; + if (ServerStatics.IsUnitTesting) return LocalizationManager.DefaultLang; + if (this.language != null) return this.language; IRequestCultureFeature? requestCulture = Request.HttpContext.Features.Get(); + if (requestCulture == null) return this.language = LocalizationManager.DefaultLang; - if (requestCulture == null) return LocalizationManager.DefaultLang; - return requestCulture.RequestCulture.UICulture.Name; + return this.language = requestCulture.RequestCulture.UICulture.Name; } - public string Translate(TranslatableString translatableString) => translatableString.Translate(this.getLanguage()); - public string Translate(TranslatableString translatableString, params object?[] format) => translatableString.Translate(this.getLanguage(), format); + public string Translate(TranslatableString translatableString) => translatableString.Translate(this.GetLanguage()); + public string Translate(TranslatableString translatableString, params object?[] format) => translatableString.Translate(this.GetLanguage(), format); } \ No newline at end of file diff --git a/ProjectLighthouse.Servers.Website/Pages/Partials/UserCardPartial.cshtml b/ProjectLighthouse.Servers.Website/Pages/Partials/UserCardPartial.cshtml index 06772c38..de24034d 100644 --- a/ProjectLighthouse.Servers.Website/Pages/Partials/UserCardPartial.cshtml +++ b/ProjectLighthouse.Servers.Website/Pages/Partials/UserCardPartial.cshtml @@ -1,8 +1,11 @@ +@using LBPUnion.ProjectLighthouse.Helpers +@using LBPUnion.ProjectLighthouse.Localization @model LBPUnion.ProjectLighthouse.PlayerData.Profiles.User @{ bool showLink = (bool?)ViewData["ShowLink"] ?? false; bool isMobile = (bool?)ViewData["IsMobile"] ?? false; + string language = (string?)ViewData["Language"] ?? LocalizationManager.DefaultLang; }
@@ -25,7 +28,7 @@ }

- @Model.Status + @Model.Status.ToTranslatedString(language)

@Model.Hearts diff --git a/ProjectLighthouse.Servers.Website/Pages/PhotosPage.cshtml b/ProjectLighthouse.Servers.Website/Pages/PhotosPage.cshtml index 1d532362..c89184b8 100644 --- a/ProjectLighthouse.Servers.Website/Pages/PhotosPage.cshtml +++ b/ProjectLighthouse.Servers.Website/Pages/PhotosPage.cshtml @@ -1,11 +1,12 @@ @page "/photos/{pageNumber:int}" +@using LBPUnion.ProjectLighthouse.Localization.StringLists @using LBPUnion.ProjectLighthouse.PlayerData @using LBPUnion.ProjectLighthouse.Types @model LBPUnion.ProjectLighthouse.Servers.Website.Pages.PhotosPage @{ Layout = "Layouts/BaseLayout"; - Model.Title = "Photos"; + Model.Title = Model.Translate(BaseLayoutStrings.HeaderPhotos); }

There are @Model.PhotoCount total photos!

diff --git a/ProjectLighthouse.Servers.Website/Pages/SlotsPage.cshtml b/ProjectLighthouse.Servers.Website/Pages/SlotsPage.cshtml index 4d736f29..69fb3073 100644 --- a/ProjectLighthouse.Servers.Website/Pages/SlotsPage.cshtml +++ b/ProjectLighthouse.Servers.Website/Pages/SlotsPage.cshtml @@ -1,11 +1,12 @@ @page "/slots/{pageNumber:int}" @using LBPUnion.ProjectLighthouse.Extensions @using LBPUnion.ProjectLighthouse.Levels +@using LBPUnion.ProjectLighthouse.Localization.StringLists @model LBPUnion.ProjectLighthouse.Servers.Website.Pages.SlotsPage @{ Layout = "Layouts/BaseLayout"; - Model.Title = "Levels"; + Model.Title = Model.Translate(BaseLayoutStrings.HeaderSlots); }

There are @Model.SlotCount total levels!

diff --git a/ProjectLighthouse.Servers.Website/Pages/UserPage.cshtml b/ProjectLighthouse.Servers.Website/Pages/UserPage.cshtml index e3761284..288ff6c3 100644 --- a/ProjectLighthouse.Servers.Website/Pages/UserPage.cshtml +++ b/ProjectLighthouse.Servers.Website/Pages/UserPage.cshtml @@ -46,6 +46,9 @@ { "IsMobile", Model.Request.IsMobile() }, + { + "Language", Model.GetLanguage() + } })
diff --git a/ProjectLighthouse.Servers.Website/Pages/UsersPage.cshtml b/ProjectLighthouse.Servers.Website/Pages/UsersPage.cshtml index f59d9874..db8f7a46 100644 --- a/ProjectLighthouse.Servers.Website/Pages/UsersPage.cshtml +++ b/ProjectLighthouse.Servers.Website/Pages/UsersPage.cshtml @@ -1,12 +1,13 @@ @page "/users/{pageNumber:int}" @using LBPUnion.ProjectLighthouse.Extensions +@using LBPUnion.ProjectLighthouse.Localization.StringLists @using LBPUnion.ProjectLighthouse.PlayerData.Profiles @using LBPUnion.ProjectLighthouse.Types @model LBPUnion.ProjectLighthouse.Servers.Website.Pages.UsersPage @{ Layout = "Layouts/BaseLayout"; - Model.Title = "Users"; + Model.Title = Model.Translate(BaseLayoutStrings.HeaderUsers); }

There are @Model.UserCount total users.

@@ -31,6 +32,9 @@ { "IsMobile", isMobile }, + { + "Language", Model.GetLanguage() + }, })
} diff --git a/ProjectLighthouse.sln.DotSettings b/ProjectLighthouse.sln.DotSettings index 524940d2..8cbc8651 100644 --- a/ProjectLighthouse.sln.DotSettings +++ b/ProjectLighthouse.sln.DotSettings @@ -58,7 +58,7 @@ NEXT_LINE True False - CHOP_ALWAYS + CHOP_IF_LONG CHOP_IF_LONG True True diff --git a/ProjectLighthouse/PlayerData/Profiles/UserStatus.cs b/ProjectLighthouse/PlayerData/Profiles/UserStatus.cs index 91c0083a..a01a5f31 100644 --- a/ProjectLighthouse/PlayerData/Profiles/UserStatus.cs +++ b/ProjectLighthouse/PlayerData/Profiles/UserStatus.cs @@ -1,6 +1,8 @@ #nullable enable using System.Linq; using LBPUnion.ProjectLighthouse.Helpers; +using LBPUnion.ProjectLighthouse.Localization; +using LBPUnion.ProjectLighthouse.Localization.StringLists; using LBPUnion.ProjectLighthouse.Match.Rooms; namespace LBPUnion.ProjectLighthouse.PlayerData.Profiles; @@ -34,15 +36,17 @@ public class UserStatus this.CurrentRoom = RoomHelper.FindRoomByUserId(userId); } - public override string ToString() + public string ToTranslatedString(string language) { this.CurrentVersion ??= GameVersion.Unknown; this.CurrentPlatform ??= Platform.Unknown; + return this.StatusType switch { - StatusType.Online => $"Currently online on {((GameVersion)this.CurrentVersion).ToPrettyString()} on {((Platform)this.CurrentPlatform)}", - StatusType.Offline => "Offline", - _ => "Unknown", + StatusType.Online => StatusStrings.CurrentlyOnline.Translate(language, + ((GameVersion)this.CurrentVersion).ToPrettyString(), ((Platform)this.CurrentPlatform)), + StatusType.Offline => StatusStrings.Offline.Translate(language), + _ => GeneralStrings.Unknown.Translate(language), }; } } \ No newline at end of file