diff --git a/.idea/.idea.ProjectLighthouse/.idea/indexLayout.xml b/.idea/.idea.ProjectLighthouse/.idea/indexLayout.xml index e9bcd75e..aff6dfa9 100644 --- a/.idea/.idea.ProjectLighthouse/.idea/indexLayout.xml +++ b/.idea/.idea.ProjectLighthouse/.idea/indexLayout.xml @@ -14,6 +14,7 @@ ProjectLighthouse.sln.DotSettings.user README.md create-migration.sh + crowdin.yml docker-compose.yml global.json scripts-and-tools diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 3d72edc6..d2da1519 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -17,9 +17,6 @@ Once you've gotten MySQL running you can run Lighthouse. It will take care of th PS3 is difficult to set up, so I will be going over how to set up RPCS3 instead. A guide will be coming for PS3 closer to release. You can also follow this guide if you want to learn how to modify your EBOOT. -*Note: This requires a patched copy of RPCS3. You can find a working -version [on our GitHub](https://github.com/LBPUnion/rpcs3).* - Start by getting a copy of LittleBigPlanet 1/2 installed. (Check the LittleBigPlanet 1 section, since you'll need to do extra steps for your game to not crash upon entering pod computer). @@ -44,8 +41,8 @@ Now, copy the `EBOOTlocalhost.elf` file to where you got your `EBOOT.elf` file f To launch the game with the patched EBOOT, open up RPCS3, go to File, Boot SELF/ELF, and open up `EBOOTlocalhost.elf`. -Assuming you are running the patched version of RPCS3, you patched the file correctly, the database is migrated, and -Project Lighthouse is running, the game should now connect and you may begin contributing! +Assuming you patched the file correctly, the database is migrated, and +Project Lighthouse is running, the game should now connect, and you may begin contributing! ### LittleBigPlanet 1 diff --git a/ProjectLighthouse.Localization/BaseLayout.lang-ar-SA.resx b/ProjectLighthouse.Localization/BaseLayout.lang-ar-SA.resx new file mode 100644 index 00000000..c799594c --- /dev/null +++ b/ProjectLighthouse.Localization/BaseLayout.lang-ar-SA.resx @@ -0,0 +1,66 @@ + + + + + + + + + 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 + + + + + Home + A button on the header that takes you to the landing page. + + + + Users + A button on the header that takes you to the user listing. + + + + Photos + A button on the header that takes you to a list of user-uploaded photos. + + + + Levels + A button on the header that takes you to a list of user-uploaded levels. Levels are internally referred to as "slots". + + + + Authentication + A button on the header that takes you to a list of authentication attempts. + + + + Login / Register + A button on the header that lets you log in or register. + + + Profile + A quick shortcut on the header to take you to your profile if logged in. + + + Admin Panel + A header link that takes you to the admin panel if available. + + + Log out + A shortcut to log you out of your account. + + \ No newline at end of file diff --git a/ProjectLighthouse.Localization/BaseLayout.lang-da-DK.resx b/ProjectLighthouse.Localization/BaseLayout.lang-da-DK.resx new file mode 100644 index 00000000..e73812c8 --- /dev/null +++ b/ProjectLighthouse.Localization/BaseLayout.lang-da-DK.resx @@ -0,0 +1,66 @@ + + + + + + + + + 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 + + + + + Forside + A button on the header that takes you to the landing page. + + + + Brugere + A button on the header that takes you to the user listing. + + + + Fotos + A button on the header that takes you to a list of user-uploaded photos. + + + + Baner + A button on the header that takes you to a list of user-uploaded levels. Levels are internally referred to as "slots". + + + + Godkendelse + A button on the header that takes you to a list of authentication attempts. + + + + Log ind / Registrer + A button on the header that lets you log in or register. + + + Profil + A quick shortcut on the header to take you to your profile if logged in. + + + Administrationspanel + A header link that takes you to the admin panel if available. + + + Log ud + A shortcut to log you out of your account. + + \ No newline at end of file diff --git a/ProjectLighthouse.Localization/BaseLayout.lang-de-DE.resx b/ProjectLighthouse.Localization/BaseLayout.lang-de-DE.resx new file mode 100644 index 00000000..c799594c --- /dev/null +++ b/ProjectLighthouse.Localization/BaseLayout.lang-de-DE.resx @@ -0,0 +1,66 @@ + + + + + + + + + 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 + + + + + Home + A button on the header that takes you to the landing page. + + + + Users + A button on the header that takes you to the user listing. + + + + Photos + A button on the header that takes you to a list of user-uploaded photos. + + + + Levels + A button on the header that takes you to a list of user-uploaded levels. Levels are internally referred to as "slots". + + + + Authentication + A button on the header that takes you to a list of authentication attempts. + + + + Login / Register + A button on the header that lets you log in or register. + + + Profile + A quick shortcut on the header to take you to your profile if logged in. + + + Admin Panel + A header link that takes you to the admin panel if available. + + + Log out + A shortcut to log you out of your account. + + \ No newline at end of file diff --git a/ProjectLighthouse.Localization/BaseLayout.lang-eo-UY.resx b/ProjectLighthouse.Localization/BaseLayout.lang-eo-UY.resx new file mode 100644 index 00000000..68388e30 --- /dev/null +++ b/ProjectLighthouse.Localization/BaseLayout.lang-eo-UY.resx @@ -0,0 +1,66 @@ + + + + + + + + + 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 + + + + + Hejmo + A button on the header that takes you to the landing page. + + + + Uzantoj + A button on the header that takes you to the user listing. + + + + Fotoj + A button on the header that takes you to a list of user-uploaded photos. + + + + Etaĝoj + A button on the header that takes you to a list of user-uploaded levels. Levels are internally referred to as "slots". + + + + Aŭtentigado + A button on the header that takes you to a list of authentication attempts. + + + + Ensaluto / Registro + A button on the header that lets you log in or register. + + + Profilo + A quick shortcut on the header to take you to your profile if logged in. + + + Panelo de administranto + A header link that takes you to the admin panel if available. + + + Adiaŭi + A shortcut to log you out of your account. + + \ No newline at end of file diff --git a/ProjectLighthouse.Localization/BaseLayout.lang-es-MX.resx b/ProjectLighthouse.Localization/BaseLayout.lang-es-MX.resx new file mode 100644 index 00000000..9f37276f --- /dev/null +++ b/ProjectLighthouse.Localization/BaseLayout.lang-es-MX.resx @@ -0,0 +1,66 @@ + + + + + + + + + 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 + + + + + Inicio + A button on the header that takes you to the landing page. + + + + Usuarios + A button on the header that takes you to the user listing. + + + + Fotos + A button on the header that takes you to a list of user-uploaded photos. + + + + Niveles + A button on the header that takes you to a list of user-uploaded levels. Levels are internally referred to as "slots". + + + + Autenticación + A button on the header that takes you to a list of authentication attempts. + + + + Iniciar sesión / Registrarse + A button on the header that lets you log in or register. + + + Perfil + A quick shortcut on the header to take you to your profile if logged in. + + + Panel de administración + A header link that takes you to the admin panel if available. + + + Cerrar sesión + A shortcut to log you out of your account. + + \ No newline at end of file diff --git a/ProjectLighthouse.Localization/BaseLayout.lang-fil-PH.resx b/ProjectLighthouse.Localization/BaseLayout.lang-fil-PH.resx new file mode 100644 index 00000000..c799594c --- /dev/null +++ b/ProjectLighthouse.Localization/BaseLayout.lang-fil-PH.resx @@ -0,0 +1,66 @@ + + + + + + + + + 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 + + + + + Home + A button on the header that takes you to the landing page. + + + + Users + A button on the header that takes you to the user listing. + + + + Photos + A button on the header that takes you to a list of user-uploaded photos. + + + + Levels + A button on the header that takes you to a list of user-uploaded levels. Levels are internally referred to as "slots". + + + + Authentication + A button on the header that takes you to a list of authentication attempts. + + + + Login / Register + A button on the header that lets you log in or register. + + + Profile + A quick shortcut on the header to take you to your profile if logged in. + + + Admin Panel + A header link that takes you to the admin panel if available. + + + Log out + A shortcut to log you out of your account. + + \ No newline at end of file diff --git a/ProjectLighthouse.Localization/BaseLayout.lang-fr-FR.resx b/ProjectLighthouse.Localization/BaseLayout.lang-fr-FR.resx new file mode 100644 index 00000000..c799594c --- /dev/null +++ b/ProjectLighthouse.Localization/BaseLayout.lang-fr-FR.resx @@ -0,0 +1,66 @@ + + + + + + + + + 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 + + + + + Home + A button on the header that takes you to the landing page. + + + + Users + A button on the header that takes you to the user listing. + + + + Photos + A button on the header that takes you to a list of user-uploaded photos. + + + + Levels + A button on the header that takes you to a list of user-uploaded levels. Levels are internally referred to as "slots". + + + + Authentication + A button on the header that takes you to a list of authentication attempts. + + + + Login / Register + A button on the header that lets you log in or register. + + + Profile + A quick shortcut on the header to take you to your profile if logged in. + + + Admin Panel + A header link that takes you to the admin panel if available. + + + Log out + A shortcut to log you out of your account. + + \ No newline at end of file diff --git a/ProjectLighthouse.Localization/BaseLayout.lang-ga-IE.resx b/ProjectLighthouse.Localization/BaseLayout.lang-ga-IE.resx new file mode 100644 index 00000000..c799594c --- /dev/null +++ b/ProjectLighthouse.Localization/BaseLayout.lang-ga-IE.resx @@ -0,0 +1,66 @@ + + + + + + + + + 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 + + + + + Home + A button on the header that takes you to the landing page. + + + + Users + A button on the header that takes you to the user listing. + + + + Photos + A button on the header that takes you to a list of user-uploaded photos. + + + + Levels + A button on the header that takes you to a list of user-uploaded levels. Levels are internally referred to as "slots". + + + + Authentication + A button on the header that takes you to a list of authentication attempts. + + + + Login / Register + A button on the header that lets you log in or register. + + + Profile + A quick shortcut on the header to take you to your profile if logged in. + + + Admin Panel + A header link that takes you to the admin panel if available. + + + Log out + A shortcut to log you out of your account. + + \ No newline at end of file diff --git a/ProjectLighthouse.Localization/BaseLayout.lang-gd-GB.resx b/ProjectLighthouse.Localization/BaseLayout.lang-gd-GB.resx new file mode 100644 index 00000000..c799594c --- /dev/null +++ b/ProjectLighthouse.Localization/BaseLayout.lang-gd-GB.resx @@ -0,0 +1,66 @@ + + + + + + + + + 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 + + + + + Home + A button on the header that takes you to the landing page. + + + + Users + A button on the header that takes you to the user listing. + + + + Photos + A button on the header that takes you to a list of user-uploaded photos. + + + + Levels + A button on the header that takes you to a list of user-uploaded levels. Levels are internally referred to as "slots". + + + + Authentication + A button on the header that takes you to a list of authentication attempts. + + + + Login / Register + A button on the header that lets you log in or register. + + + Profile + A quick shortcut on the header to take you to your profile if logged in. + + + Admin Panel + A header link that takes you to the admin panel if available. + + + Log out + A shortcut to log you out of your account. + + \ No newline at end of file diff --git a/ProjectLighthouse.Localization/BaseLayout.lang-ja-JP.resx b/ProjectLighthouse.Localization/BaseLayout.lang-ja-JP.resx new file mode 100644 index 00000000..fb8efb4d --- /dev/null +++ b/ProjectLighthouse.Localization/BaseLayout.lang-ja-JP.resx @@ -0,0 +1,66 @@ + + + + + + + + + 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 + + + + + ホーム + A button on the header that takes you to the landing page. + + + + ユーザー + A button on the header that takes you to the user listing. + + + + 画像 + A button on the header that takes you to a list of user-uploaded photos. + + + + レベル + A button on the header that takes you to a list of user-uploaded levels. Levels are internally referred to as "slots". + + + + 認証 + A button on the header that takes you to a list of authentication attempts. + + + + ログイン/サインアップ + A button on the header that lets you log in or register. + + + プロフィール + A quick shortcut on the header to take you to your profile if logged in. + + + 管理者の部屋 + A header link that takes you to the admin panel if available. + + + ログアウト + A shortcut to log you out of your account. + + \ No newline at end of file diff --git a/ProjectLighthouse.Localization/BaseLayout.lang-no-NO.resx b/ProjectLighthouse.Localization/BaseLayout.lang-no-NO.resx new file mode 100644 index 00000000..aef7314b --- /dev/null +++ b/ProjectLighthouse.Localization/BaseLayout.lang-no-NO.resx @@ -0,0 +1,66 @@ + + + + + + + + + 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 + + + + + Hjem + A button on the header that takes you to the landing page. + + + + Brukere + A button on the header that takes you to the user listing. + + + + Bilder + A button on the header that takes you to a list of user-uploaded photos. + + + + Nivåer + A button on the header that takes you to a list of user-uploaded levels. Levels are internally referred to as "slots". + + + + Godkjenning + A button on the header that takes you to a list of authentication attempts. + + + + Logg inn/Registrer + A button on the header that lets you log in or register. + + + Profil + A quick shortcut on the header to take you to your profile if logged in. + + + Administrasjon + A header link that takes you to the admin panel if available. + + + Logg ut + A shortcut to log you out of your account. + + \ No newline at end of file diff --git a/ProjectLighthouse.Localization/BaseLayout.lang-pl-PL.resx b/ProjectLighthouse.Localization/BaseLayout.lang-pl-PL.resx new file mode 100644 index 00000000..9ffde647 --- /dev/null +++ b/ProjectLighthouse.Localization/BaseLayout.lang-pl-PL.resx @@ -0,0 +1,66 @@ + + + + + + + + + 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 + + + + + Strona Główna + A button on the header that takes you to the landing page. + + + + Gracze + A button on the header that takes you to the user listing. + + + + Zdjęcia + A button on the header that takes you to a list of user-uploaded photos. + + + + Poziomy + A button on the header that takes you to a list of user-uploaded levels. Levels are internally referred to as "slots". + + + + Autoryzacja + A button on the header that takes you to a list of authentication attempts. + + + + Login / Rejestracja + A button on the header that lets you log in or register. + + + Profil + A quick shortcut on the header to take you to your profile if logged in. + + + Panel Administracyjny + A header link that takes you to the admin panel if available. + + + Wyloguj + A shortcut to log you out of your account. + + \ No newline at end of file diff --git a/ProjectLighthouse.Localization/BaseLayout.lang-pt-PT.resx b/ProjectLighthouse.Localization/BaseLayout.lang-pt-PT.resx new file mode 100644 index 00000000..80baf315 --- /dev/null +++ b/ProjectLighthouse.Localization/BaseLayout.lang-pt-PT.resx @@ -0,0 +1,66 @@ + + + + + + + + + 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 + + + + + Início + A button on the header that takes you to the landing page. + + + + Utilizadores + A button on the header that takes you to the user listing. + + + + Fotografias + A button on the header that takes you to a list of user-uploaded photos. + + + + Níveis + A button on the header that takes you to a list of user-uploaded levels. Levels are internally referred to as "slots". + + + + Autenticação + A button on the header that takes you to a list of authentication attempts. + + + + Fazer login ou registrar-se + A button on the header that lets you log in or register. + + + Perfil + A quick shortcut on the header to take you to your profile if logged in. + + + Painel do administrador + A header link that takes you to the admin panel if available. + + + Fechar sessão + A shortcut to log you out of your account. + + \ No newline at end of file diff --git a/ProjectLighthouse.Localization/BaseLayout.lang-ru-RU.resx b/ProjectLighthouse.Localization/BaseLayout.lang-ru-RU.resx new file mode 100644 index 00000000..b8584493 --- /dev/null +++ b/ProjectLighthouse.Localization/BaseLayout.lang-ru-RU.resx @@ -0,0 +1,66 @@ + + + + + + + + + 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 + + + + + Главная + A button on the header that takes you to the landing page. + + + + Пользователи + A button on the header that takes you to the user listing. + + + + Фотографии + A button on the header that takes you to a list of user-uploaded photos. + + + + Уровни + A button on the header that takes you to a list of user-uploaded levels. Levels are internally referred to as "slots". + + + + Аутентификация + A button on the header that takes you to a list of authentication attempts. + + + + Вход / Регистрация + A button on the header that lets you log in or register. + + + Профиль + A quick shortcut on the header to take you to your profile if logged in. + + + Админпанель + A header link that takes you to the admin panel if available. + + + Выйти + A shortcut to log you out of your account. + + \ No newline at end of file diff --git a/ProjectLighthouse.Localization/BaseLayout.lang-sv-SE.resx b/ProjectLighthouse.Localization/BaseLayout.lang-sv-SE.resx new file mode 100644 index 00000000..ee6f8508 --- /dev/null +++ b/ProjectLighthouse.Localization/BaseLayout.lang-sv-SE.resx @@ -0,0 +1,66 @@ + + + + + + + + + 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 + + + + + Startsida + A button on the header that takes you to the landing page. + + + + Användare + A button on the header that takes you to the user listing. + + + + Foton + A button on the header that takes you to a list of user-uploaded photos. + + + + Banor + A button on the header that takes you to a list of user-uploaded levels. Levels are internally referred to as "slots". + + + + Autentisering + A button on the header that takes you to a list of authentication attempts. + + + + Logga in / Registrera + A button on the header that lets you log in or register. + + + Min Profil + A quick shortcut on the header to take you to your profile if logged in. + + + Administrationspanel + A header link that takes you to the admin panel if available. + + + Logga ut + A shortcut to log you out of your account. + + \ No newline at end of file diff --git a/ProjectLighthouse.Localization/BaseLayout.lang-zh-CN.resx b/ProjectLighthouse.Localization/BaseLayout.lang-zh-CN.resx new file mode 100644 index 00000000..92d025f2 --- /dev/null +++ b/ProjectLighthouse.Localization/BaseLayout.lang-zh-CN.resx @@ -0,0 +1,66 @@ + + + + + + + + + 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 + + + + + 主页 + A button on the header that takes you to the landing page. + + + + 用户 + A button on the header that takes you to the user listing. + + + + 图片 + A button on the header that takes you to a list of user-uploaded photos. + + + + 追踪 + A button on the header that takes you to a list of user-uploaded levels. Levels are internally referred to as "slots". + + + + Authentication + A button on the header that takes you to a list of authentication attempts. + + + + Login / Register + A button on the header that lets you log in or register. + + + Profile + A quick shortcut on the header to take you to your profile if logged in. + + + Admin Panel + A header link that takes you to the admin panel if available. + + + Log out + A shortcut to log you out of your account. + + \ No newline at end of file diff --git a/ProjectLighthouse.Localization/BaseLayout.resx b/ProjectLighthouse.Localization/BaseLayout.resx new file mode 100644 index 00000000..cdfeee78 --- /dev/null +++ b/ProjectLighthouse.Localization/BaseLayout.resx @@ -0,0 +1,68 @@ + + + + + + + + + + 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 + + + + + Home + A button on the header that takes you to the landing page. + + + + Users + A button on the header that takes you to the user listing. + + + + Photos + A button on the header that takes you to a list of user-uploaded photos. + + + + Levels + A button on the header that takes you to a list of user-uploaded levels. Levels are internally referred to as "slots". + + + + Authentication + A button on the header that takes you to a list of authentication attempts. + + + + Login / Register + A button on the header that lets you log in or register. + + + Profile + A quick shortcut on the header to take you to your profile if logged in. + + + Admin Panel + A header link that takes you to the admin panel if available. + + + Log out + A shortcut to log you out of your account. + + \ No newline at end of file diff --git a/ProjectLighthouse.Localization/General.lang-ar-SA.resx b/ProjectLighthouse.Localization/General.lang-ar-SA.resx new file mode 100644 index 00000000..b3c93d7c --- /dev/null +++ b/ProjectLighthouse.Localization/General.lang-ar-SA.resx @@ -0,0 +1,38 @@ + + + + + + + + + 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 + + \ No newline at end of file diff --git a/ProjectLighthouse.Localization/General.lang-da-DK.resx b/ProjectLighthouse.Localization/General.lang-da-DK.resx new file mode 100644 index 00000000..6db48d85 --- /dev/null +++ b/ProjectLighthouse.Localization/General.lang-da-DK.resx @@ -0,0 +1,38 @@ + + + + + + + + + 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 + + \ No newline at end of file diff --git a/ProjectLighthouse.Localization/General.lang-de-DE.resx b/ProjectLighthouse.Localization/General.lang-de-DE.resx new file mode 100644 index 00000000..b3c93d7c --- /dev/null +++ b/ProjectLighthouse.Localization/General.lang-de-DE.resx @@ -0,0 +1,38 @@ + + + + + + + + + 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 + + \ No newline at end of file diff --git a/ProjectLighthouse.Localization/General.lang-eo-UY.resx b/ProjectLighthouse.Localization/General.lang-eo-UY.resx new file mode 100644 index 00000000..b3c93d7c --- /dev/null +++ b/ProjectLighthouse.Localization/General.lang-eo-UY.resx @@ -0,0 +1,38 @@ + + + + + + + + + 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 + + \ No newline at end of file diff --git a/ProjectLighthouse.Localization/General.lang-es-MX.resx b/ProjectLighthouse.Localization/General.lang-es-MX.resx new file mode 100644 index 00000000..b3c93d7c --- /dev/null +++ b/ProjectLighthouse.Localization/General.lang-es-MX.resx @@ -0,0 +1,38 @@ + + + + + + + + + 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 + + \ No newline at end of file diff --git a/ProjectLighthouse.Localization/General.lang-fil-PH.resx b/ProjectLighthouse.Localization/General.lang-fil-PH.resx new file mode 100644 index 00000000..b3c93d7c --- /dev/null +++ b/ProjectLighthouse.Localization/General.lang-fil-PH.resx @@ -0,0 +1,38 @@ + + + + + + + + + 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 + + \ No newline at end of file diff --git a/ProjectLighthouse.Localization/General.lang-fr-FR.resx b/ProjectLighthouse.Localization/General.lang-fr-FR.resx new file mode 100644 index 00000000..b3c93d7c --- /dev/null +++ b/ProjectLighthouse.Localization/General.lang-fr-FR.resx @@ -0,0 +1,38 @@ + + + + + + + + + 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 + + \ No newline at end of file diff --git a/ProjectLighthouse.Localization/General.lang-ga-IE.resx b/ProjectLighthouse.Localization/General.lang-ga-IE.resx new file mode 100644 index 00000000..b3c93d7c --- /dev/null +++ b/ProjectLighthouse.Localization/General.lang-ga-IE.resx @@ -0,0 +1,38 @@ + + + + + + + + + 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 + + \ No newline at end of file diff --git a/ProjectLighthouse.Localization/General.lang-ja-JP.resx b/ProjectLighthouse.Localization/General.lang-ja-JP.resx new file mode 100644 index 00000000..247008f3 --- /dev/null +++ b/ProjectLighthouse.Localization/General.lang-ja-JP.resx @@ -0,0 +1,38 @@ + + + + + + + + + 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 + + + ユーザーネーム + + + パスワード + + + 登録する + + + パスワードを忘れましたか? + + + おおっと! + + + ログイン + + \ No newline at end of file diff --git a/ProjectLighthouse.Localization/General.lang-no-NO.resx b/ProjectLighthouse.Localization/General.lang-no-NO.resx new file mode 100644 index 00000000..eb66dc58 --- /dev/null +++ b/ProjectLighthouse.Localization/General.lang-no-NO.resx @@ -0,0 +1,38 @@ + + + + + + + + + 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 + + \ No newline at end of file diff --git a/ProjectLighthouse.Localization/General.lang-pl-PL.resx b/ProjectLighthouse.Localization/General.lang-pl-PL.resx new file mode 100644 index 00000000..b3c93d7c --- /dev/null +++ b/ProjectLighthouse.Localization/General.lang-pl-PL.resx @@ -0,0 +1,38 @@ + + + + + + + + + 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 + + \ No newline at end of file diff --git a/ProjectLighthouse.Localization/General.lang-pt-PT.resx b/ProjectLighthouse.Localization/General.lang-pt-PT.resx new file mode 100644 index 00000000..261f6594 --- /dev/null +++ b/ProjectLighthouse.Localization/General.lang-pt-PT.resx @@ -0,0 +1,38 @@ + + + + + + + + + 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 + + + Nome do utilizador + + + Palavra-chave + + + Cadastrar + + + Esqueceu a palavra-passe? + + + Essa não! + + + Iniciar Sessão + + \ No newline at end of file diff --git a/ProjectLighthouse.Localization/General.lang-ru-RU.resx b/ProjectLighthouse.Localization/General.lang-ru-RU.resx new file mode 100644 index 00000000..90aeb7d2 --- /dev/null +++ b/ProjectLighthouse.Localization/General.lang-ru-RU.resx @@ -0,0 +1,38 @@ + + + + + + + + + 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 + + + Имя пользователя + + + Пароль + + + Регистр + + + Забыли пароль? + + + Упс! + + + Вход + + \ No newline at end of file diff --git a/ProjectLighthouse.Localization/General.lang-sv-SE.resx b/ProjectLighthouse.Localization/General.lang-sv-SE.resx new file mode 100644 index 00000000..3c2b250f --- /dev/null +++ b/ProjectLighthouse.Localization/General.lang-sv-SE.resx @@ -0,0 +1,38 @@ + + + + + + + + + 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 + + + Användarnamn + + + Lösenord + + + Registrera + + + Glömt lösenordet? + + + Ajdå! + + + Logga in + + \ No newline at end of file diff --git a/ProjectLighthouse.Localization/General.lang-zh-CN.resx b/ProjectLighthouse.Localization/General.lang-zh-CN.resx new file mode 100644 index 00000000..f2ff702f --- /dev/null +++ b/ProjectLighthouse.Localization/General.lang-zh-CN.resx @@ -0,0 +1,38 @@ + + + + + + + + + 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 + + + 用户名 + + + Password + + + Register + + + 忘记密码? + + + 哎呀! + + + 登入 + + \ No newline at end of file diff --git a/ProjectLighthouse.Localization/General.resx b/ProjectLighthouse.Localization/General.resx new file mode 100644 index 00000000..2e014ac5 --- /dev/null +++ b/ProjectLighthouse.Localization/General.resx @@ -0,0 +1,39 @@ + + + + + + + + + + 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 + + \ No newline at end of file diff --git a/ProjectLighthouse.Localization/LandingPage.lang-ar-SA.resx b/ProjectLighthouse.Localization/LandingPage.lang-ar-SA.resx new file mode 100644 index 00000000..ed7772d2 --- /dev/null +++ b/ProjectLighthouse.Localization/LandingPage.lang-ar-SA.resx @@ -0,0 +1,62 @@ + + + + + + + + + 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 + + + + + Welcome to {0}! + A greeting on the main page of the website. + + + + You are currently logged in as {0}. + A greeting on the main page of the website. + + + + There are no users online. Why not hop on? + A greeting on the main page of the website. + + + + There is 1 user currently online: + A greeting on the main page of the website. + + + + There are currently {0} users online: + A greeting on the main page of the website. + + + + You have {0} authentication attempts pending. Click here to view them. + A greeting on the main page of the website. + + + + Newest Levels + + + + Latest Team Picks + + \ No newline at end of file diff --git a/ProjectLighthouse.Localization/LandingPage.lang-da-DK.resx b/ProjectLighthouse.Localization/LandingPage.lang-da-DK.resx new file mode 100644 index 00000000..160394c2 --- /dev/null +++ b/ProjectLighthouse.Localization/LandingPage.lang-da-DK.resx @@ -0,0 +1,62 @@ + + + + + + + + + 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 + + + + + Velkommen til {0}! + A greeting on the main page of the website. + + + + Du er i øjeblikket logget ind som {0}. + A greeting on the main page of the website. + + + + Der er ingen brugere online. Hvorfor ikke hoppe på? + A greeting on the main page of the website. + + + + Der er 1 bruger online: + A greeting on the main page of the website. + + + + Der er {0} brugere online: + A greeting on the main page of the website. + + + + Du har {0} godkendelsesforsøg afventende. Klik her for at se dem. + A greeting on the main page of the website. + + + + Seneste Baner + + + + Seneste Team Picks + + \ No newline at end of file diff --git a/ProjectLighthouse.Localization/LandingPage.lang-de-DE.resx b/ProjectLighthouse.Localization/LandingPage.lang-de-DE.resx new file mode 100644 index 00000000..ed7772d2 --- /dev/null +++ b/ProjectLighthouse.Localization/LandingPage.lang-de-DE.resx @@ -0,0 +1,62 @@ + + + + + + + + + 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 + + + + + Welcome to {0}! + A greeting on the main page of the website. + + + + You are currently logged in as {0}. + A greeting on the main page of the website. + + + + There are no users online. Why not hop on? + A greeting on the main page of the website. + + + + There is 1 user currently online: + A greeting on the main page of the website. + + + + There are currently {0} users online: + A greeting on the main page of the website. + + + + You have {0} authentication attempts pending. Click here to view them. + A greeting on the main page of the website. + + + + Newest Levels + + + + Latest Team Picks + + \ No newline at end of file diff --git a/ProjectLighthouse.Localization/LandingPage.lang-eo-UY.resx b/ProjectLighthouse.Localization/LandingPage.lang-eo-UY.resx new file mode 100644 index 00000000..17c09a1d --- /dev/null +++ b/ProjectLighthouse.Localization/LandingPage.lang-eo-UY.resx @@ -0,0 +1,62 @@ + + + + + + + + + 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 + + + + + Welcome to {0}! + A greeting on the main page of the website. + + + + Vi ensalutinta kiel {0}. + A greeting on the main page of the website. + + + + Ne estas uzantoj enretaj. Kial ne sursalti? + A greeting on the main page of the website. + + + + Estas 1 uzanto enreta: + A greeting on the main page of the website. + + + + Estas {0} uzantoj enretaj: + A greeting on the main page of the website. + + + + Vi havas {0} pritraktatajn aŭtentigajn provojn. Klaku ĉi tie por vidi ilin. + A greeting on the main page of the website. + + + + Newest Levels + + + + Latest Team Picks + + \ No newline at end of file diff --git a/ProjectLighthouse.Localization/LandingPage.lang-es-MX.resx b/ProjectLighthouse.Localization/LandingPage.lang-es-MX.resx new file mode 100644 index 00000000..874ee983 --- /dev/null +++ b/ProjectLighthouse.Localization/LandingPage.lang-es-MX.resx @@ -0,0 +1,62 @@ + + + + + + + + + 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 + + + + + Welcome to {0}! + A greeting on the main page of the website. + + + + Estás conectado actualmente como {0} + A greeting on the main page of the website. + + + + No hay usuarios en línea. ¿Por qué no subirse? + A greeting on the main page of the website. + + + + Hay 1 usuario actualmente en línea: + A greeting on the main page of the website. + + + + Actualmente hay {0} usuarios en línea: + A greeting on the main page of the website. + + + + Tiene {0} intentos de autenticación pendientes. Haga clic aquí para verlos. + A greeting on the main page of the website. + + + + Newest Levels + + + + Latest Team Picks + + \ No newline at end of file diff --git a/ProjectLighthouse.Localization/LandingPage.lang-fil-PH.resx b/ProjectLighthouse.Localization/LandingPage.lang-fil-PH.resx new file mode 100644 index 00000000..ed7772d2 --- /dev/null +++ b/ProjectLighthouse.Localization/LandingPage.lang-fil-PH.resx @@ -0,0 +1,62 @@ + + + + + + + + + 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 + + + + + Welcome to {0}! + A greeting on the main page of the website. + + + + You are currently logged in as {0}. + A greeting on the main page of the website. + + + + There are no users online. Why not hop on? + A greeting on the main page of the website. + + + + There is 1 user currently online: + A greeting on the main page of the website. + + + + There are currently {0} users online: + A greeting on the main page of the website. + + + + You have {0} authentication attempts pending. Click here to view them. + A greeting on the main page of the website. + + + + Newest Levels + + + + Latest Team Picks + + \ No newline at end of file diff --git a/ProjectLighthouse.Localization/LandingPage.lang-fr-FR.resx b/ProjectLighthouse.Localization/LandingPage.lang-fr-FR.resx new file mode 100644 index 00000000..ed7772d2 --- /dev/null +++ b/ProjectLighthouse.Localization/LandingPage.lang-fr-FR.resx @@ -0,0 +1,62 @@ + + + + + + + + + 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 + + + + + Welcome to {0}! + A greeting on the main page of the website. + + + + You are currently logged in as {0}. + A greeting on the main page of the website. + + + + There are no users online. Why not hop on? + A greeting on the main page of the website. + + + + There is 1 user currently online: + A greeting on the main page of the website. + + + + There are currently {0} users online: + A greeting on the main page of the website. + + + + You have {0} authentication attempts pending. Click here to view them. + A greeting on the main page of the website. + + + + Newest Levels + + + + Latest Team Picks + + \ No newline at end of file diff --git a/ProjectLighthouse.Localization/LandingPage.lang-ga-IE.resx b/ProjectLighthouse.Localization/LandingPage.lang-ga-IE.resx new file mode 100644 index 00000000..ed7772d2 --- /dev/null +++ b/ProjectLighthouse.Localization/LandingPage.lang-ga-IE.resx @@ -0,0 +1,62 @@ + + + + + + + + + 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 + + + + + Welcome to {0}! + A greeting on the main page of the website. + + + + You are currently logged in as {0}. + A greeting on the main page of the website. + + + + There are no users online. Why not hop on? + A greeting on the main page of the website. + + + + There is 1 user currently online: + A greeting on the main page of the website. + + + + There are currently {0} users online: + A greeting on the main page of the website. + + + + You have {0} authentication attempts pending. Click here to view them. + A greeting on the main page of the website. + + + + Newest Levels + + + + Latest Team Picks + + \ No newline at end of file diff --git a/ProjectLighthouse.Localization/LandingPage.lang-gd-GB.resx b/ProjectLighthouse.Localization/LandingPage.lang-gd-GB.resx new file mode 100644 index 00000000..ed7772d2 --- /dev/null +++ b/ProjectLighthouse.Localization/LandingPage.lang-gd-GB.resx @@ -0,0 +1,62 @@ + + + + + + + + + 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 + + + + + Welcome to {0}! + A greeting on the main page of the website. + + + + You are currently logged in as {0}. + A greeting on the main page of the website. + + + + There are no users online. Why not hop on? + A greeting on the main page of the website. + + + + There is 1 user currently online: + A greeting on the main page of the website. + + + + There are currently {0} users online: + A greeting on the main page of the website. + + + + You have {0} authentication attempts pending. Click here to view them. + A greeting on the main page of the website. + + + + Newest Levels + + + + Latest Team Picks + + \ No newline at end of file diff --git a/ProjectLighthouse.Localization/LandingPage.lang-ja-JP.resx b/ProjectLighthouse.Localization/LandingPage.lang-ja-JP.resx new file mode 100644 index 00000000..3611578d --- /dev/null +++ b/ProjectLighthouse.Localization/LandingPage.lang-ja-JP.resx @@ -0,0 +1,62 @@ + + + + + + + + + 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 + + + + + {0}へようこそ + A greeting on the main page of the website. + + + + {0}がログインしています + A greeting on the main page of the website. + + + + オンラインユーザーはなし + A greeting on the main page of the website. + + + + 1人のユーザーがオンライン + A greeting on the main page of the website. + + + + {0}人のユーザーがオンライン + A greeting on the main page of the website. + + + + {0} の認証が保留中です。ここをクリックして確認してください。 + A greeting on the main page of the website. + + + + 最新のレベル + + + + 最新のチームピック + + \ No newline at end of file diff --git a/ProjectLighthouse.Localization/LandingPage.lang-no-NO.resx b/ProjectLighthouse.Localization/LandingPage.lang-no-NO.resx new file mode 100644 index 00000000..bb049a4d --- /dev/null +++ b/ProjectLighthouse.Localization/LandingPage.lang-no-NO.resx @@ -0,0 +1,62 @@ + + + + + + + + + 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 + + + + + Velkommen til {0} + A greeting on the main page of the website. + + + + Du er logget inn som {0} + A greeting on the main page of the website. + + + + Det er ingen brukere på. Hvorfor ikke hoppe på? + A greeting on the main page of the website. + + + + Det er 1 bruker på for øyeblikket: + A greeting on the main page of the website. + + + + For tiden er {0} brukere pålogget: + A greeting on the main page of the website. + + + + Du har {0} autentiseringsforsøk. Klikk her for å se dem. + A greeting on the main page of the website. + + + + Nyeste nivåer + + + + Siste lag valg + + \ No newline at end of file diff --git a/ProjectLighthouse.Localization/LandingPage.lang-pl-PL.resx b/ProjectLighthouse.Localization/LandingPage.lang-pl-PL.resx new file mode 100644 index 00000000..3ec4379d --- /dev/null +++ b/ProjectLighthouse.Localization/LandingPage.lang-pl-PL.resx @@ -0,0 +1,62 @@ + + + + + + + + + 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 + + + + + Welcome to {0}! + A greeting on the main page of the website. + + + + Jesteś zalogowany jako {0}. + A greeting on the main page of the website. + + + + Nikt nie jest online. Dlaczego by nie zagrać? + A greeting on the main page of the website. + + + + Jest 1 gracz online: + A greeting on the main page of the website. + + + + Obecnie jest {0} graczy online: + A greeting on the main page of the website. + + + + Masz {0} oczekujących prób autoryzacji. Kliknij tutaj, by je zobaczyć. + A greeting on the main page of the website. + + + + Newest Levels + + + + Latest Team Picks + + \ No newline at end of file diff --git a/ProjectLighthouse.Localization/LandingPage.lang-pt-PT.resx b/ProjectLighthouse.Localization/LandingPage.lang-pt-PT.resx new file mode 100644 index 00000000..9e0b0918 --- /dev/null +++ b/ProjectLighthouse.Localization/LandingPage.lang-pt-PT.resx @@ -0,0 +1,62 @@ + + + + + + + + + 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 + + + + + Bem-vindo ao {0}! + A greeting on the main page of the website. + + + + Você está logado como {0}. + A greeting on the main page of the website. + + + + Não há utilizadores online. Por que não entrar? + A greeting on the main page of the website. + + + + Há 1 utilizador online no momento: + A greeting on the main page of the website. + + + + Atualmente, existem {0} utilizadores ‘ligado’: + A greeting on the main page of the website. + + + + Você tem {0} tentativas de acesso pendentes. Clique aqui para visualizá-las. + A greeting on the main page of the website. + + + + Níveis novos + + + + Escolhas mais recentes da equipa + + \ No newline at end of file diff --git a/ProjectLighthouse.Localization/LandingPage.lang-ru-RU.resx b/ProjectLighthouse.Localization/LandingPage.lang-ru-RU.resx new file mode 100644 index 00000000..f7628214 --- /dev/null +++ b/ProjectLighthouse.Localization/LandingPage.lang-ru-RU.resx @@ -0,0 +1,62 @@ + + + + + + + + + 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 + + + + + Добро пожаловать в {0} + A greeting on the main page of the website. + + + + Вы вошли как {0} + A greeting on the main page of the website. + + + + Нет пользователей в сети. Почему бы и не поиграть? + A greeting on the main page of the website. + + + + Сейчас в сети 1 пользователь: + A greeting on the main page of the website. + + + + В настоящее время сейчас {0} онлайн: + A greeting on the main page of the website. + + + + У вас есть {0} попыток аутентификации в ожидании. Нажмите здесь, чтобы просмотреть их. + A greeting on the main page of the website. + + + + Новые уровни + + + + Последние избранное + + \ No newline at end of file diff --git a/ProjectLighthouse.Localization/LandingPage.lang-sv-SE.resx b/ProjectLighthouse.Localization/LandingPage.lang-sv-SE.resx new file mode 100644 index 00000000..ca1cae9d --- /dev/null +++ b/ProjectLighthouse.Localization/LandingPage.lang-sv-SE.resx @@ -0,0 +1,62 @@ + + + + + + + + + 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 + + + + + Välkommen till {0}! + A greeting on the main page of the website. + + + + Du är inloggad som {0}. + A greeting on the main page of the website. + + + + Ingen är online. Dags att gibba? + A greeting on the main page of the website. + + + + 1 användare är online: + A greeting on the main page of the website. + + + + {0} användare är online: + A greeting on the main page of the website. + + + + {0} autentiseringsförsök väntar. Klicka här för att visa dem. + A greeting on the main page of the website. + + + + Senaste Banor + + + + Senaste Team Picks + + \ No newline at end of file diff --git a/ProjectLighthouse.Localization/LandingPage.lang-zh-CN.resx b/ProjectLighthouse.Localization/LandingPage.lang-zh-CN.resx new file mode 100644 index 00000000..ed7772d2 --- /dev/null +++ b/ProjectLighthouse.Localization/LandingPage.lang-zh-CN.resx @@ -0,0 +1,62 @@ + + + + + + + + + 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 + + + + + Welcome to {0}! + A greeting on the main page of the website. + + + + You are currently logged in as {0}. + A greeting on the main page of the website. + + + + There are no users online. Why not hop on? + A greeting on the main page of the website. + + + + There is 1 user currently online: + A greeting on the main page of the website. + + + + There are currently {0} users online: + A greeting on the main page of the website. + + + + You have {0} authentication attempts pending. Click here to view them. + A greeting on the main page of the website. + + + + Newest Levels + + + + Latest Team Picks + + \ No newline at end of file diff --git a/ProjectLighthouse.Localization/LandingPage.resx b/ProjectLighthouse.Localization/LandingPage.resx new file mode 100644 index 00000000..287660e3 --- /dev/null +++ b/ProjectLighthouse.Localization/LandingPage.resx @@ -0,0 +1,64 @@ + + + + + + + + + + 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 + + + + + Welcome to {0}! + A greeting on the main page of the website. + + + + You are currently logged in as {0}. + A greeting on the main page of the website. + + + + There are no users online. Why not hop on? + A greeting on the main page of the website. + + + + There is 1 user currently online: + A greeting on the main page of the website. + + + + There are currently {0} users online: + A greeting on the main page of the website. + + + + You have {0} authentication attempts pending. Click here to view them. + A greeting on the main page of the website. + + + + Newest Levels + + + + Latest Team Picks + + \ No newline at end of file diff --git a/ProjectLighthouse.Localization/LocalizationManager.cs b/ProjectLighthouse.Localization/LocalizationManager.cs new file mode 100644 index 00000000..ba24ae58 --- /dev/null +++ b/ProjectLighthouse.Localization/LocalizationManager.cs @@ -0,0 +1,126 @@ +using System.Diagnostics; +using System.Reflection; +using System.Resources; + +namespace LBPUnion.ProjectLighthouse.Localization; + +public static class LocalizationManager +{ + private static readonly string namespaceStr = typeof(LocalizationManager).Namespace ?? ""; + public const string DefaultLang = "en-US"; + + public static string GetLocalizedString(TranslationAreas translationArea, string language, string key) + { + // ASP.NET requires specific names for certain languages (like ja for japanese as opposed to the standard ja-JP) + // We map that value back here. + language = mapLanguageBack(language); + + #if DEBUG + Console.WriteLine($"Attempting to load '{key}' for '{language}'"); + #endif + + string resourceBasename = $"{namespaceStr}.{translationArea.ToString()}"; + + // We don't have an en-US .resx, so if we aren't using en-US then we need to add the appropriate language. + // Otherwise, keep it to the normal .resx file + // e.g. BaseLayout.resx as opposed to BaseLayout.lang-da-DK.resx. + if (language != DefaultLang) resourceBasename += $".lang-{language}"; + + string? localizedString = null; + try + { + ResourceManager resourceManager = new(resourceBasename, + Assembly.GetExecutingAssembly()); + + localizedString = resourceManager.GetString(key); + } + catch + { + // ignored + } + + if (localizedString == null) + { + #if DEBUG + if (Debugger.IsAttached) Debugger.Break(); + #endif + return $"{translationArea.ToString()}.{language}.{key}"; + } + + return localizedString; + } + + // If a language isn't working, it might be because a language is using a different name than what ASP.NET expects. + // You can retrieve the name of the language from the Accept-Language header in an HTTP request. + private static readonly Dictionary languageMappings = new() + { + { + "ja-JP", "ja" + }, + { + "eo-UY", "eo" + }, + { + "ru-RU", "ru" + }, + { + "pt-PT", "pt" + }, + { + "no-NO", "no" + }, + { + "pl-PL", "pl" + }, + { + "fr-FR", "fr" + }, + { + "de-DE", "de" + } + }; + + /// + /// Some languages crowdin uses have names that differ from the ones that ASP.NET expects. This function converts the names. + /// + /// The language to convert to ASP.NET names + /// The name of the language that ASP.NET expects. + public static string MapLanguage(string language) + { + foreach ((string? key, string? value) in languageMappings) + { + if (key == language) return value; + } + + return language; + } + + private static string mapLanguageBack(string language) + { + foreach ((string? key, string? value) in languageMappings) + { + if (value == language) return key; + } + + return language; + } + + // This is a bit scuffed, but it will work for what I need it to do. + public static IEnumerable GetAvailableLanguages() + { + string area = TranslationAreas.BaseLayout.ToString(); + + List languages = Assembly.GetExecutingAssembly() + .GetManifestResourceNames() + .Where(r => r.StartsWith($"{namespaceStr}.{area}")) + .Select(r => r.Substring(r.IndexOf(area), r.Length - r.IndexOf(area)).Substring(area.Length + 1)) + .Select(r => r.Replace(".resources", string.Empty)) // Remove .resources + .Select(r => r.Replace("lang-", string.Empty)) // Remove 'lang-' prefix from languages + .Where(r => r != "resources") + .ToList(); + + languages.Add(DefaultLang); + + return languages; + } +} \ No newline at end of file diff --git a/ProjectLighthouse.Localization/LoggedOut.lang-ar-SA.resx b/ProjectLighthouse.Localization/LoggedOut.lang-ar-SA.resx new file mode 100644 index 00000000..9f53122d --- /dev/null +++ b/ProjectLighthouse.Localization/LoggedOut.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 + + + Logged Out + + + You have been successfully logged out. You will be redirected in 5 seconds, or you may click below to do so manually. + + + Redirect + + \ No newline at end of file diff --git a/ProjectLighthouse.Localization/LoggedOut.lang-da-DK.resx b/ProjectLighthouse.Localization/LoggedOut.lang-da-DK.resx new file mode 100644 index 00000000..2c1315cd --- /dev/null +++ b/ProjectLighthouse.Localization/LoggedOut.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 + + + Logget ud + + + Du er blevet logget ud. Du vil blive omdirigeret om 5 sekunder, eller du kan klikke nedenfor for at gøre det manuelt. + + + Omdiriger + + \ No newline at end of file diff --git a/ProjectLighthouse.Localization/LoggedOut.lang-de-DE.resx b/ProjectLighthouse.Localization/LoggedOut.lang-de-DE.resx new file mode 100644 index 00000000..9f53122d --- /dev/null +++ b/ProjectLighthouse.Localization/LoggedOut.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 + + + Logged Out + + + You have been successfully logged out. You will be redirected in 5 seconds, or you may click below to do so manually. + + + Redirect + + \ No newline at end of file diff --git a/ProjectLighthouse.Localization/LoggedOut.lang-eo-UY.resx b/ProjectLighthouse.Localization/LoggedOut.lang-eo-UY.resx new file mode 100644 index 00000000..9f53122d --- /dev/null +++ b/ProjectLighthouse.Localization/LoggedOut.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 + + + Logged Out + + + You have been successfully logged out. You will be redirected in 5 seconds, or you may click below to do so manually. + + + Redirect + + \ No newline at end of file diff --git a/ProjectLighthouse.Localization/LoggedOut.lang-es-MX.resx b/ProjectLighthouse.Localization/LoggedOut.lang-es-MX.resx new file mode 100644 index 00000000..9f53122d --- /dev/null +++ b/ProjectLighthouse.Localization/LoggedOut.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 + + + Logged Out + + + You have been successfully logged out. You will be redirected in 5 seconds, or you may click below to do so manually. + + + Redirect + + \ No newline at end of file diff --git a/ProjectLighthouse.Localization/LoggedOut.lang-fil-PH.resx b/ProjectLighthouse.Localization/LoggedOut.lang-fil-PH.resx new file mode 100644 index 00000000..9f53122d --- /dev/null +++ b/ProjectLighthouse.Localization/LoggedOut.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 + + + Logged Out + + + You have been successfully logged out. You will be redirected in 5 seconds, or you may click below to do so manually. + + + Redirect + + \ No newline at end of file diff --git a/ProjectLighthouse.Localization/LoggedOut.lang-fr-FR.resx b/ProjectLighthouse.Localization/LoggedOut.lang-fr-FR.resx new file mode 100644 index 00000000..9f53122d --- /dev/null +++ b/ProjectLighthouse.Localization/LoggedOut.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 + + + Logged Out + + + You have been successfully logged out. You will be redirected in 5 seconds, or you may click below to do so manually. + + + Redirect + + \ No newline at end of file diff --git a/ProjectLighthouse.Localization/LoggedOut.lang-ga-IE.resx b/ProjectLighthouse.Localization/LoggedOut.lang-ga-IE.resx new file mode 100644 index 00000000..9f53122d --- /dev/null +++ b/ProjectLighthouse.Localization/LoggedOut.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 + + + Logged Out + + + You have been successfully logged out. You will be redirected in 5 seconds, or you may click below to do so manually. + + + Redirect + + \ No newline at end of file diff --git a/ProjectLighthouse.Localization/LoggedOut.lang-ja-JP.resx b/ProjectLighthouse.Localization/LoggedOut.lang-ja-JP.resx new file mode 100644 index 00000000..09810770 --- /dev/null +++ b/ProjectLighthouse.Localization/LoggedOut.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 + + + ログアウトしました + + + 正常にログアウトされました。5秒後にリダイレクトされるか、以下をクリックして手動でログアウトできます。 + + + リダイレクト + + \ No newline at end of file diff --git a/ProjectLighthouse.Localization/LoggedOut.lang-no-NO.resx b/ProjectLighthouse.Localization/LoggedOut.lang-no-NO.resx new file mode 100644 index 00000000..a33eb4e2 --- /dev/null +++ b/ProjectLighthouse.Localization/LoggedOut.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 + + + Logget ut + + + Du har blitt logget ut. Du vil bli omdirigert om 5 sekunder, eller du kan klikke nedenfor for å gjøre det manuelt. + + + Videresend + + \ No newline at end of file diff --git a/ProjectLighthouse.Localization/LoggedOut.lang-pl-PL.resx b/ProjectLighthouse.Localization/LoggedOut.lang-pl-PL.resx new file mode 100644 index 00000000..9f53122d --- /dev/null +++ b/ProjectLighthouse.Localization/LoggedOut.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 + + + Logged Out + + + You have been successfully logged out. You will be redirected in 5 seconds, or you may click below to do so manually. + + + Redirect + + \ No newline at end of file diff --git a/ProjectLighthouse.Localization/LoggedOut.lang-pt-PT.resx b/ProjectLighthouse.Localization/LoggedOut.lang-pt-PT.resx new file mode 100644 index 00000000..f125baa8 --- /dev/null +++ b/ProjectLighthouse.Localization/LoggedOut.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 + + + Sessão encerrada + + + Foi desconectado com sucesso. Será redirecionado em 5 segundos, ou pode clicar abaixo para fazê-lo manualmente. + + + Redirecionar + + \ No newline at end of file diff --git a/ProjectLighthouse.Localization/LoggedOut.lang-ru-RU.resx b/ProjectLighthouse.Localization/LoggedOut.lang-ru-RU.resx new file mode 100644 index 00000000..ba89348f --- /dev/null +++ b/ProjectLighthouse.Localization/LoggedOut.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 + + + Выход + + + Вы успешно вышли из системы. Вы будете перенаправлены через 5 секунд, или можете нажать ниже, чтобы сделать это вручную. + + + Перенаправить + + \ No newline at end of file diff --git a/ProjectLighthouse.Localization/LoggedOut.lang-sv-SE.resx b/ProjectLighthouse.Localization/LoggedOut.lang-sv-SE.resx new file mode 100644 index 00000000..50daa5ee --- /dev/null +++ b/ProjectLighthouse.Localization/LoggedOut.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 + + + Utloggad + + + Du har loggat ut. Om 5 sekunder kommer du bli omderigerad, eller kan du klicka på knappen under, manuellt. + + + Omdirigera + + \ No newline at end of file diff --git a/ProjectLighthouse.Localization/LoggedOut.lang-zh-CN.resx b/ProjectLighthouse.Localization/LoggedOut.lang-zh-CN.resx new file mode 100644 index 00000000..9f53122d --- /dev/null +++ b/ProjectLighthouse.Localization/LoggedOut.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 + + + Logged Out + + + You have been successfully logged out. You will be redirected in 5 seconds, or you may click below to do so manually. + + + Redirect + + \ No newline at end of file diff --git a/ProjectLighthouse.Localization/LoggedOut.resx b/ProjectLighthouse.Localization/LoggedOut.resx new file mode 100644 index 00000000..2d555c7e --- /dev/null +++ b/ProjectLighthouse.Localization/LoggedOut.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 + + + Logged Out + + + You have been successfully logged out. You will be redirected in 5 seconds, or you may click below to do so manually. + + + Redirect + + \ No newline at end of file diff --git a/ProjectLighthouse.Localization/Program.cs b/ProjectLighthouse.Localization/Program.cs new file mode 100644 index 00000000..a4603129 --- /dev/null +++ b/ProjectLighthouse.Localization/Program.cs @@ -0,0 +1,22 @@ +using System.Reflection; + +namespace LBPUnion.ProjectLighthouse.Localization; + +public static class Program +{ + public static void Main() + { + Console.WriteLine("Resource files loaded:"); + foreach (string resourceFile in Assembly.GetExecutingAssembly().GetManifestResourceNames()) + { + Console.WriteLine(" " + resourceFile); + } + + Console.Write('\n'); + + foreach (string language in LocalizationManager.GetAvailableLanguages()) + { + Console.WriteLine(LocalizationManager.GetLocalizedString(TranslationAreas.BaseLayout, language, "header_home")); + } + } +} \ No newline at end of file diff --git a/ProjectLighthouse.Localization/ProjectLighthouse.Localization.csproj b/ProjectLighthouse.Localization/ProjectLighthouse.Localization.csproj new file mode 100644 index 00000000..57dfbc18 --- /dev/null +++ b/ProjectLighthouse.Localization/ProjectLighthouse.Localization.csproj @@ -0,0 +1,26 @@ + + + + net6.0 + enable + enable + LBPUnion.ProjectLighthouse.Localization + Exe + + + + + ResXFileCodeGenerator + LandingPage.Designer.cs + + + ResXFileCodeGenerator + General.Designer.cs + + + ResXFileCodeGenerator + LoggedOut.Designer.cs + + + + diff --git a/ProjectLighthouse.Localization/StringLists/BaseLayoutStrings.cs b/ProjectLighthouse.Localization/StringLists/BaseLayoutStrings.cs new file mode 100644 index 00000000..91e56acc --- /dev/null +++ b/ProjectLighthouse.Localization/StringLists/BaseLayoutStrings.cs @@ -0,0 +1,17 @@ +namespace LBPUnion.ProjectLighthouse.Localization.StringLists; + +public static class BaseLayoutStrings +{ + public static readonly TranslatableString HeaderHome = create("header_home"); + public static readonly TranslatableString HeaderUsers = create("header_users"); + public static readonly TranslatableString HeaderPhotos = create("header_photos"); + public static readonly TranslatableString HeaderSlots = create("header_slots"); + public static readonly TranslatableString HeaderAuthentication = create("header_authentication"); + + public static readonly TranslatableString HeaderLoginRegister = create("header_loginRegister"); + public static readonly TranslatableString HeaderProfile = create("header_profile"); + public static readonly TranslatableString HeaderAdminPanel = create("header_adminPanel"); + public static readonly TranslatableString HeaderLogout = create("header_logout"); + + private static TranslatableString create(string key) => new(TranslationAreas.BaseLayout, key); +} \ No newline at end of file diff --git a/ProjectLighthouse.Localization/StringLists/GeneralStrings.cs b/ProjectLighthouse.Localization/StringLists/GeneralStrings.cs new file mode 100644 index 00000000..db134368 --- /dev/null +++ b/ProjectLighthouse.Localization/StringLists/GeneralStrings.cs @@ -0,0 +1,13 @@ +namespace LBPUnion.ProjectLighthouse.Localization.StringLists; + +public static class GeneralStrings +{ + public static readonly TranslatableString Username = create("username"); + public static readonly TranslatableString Password = create("password"); + public static readonly TranslatableString Register = create("register"); + public static readonly TranslatableString ForgotPassword = create("forgot_password"); + public static readonly TranslatableString Error = create("error"); + public static readonly TranslatableString LogIn = create("log_in"); + + private static TranslatableString create(string key) => new(TranslationAreas.General, key); +} \ No newline at end of file diff --git a/ProjectLighthouse.Localization/StringLists/LandingPageStrings.cs b/ProjectLighthouse.Localization/StringLists/LandingPageStrings.cs new file mode 100644 index 00000000..7ec962e8 --- /dev/null +++ b/ProjectLighthouse.Localization/StringLists/LandingPageStrings.cs @@ -0,0 +1,18 @@ +namespace LBPUnion.ProjectLighthouse.Localization.StringLists; + +public static class LandingPageStrings +{ + public static readonly TranslatableString Welcome = create("welcome"); + public static readonly TranslatableString LoggedInAs = create("loggedInAs"); + + public static readonly TranslatableString UsersNone = create("users_none"); + 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); +} \ No newline at end of file diff --git a/ProjectLighthouse.Localization/StringLists/LoggedOutStrings.cs b/ProjectLighthouse.Localization/StringLists/LoggedOutStrings.cs new file mode 100644 index 00000000..e8ae3bb9 --- /dev/null +++ b/ProjectLighthouse.Localization/StringLists/LoggedOutStrings.cs @@ -0,0 +1,10 @@ +namespace LBPUnion.ProjectLighthouse.Localization.StringLists; + +public static class LoggedOutStrings +{ + public static readonly TranslatableString LoggedOut = create("logged_out"); + public static readonly TranslatableString LoggedOutInfo = create("logged_out_info"); + public static readonly TranslatableString Redirect = create("redirect"); + + private static TranslatableString create(string key) => new(TranslationAreas.LoggedOut, key); +} \ No newline at end of file diff --git a/ProjectLighthouse.Localization/TranslatableString.cs b/ProjectLighthouse.Localization/TranslatableString.cs new file mode 100644 index 00000000..633a5eb4 --- /dev/null +++ b/ProjectLighthouse.Localization/TranslatableString.cs @@ -0,0 +1,27 @@ +namespace LBPUnion.ProjectLighthouse.Localization; + +public class TranslatableString +{ + public TranslatableString(TranslationAreas area, string key) + { + this.Key = key; + this.Area = area; + } + + public string Key { get; init; } + public TranslationAreas Area { get; init; } + + 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 + [Obsolete("Do not translate by using ToString. Use TranslatableString.Translate().", true)] + public override string ToString() => "NOT TRANSLATED CORRECTLY!"; + #pragma warning restore CS0809 + + [Obsolete("Do not translate by using ToString. Use TranslatableString.Translate().", true)] + public static implicit operator string(TranslatableString _) => "NOT TRANSLATED CORRECTLY!"; +} \ No newline at end of file diff --git a/ProjectLighthouse.Localization/TranslationAreas.cs b/ProjectLighthouse.Localization/TranslationAreas.cs new file mode 100644 index 00000000..ae90be13 --- /dev/null +++ b/ProjectLighthouse.Localization/TranslationAreas.cs @@ -0,0 +1,9 @@ +namespace LBPUnion.ProjectLighthouse.Localization; + +public enum TranslationAreas +{ + BaseLayout, + LandingPage, + General, + LoggedOut, +} \ No newline at end of file diff --git a/ProjectLighthouse.Servers.GameServer/Controllers/ReportController.cs b/ProjectLighthouse.Servers.GameServer/Controllers/ReportController.cs index 0b39c355..9883a7d7 100644 --- a/ProjectLighthouse.Servers.GameServer/Controllers/ReportController.cs +++ b/ProjectLighthouse.Servers.GameServer/Controllers/ReportController.cs @@ -2,6 +2,7 @@ using System.Text.Json; using System.Xml.Serialization; using LBPUnion.ProjectLighthouse.Administration.Reports; +using LBPUnion.ProjectLighthouse.Configuration; using LBPUnion.ProjectLighthouse.Helpers; using LBPUnion.ProjectLighthouse.PlayerData.Profiles; using LBPUnion.ProjectLighthouse.Types; @@ -45,6 +46,13 @@ public class ReportController : ControllerBase this.database.Reports.Add(report); await this.database.SaveChangesAsync(); + await WebhookHelper.SendWebhook( + title: "New grief report", + description: $"Submitted by {user.Username}\n" + + $"To view it, click [here]({ServerConfiguration.Instance.ExternalUrl}/admin/report/{report.ReportId}).", + dest: WebhookHelper.WebhookDestination.Moderation + ); + return this.Ok(); } diff --git a/ProjectLighthouse.Servers.Website/Pages/LandingPage.cshtml b/ProjectLighthouse.Servers.Website/Pages/LandingPage.cshtml index c881ae1e..60dbddf0 100644 --- a/ProjectLighthouse.Servers.Website/Pages/LandingPage.cshtml +++ b/ProjectLighthouse.Servers.Website/Pages/LandingPage.cshtml @@ -3,6 +3,7 @@ @using LBPUnion.ProjectLighthouse.Extensions @using LBPUnion.ProjectLighthouse.PlayerData.Profiles @using LBPUnion.ProjectLighthouse.Levels +@using LBPUnion.ProjectLighthouse.Localization.StringLists @model LBPUnion.ProjectLighthouse.Servers.Website.Pages.LandingPage @{ @@ -10,22 +11,22 @@ Model.ShowTitleInPage = false; bool isMobile = this.Request.IsMobile(); } -

Welcome to @ServerConfiguration.Instance.Customization.ServerName!

+

@Model.Translate(LandingPageStrings.Welcome, ServerConfiguration.Instance.Customization.ServerName)

@if (Model.User != null) { -

You are currently logged in as @Model.User.Username.

- if (ServerConfiguration.Instance.Authentication.UseExternalAuth && Model.AuthenticationAttemptsCount > 0) +

@Model.Translate(LandingPageStrings.LoggedInAs, Model.User.Username)

+ if (ServerConfiguration.Instance.Authentication.UseExternalAuth && Model.PendingAuthAttempts > 0) {

- You have @Model.AuthenticationAttemptsCount authentication attempts pending. Click here to view them. + @Model.Translate(LandingPageStrings.AuthAttemptsPending, Model.PendingAuthAttempts)

} } @if (Model.PlayersOnlineCount == 1) { -

There is 1 user currently online:

+

@Model.Translate(LandingPageStrings.UsersSingle)

@foreach (User user in Model.PlayersOnline) { @user.Username @@ -34,11 +35,11 @@ else if (Model.PlayersOnlineCount == 0) { -

There are no users online. Why not hop on?

+

@Model.Translate(LandingPageStrings.UsersNone)

} else { -

There are currently @Model.PlayersOnlineCount users online:

+

@Model.Translate(LandingPageStrings.UsersMultiple, Model.PlayersOnlineCount)

@foreach (User user in Model.PlayersOnline) { @user.Username @@ -50,7 +51,7 @@ else
-

Latest Team Picks

+

@Model.Translate(LandingPageStrings.LatestTeamPicks)

@foreach (Slot slot in Model.LatestTeamPicks!) @* Can't reach a point where this is null *@ @@ -67,7 +68,7 @@ else }
-

Newest Levels

+

@Model.Translate(LandingPageStrings.NewestLevels)

@foreach (Slot slot in Model.NewestLevels!) @* Can't reach a point where this is null *@ diff --git a/ProjectLighthouse.Servers.Website/Pages/LandingPage.cshtml.cs b/ProjectLighthouse.Servers.Website/Pages/LandingPage.cshtml.cs index 20b13dbc..fecee91b 100644 --- a/ProjectLighthouse.Servers.Website/Pages/LandingPage.cshtml.cs +++ b/ProjectLighthouse.Servers.Website/Pages/LandingPage.cshtml.cs @@ -15,7 +15,7 @@ public class LandingPage : BaseLayout public LandingPage(Database database) : base(database) {} - public int AuthenticationAttemptsCount; + public int PendingAuthAttempts; public List PlayersOnline = new(); public int PlayersOnlineCount; @@ -32,7 +32,7 @@ public class LandingPage : BaseLayout this.PlayersOnlineCount = await StatisticsHelper.RecentMatches(); if (user != null) - this.AuthenticationAttemptsCount = await this.Database.AuthenticationAttempts.Include + this.PendingAuthAttempts = await this.Database.AuthenticationAttempts.Include (a => a.GameToken) .CountAsync(a => a.GameToken.UserId == user.UserId); diff --git a/ProjectLighthouse.Servers.Website/Pages/Layouts/BaseLayout.cshtml b/ProjectLighthouse.Servers.Website/Pages/Layouts/BaseLayout.cshtml index 5b65cd09..5f9ca7f8 100644 --- a/ProjectLighthouse.Servers.Website/Pages/Layouts/BaseLayout.cshtml +++ b/ProjectLighthouse.Servers.Website/Pages/Layouts/BaseLayout.cshtml @@ -1,27 +1,28 @@ @using LBPUnion.ProjectLighthouse.Configuration @using LBPUnion.ProjectLighthouse.Extensions @using LBPUnion.ProjectLighthouse.Helpers +@using LBPUnion.ProjectLighthouse.Localization.StringLists @using LBPUnion.ProjectLighthouse.Types @model LBPUnion.ProjectLighthouse.Servers.Website.Pages.Layouts.BaseLayout @{ if (Model!.User == null) { - Model.NavigationItemsRight.Add(new PageNavigationItem("Login / Register", "/login", "sign in")); + Model.NavigationItemsRight.Add(new PageNavigationItem(BaseLayoutStrings.HeaderLoginRegister, "/login", "sign in")); } else { if (ServerConfiguration.Instance.Authentication.UseExternalAuth) { - Model.NavigationItems.Add(new PageNavigationItem("Authentication", "/authentication", "key")); + Model.NavigationItems.Add(new PageNavigationItem(BaseLayoutStrings.HeaderAuthentication, "/authentication", "key")); } - Model.NavigationItemsRight.Add(new PageNavigationItem("Profile", "/user/" + Model.User.UserId, "user alternate")); + Model.NavigationItemsRight.Add(new PageNavigationItem(BaseLayoutStrings.HeaderProfile, "/user/" + Model.User.UserId, "user alternate")); @if (Model.User.IsAdmin) { - Model.NavigationItemsRight.Add(new PageNavigationItem("Admin Panel", "/admin", "cogs")); + Model.NavigationItemsRight.Add(new PageNavigationItem(BaseLayoutStrings.HeaderAdminPanel, "/admin", "cogs")); } - Model.NavigationItemsRight.Add(new PageNavigationItem("Log out", "/logout", "user alternate slash")); // should always be last + Model.NavigationItemsRight.Add(new PageNavigationItem(BaseLayoutStrings.HeaderLogout, "/logout", "user alternate slash")); // should always be last } Model.IsMobile = Model.Request.IsMobile(); @@ -95,7 +96,7 @@ @if (!Model.IsMobile) { - @navigationItem.Name + @Model.Translate(navigationItem.Name) } } @@ -110,7 +111,7 @@ @if (!Model.IsMobile) { - @navigationItem.Name + @Model.Translate(navigationItem.Name) } } diff --git a/ProjectLighthouse.Servers.Website/Pages/Layouts/BaseLayout.cshtml.cs b/ProjectLighthouse.Servers.Website/Pages/Layouts/BaseLayout.cshtml.cs index 991692da..3537e4cb 100644 --- a/ProjectLighthouse.Servers.Website/Pages/Layouts/BaseLayout.cshtml.cs +++ b/ProjectLighthouse.Servers.Website/Pages/Layouts/BaseLayout.cshtml.cs @@ -1,22 +1,21 @@ #nullable enable +using System; +using System.Collections.Generic; +using LBPUnion.ProjectLighthouse.Configuration; +using LBPUnion.ProjectLighthouse.Localization; +using LBPUnion.ProjectLighthouse.Localization.StringLists; using LBPUnion.ProjectLighthouse.PlayerData.Profiles; using LBPUnion.ProjectLighthouse.Types; +using Microsoft.AspNetCore.Localization; using Microsoft.AspNetCore.Mvc.RazorPages; namespace LBPUnion.ProjectLighthouse.Servers.Website.Pages.Layouts; public class BaseLayout : PageModel { - public readonly Database Database; - public readonly List NavigationItems = new() - { - new PageNavigationItem("Home", "/", "home"), - new PageNavigationItem("Users", "/users/0", "user friends"), - new PageNavigationItem("Photos", "/photos/0", "camera"), - new PageNavigationItem("Levels", "/slots/0", "certificate"), - }; + public readonly List NavigationItems = new(); public readonly List NavigationItemsRight = new(); public string Description = string.Empty; @@ -31,6 +30,11 @@ public class BaseLayout : PageModel public BaseLayout(Database database) { this.Database = database; + + this.NavigationItems.Add(new PageNavigationItem(BaseLayoutStrings.HeaderHome, "/", "home")); + this.NavigationItems.Add(new PageNavigationItem(BaseLayoutStrings.HeaderUsers, "/users/0", "user friends")); + this.NavigationItems.Add(new PageNavigationItem(BaseLayoutStrings.HeaderPhotos, "/photos/0", "camera")); + this.NavigationItems.Add(new PageNavigationItem(BaseLayoutStrings.HeaderSlots, "/slots/0", "certificate")); } public new User? User { @@ -41,4 +45,17 @@ public class BaseLayout : PageModel } set => this.user = value; } + + private string getLanguage() + { + if (ServerStatics.IsUnitTesting) return "en-US"; + + IRequestCultureFeature? requestCulture = Request.HttpContext.Features.Get(); + + if (requestCulture == null) return LocalizationManager.DefaultLang; + return 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); } \ No newline at end of file diff --git a/ProjectLighthouse.Servers.Website/Pages/LoginForm.cshtml b/ProjectLighthouse.Servers.Website/Pages/LoginForm.cshtml index fbebba49..cedbbdc7 100644 --- a/ProjectLighthouse.Servers.Website/Pages/LoginForm.cshtml +++ b/ProjectLighthouse.Servers.Website/Pages/LoginForm.cshtml @@ -1,10 +1,11 @@ @page "/login" @using LBPUnion.ProjectLighthouse.Configuration +@using LBPUnion.ProjectLighthouse.Localization.StringLists @model LBPUnion.ProjectLighthouse.Servers.Website.Pages.LoginForm @{ Layout = "Layouts/BaseLayout"; - Model.Title = "Log in"; + Model.Title = Model.Translate(GeneralStrings.LogIn); } @@ -29,7 +30,7 @@ {
- Uh oh! + @Model.Translate(GeneralStrings.Error)

@Model.Error

@@ -40,17 +41,17 @@
- +
- +
- +
- +
@@ -62,13 +63,13 @@ }
- + @if (ServerConfiguration.Instance.Authentication.RegistrationEnabled) {
- Register + @Model.Translate(GeneralStrings.Register)
} @@ -76,7 +77,7 @@
- Forgot Password? + @Model.Translate(GeneralStrings.ForgotPassword)
\ No newline at end of file diff --git a/ProjectLighthouse.Servers.Website/Pages/LogoutPage.cshtml b/ProjectLighthouse.Servers.Website/Pages/LogoutPage.cshtml index 62f902c1..8854bcb0 100644 --- a/ProjectLighthouse.Servers.Website/Pages/LogoutPage.cshtml +++ b/ProjectLighthouse.Servers.Website/Pages/LogoutPage.cshtml @@ -1,10 +1,16 @@ @page "/logout" +@using LBPUnion.ProjectLighthouse.Localization.StringLists @model LBPUnion.ProjectLighthouse.Servers.Website.Pages.LogoutPage @{ Layout = "Layouts/BaseLayout"; - Model.Title = "Logged out"; + Model.Title = Model.Translate(LoggedOutStrings.LoggedOut); } -

You have been successfully logged out. You will be redirected in 5 seconds, or you may click here to do so manually.

+

@Model.Translate(LoggedOutStrings.LoggedOutInfo)

+ + + @Model.Translate(LoggedOutStrings.Redirect) + + \ No newline at end of file diff --git a/ProjectLighthouse.Servers.Website/Pages/Partials/RenderReportBoundsPartial.cshtml b/ProjectLighthouse.Servers.Website/Pages/Partials/RenderReportBoundsPartial.cshtml new file mode 100644 index 00000000..19387632 --- /dev/null +++ b/ProjectLighthouse.Servers.Website/Pages/Partials/RenderReportBoundsPartial.cshtml @@ -0,0 +1,147 @@ + \ No newline at end of file diff --git a/ProjectLighthouse.Servers.Website/Pages/Partials/ReportPartial.cshtml b/ProjectLighthouse.Servers.Website/Pages/Partials/ReportPartial.cshtml new file mode 100644 index 00000000..7059919e --- /dev/null +++ b/ProjectLighthouse.Servers.Website/Pages/Partials/ReportPartial.cshtml @@ -0,0 +1,63 @@ +@using LBPUnion.ProjectLighthouse.Administration.Reports +@model LBPUnion.ProjectLighthouse.Administration.Reports.GriefReport + +
+
+ + + Grief report picture +
+

+ + Report submitted by + + @Model.ReportingPlayer.Username + + +

+ Report contains @Model.XmlPlayers.Length @(Model.XmlPlayers.Length == 1 ? "player" : "players") + @foreach (ReportPlayer player in Model.XmlPlayers) + { + + } + +
+
+ Report time: @(DateTimeOffset.FromUnixTimeMilliseconds(Model.Timestamp).ToString("R")) +
+
+ Report reason: @Model.Type +
+
+ Level ID: @Model.LevelId +
+
+ Level type: @Model.LevelType +
+
+ Level owner: @Model.LevelOwner +
+
+ + + + Dismiss + + + + Remove all related assets + +
+ + diff --git a/ProjectLighthouse.Servers.Website/Pages/ReportPage.cshtml b/ProjectLighthouse.Servers.Website/Pages/ReportPage.cshtml new file mode 100644 index 00000000..738d1dd1 --- /dev/null +++ b/ProjectLighthouse.Servers.Website/Pages/ReportPage.cshtml @@ -0,0 +1,18 @@ +@page "/admin/report/{reportId:int}" +@model LBPUnion.ProjectLighthouse.Servers.Website.Pages.ReportPage + +@{ + Layout = "Layouts/BaseLayout"; + Model.Title = $"Report {Model.Report.ReportId}"; +} + + + +@await Html.PartialAsync("Partials/ReportPartial", Model.Report) +@await Html.PartialAsync("Partials/RenderReportBoundsPartial") \ No newline at end of file diff --git a/ProjectLighthouse.Servers.Website/Pages/ReportPage.cshtml.cs b/ProjectLighthouse.Servers.Website/Pages/ReportPage.cshtml.cs new file mode 100644 index 00000000..20f5cb4f --- /dev/null +++ b/ProjectLighthouse.Servers.Website/Pages/ReportPage.cshtml.cs @@ -0,0 +1,42 @@ +using System.Text.Json; +using LBPUnion.ProjectLighthouse.Administration.Reports; +using LBPUnion.ProjectLighthouse.PlayerData.Profiles; +using LBPUnion.ProjectLighthouse.Servers.Website.Pages.Layouts; +using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Mvc.RazorPages; +using Microsoft.EntityFrameworkCore; + +namespace LBPUnion.ProjectLighthouse.Servers.Website.Pages; + +public class ReportPage : BaseLayout +{ + public ReportPage(Database database) : base(database) + {} + + public GriefReport Report; + + public async Task OnGet([FromRoute] int reportId) + { + User? user = this.Database.UserFromWebRequest(this.Request); + if (user == null) return this.Redirect("~/login"); + if (!user.IsAdmin) return this.NotFound(); + + GriefReport? report = await this.Database.Reports + .Include(r => r.ReportingPlayer) + .FirstOrDefaultAsync(r => r.ReportId == reportId); + if (report == null) return this.NotFound(); + + report.XmlPlayers = (ReportPlayer[])JsonSerializer.Deserialize(report.Players, + typeof(ReportPlayer[]))!; + + report.XmlBounds = new Marqee + { + Rect = (Rectangle)JsonSerializer.Deserialize(report.Bounds, + typeof(Rectangle))!, + }; + + this.Report = report; + + return this.Page(); + } +} \ No newline at end of file diff --git a/ProjectLighthouse.Servers.Website/Pages/ReportsPage.cshtml b/ProjectLighthouse.Servers.Website/Pages/ReportsPage.cshtml index c413b58a..8193a398 100644 --- a/ProjectLighthouse.Servers.Website/Pages/ReportsPage.cshtml +++ b/ProjectLighthouse.Servers.Website/Pages/ReportsPage.cshtml @@ -28,214 +28,10 @@ @foreach (GriefReport report in Model.Reports) { -
-
- - - Grief report picture -
-

- - Report submitted by - - @report.ReportingPlayer.Username - - -

- Report contains @report.XmlPlayers.Length @(report.XmlPlayers.Length == 1 ? "player" : "players") - @foreach (ReportPlayer player in report.XmlPlayers) - { - - } - -
-
- Report time: @(DateTimeOffset.FromUnixTimeMilliseconds(report.Timestamp).ToString("R")) -
-
- Report reason: @report.Type -
-
- Level ID: @report.LevelId -
-
- Level type: @report.LevelType -
-
- Level owner: @report.LevelOwner -
-
- - - - Dismiss - - - - Remove all related assets - -
- + @await Html.PartialAsync("Partials/ReportPartial", report) } - +@await Html.PartialAsync("Partials/RenderReportBoundsPartial") @if (Model.PageNumber != 0) { diff --git a/ProjectLighthouse.Servers.Website/ProjectLighthouse.Servers.Website.csproj b/ProjectLighthouse.Servers.Website/ProjectLighthouse.Servers.Website.csproj index f94e0f90..4497d707 100644 --- a/ProjectLighthouse.Servers.Website/ProjectLighthouse.Servers.Website.csproj +++ b/ProjectLighthouse.Servers.Website/ProjectLighthouse.Servers.Website.csproj @@ -10,6 +10,7 @@ + diff --git a/ProjectLighthouse.Servers.Website/Startup/WebsiteStartup.cs b/ProjectLighthouse.Servers.Website/Startup/WebsiteStartup.cs index 97b813cc..f1f80025 100644 --- a/ProjectLighthouse.Servers.Website/Startup/WebsiteStartup.cs +++ b/ProjectLighthouse.Servers.Website/Startup/WebsiteStartup.cs @@ -1,5 +1,8 @@ +using System.Globalization; +using LBPUnion.ProjectLighthouse.Localization; using LBPUnion.ProjectLighthouse.Middlewares; using Microsoft.AspNetCore.HttpOverrides; +using Microsoft.AspNetCore.Localization; #if !DEBUG using Microsoft.Extensions.Hosting.Internal; @@ -38,6 +41,16 @@ public class WebsiteStartup } ); + services.Configure(config => + { + List languages = LocalizationManager.GetAvailableLanguages().Select(l => new CultureInfo(LocalizationManager.MapLanguage(l))).ToList(); + + config.DefaultRequestCulture = new RequestCulture(new CultureInfo("en-US")); + + config.SupportedCultures = languages; + config.SupportedUICultures = languages; + }); + #if DEBUG services.AddSingleton(); #else @@ -63,6 +76,8 @@ public class WebsiteStartup ServeUnknownFileTypes = true, }); + app.UseRequestLocalization(); + app.UseEndpoints(endpoints => endpoints.MapControllers()); app.UseEndpoints(endpoints => endpoints.MapRazorPages()); } diff --git a/ProjectLighthouse.Tests.WebsiteTests/Tests/AuthenticationTests.cs b/ProjectLighthouse.Tests.WebsiteTests/Tests/AuthenticationTests.cs index 35a20bb4..af4c9af2 100644 --- a/ProjectLighthouse.Tests.WebsiteTests/Tests/AuthenticationTests.cs +++ b/ProjectLighthouse.Tests.WebsiteTests/Tests/AuthenticationTests.cs @@ -78,7 +78,7 @@ public class AuthenticationTests : LighthouseWebTest [DatabaseFact] public async Task ShouldLoginWithInjectedCookie() { - const string loggedInAsUsernameTextXPath = "/html/body/div/div/div/p[1]/b"; + const string loggedInAsUsernameTextXPath = "/html/body/div/div/div/p[1]"; await using Database database = new(); Random random = new(); @@ -96,10 +96,10 @@ public class AuthenticationTests : LighthouseWebTest INavigation navigation = this.Driver.Navigate(); navigation.GoToUrl(this.BaseAddress + "/"); + Assert.DoesNotContain(user.Username, this.Driver.FindElement(By.XPath(loggedInAsUsernameTextXPath)).Text); this.Driver.Manage().Cookies.AddCookie(new Cookie("LighthouseToken", webToken.UserToken)); - Assert.Throws(() => this.Driver.FindElement(By.XPath(loggedInAsUsernameTextXPath))); navigation.Refresh(); - Assert.True(this.Driver.FindElement(By.XPath(loggedInAsUsernameTextXPath)).Text == user.Username); + Assert.Contains(user.Username, this.Driver.FindElement(By.XPath(loggedInAsUsernameTextXPath)).Text); await database.RemoveUser(user); } diff --git a/ProjectLighthouse.sln b/ProjectLighthouse.sln index b2f58bdc..4f163398 100644 --- a/ProjectLighthouse.sln +++ b/ProjectLighthouse.sln @@ -20,6 +20,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Servers", "Servers", "{1DE7 EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Source Code", "Source Code", "{7805B410-9260-4907-A7C6-D739369B2F25}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ProjectLighthouse.Localization", "ProjectLighthouse.Localization\ProjectLighthouse.Localization.csproj", "{18B76DAC-5DCB-44EA-B74D-0B4554BB161C}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -51,6 +53,10 @@ Global {FA9AEA06-D6B5-4E68-8370-DB9188108635}.Debug|Any CPU.Build.0 = Debug|Any CPU {FA9AEA06-D6B5-4E68-8370-DB9188108635}.Release|Any CPU.ActiveCfg = Release|Any CPU {FA9AEA06-D6B5-4E68-8370-DB9188108635}.Release|Any CPU.Build.0 = Release|Any CPU + {18B76DAC-5DCB-44EA-B74D-0B4554BB161C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {18B76DAC-5DCB-44EA-B74D-0B4554BB161C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {18B76DAC-5DCB-44EA-B74D-0B4554BB161C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {18B76DAC-5DCB-44EA-B74D-0B4554BB161C}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(NestedProjects) = preSolution {AFC74569-B289-4ACC-B21C-313A3A62C017} = {D360C08E-EA47-43AC-A566-FDF413442980} @@ -61,5 +67,6 @@ Global {FA9AEA06-D6B5-4E68-8370-DB9188108635} = {1DE7A758-1F4F-4BA5-BE1C-74F9D0AB9EA3} {1DE7A758-1F4F-4BA5-BE1C-74F9D0AB9EA3} = {7805B410-9260-4907-A7C6-D739369B2F25} {C6CFD4AD-47ED-4C86-B0C4-A4216D82E0DC} = {7805B410-9260-4907-A7C6-D739369B2F25} + {18B76DAC-5DCB-44EA-B74D-0B4554BB161C} = {7805B410-9260-4907-A7C6-D739369B2F25} EndGlobalSection EndGlobal diff --git a/ProjectLighthouse/Configuration/ConfigurationCategories/DiscordIntegrationConfiguration.cs b/ProjectLighthouse/Configuration/ConfigurationCategories/DiscordIntegrationConfiguration.cs index 92246899..1454338d 100644 --- a/ProjectLighthouse/Configuration/ConfigurationCategories/DiscordIntegrationConfiguration.cs +++ b/ProjectLighthouse/Configuration/ConfigurationCategories/DiscordIntegrationConfiguration.cs @@ -8,4 +8,6 @@ public class DiscordIntegrationConfiguration public bool DiscordIntegrationEnabled { get; set; } public string Url { get; set; } = ""; + + public string ModerationUrl { get; set; } = ""; } \ No newline at end of file diff --git a/ProjectLighthouse/Configuration/ServerConfiguration.cs b/ProjectLighthouse/Configuration/ServerConfiguration.cs index 30c5ee41..41618860 100644 --- a/ProjectLighthouse/Configuration/ServerConfiguration.cs +++ b/ProjectLighthouse/Configuration/ServerConfiguration.cs @@ -23,7 +23,7 @@ public class ServerConfiguration // You can use an ObsoleteAttribute instead. Make sure you set it to error, though. // // Thanks for listening~ - public const int CurrentConfigVersion = 7; + public const int CurrentConfigVersion = 8; #region Meta diff --git a/ProjectLighthouse/Helpers/LocalizationHelper.cs b/ProjectLighthouse/Helpers/LocalizationHelper.cs new file mode 100644 index 00000000..e22f91d8 --- /dev/null +++ b/ProjectLighthouse/Helpers/LocalizationHelper.cs @@ -0,0 +1,4 @@ +namespace LBPUnion.ProjectLighthouse.Helpers; + +public static class LocalizationHelper +{} \ No newline at end of file diff --git a/ProjectLighthouse/Helpers/WebhookHelper.cs b/ProjectLighthouse/Helpers/WebhookHelper.cs index 031a79de..d54026c2 100644 --- a/ProjectLighthouse/Helpers/WebhookHelper.cs +++ b/ProjectLighthouse/Helpers/WebhookHelper.cs @@ -1,3 +1,4 @@ +using System; using System.Threading.Tasks; using Discord; using Discord.Webhook; @@ -7,17 +8,44 @@ namespace LBPUnion.ProjectLighthouse.Helpers; public static class WebhookHelper { - private static readonly DiscordWebhookClient client = (ServerConfiguration.Instance.DiscordIntegration.DiscordIntegrationEnabled + /// + /// The destination of the webhook post. + /// + public enum WebhookDestination : byte + { + /// + /// A channel intended for public viewing; where new levels and photos are sent. + /// + Public, + /// + /// A channel intended for moderators; where grief reports are sent. + /// + Moderation, + } + + private static readonly DiscordWebhookClient publicClient = (ServerConfiguration.Instance.DiscordIntegration.DiscordIntegrationEnabled ? new DiscordWebhookClient(ServerConfiguration.Instance.DiscordIntegration.Url) : null); + private static readonly DiscordWebhookClient moderationClient = (ServerConfiguration.Instance.DiscordIntegration.DiscordIntegrationEnabled + ? new DiscordWebhookClient(ServerConfiguration.Instance.DiscordIntegration.ModerationUrl) + : null); + public static readonly Color UnionColor = new(0, 140, 255); - public static Task SendWebhook(EmbedBuilder builder) => SendWebhook(builder.Build()); + public static Task SendWebhook(EmbedBuilder builder, WebhookDestination dest = WebhookDestination.Public) + => SendWebhook(builder.Build(), dest); - public static async Task SendWebhook(Embed embed) + public static async Task SendWebhook(Embed embed, WebhookDestination dest = WebhookDestination.Public) { if (!ServerConfiguration.Instance.DiscordIntegration.DiscordIntegrationEnabled) return; + + DiscordWebhookClient client = dest switch + { + WebhookDestination.Public => publicClient, + WebhookDestination.Moderation => moderationClient, + _ => throw new ArgumentOutOfRangeException(nameof(dest), dest, null), + }; await client.SendMessageAsync ( @@ -28,7 +56,7 @@ public static class WebhookHelper ); } - public static Task SendWebhook(string title, string description) + public static Task SendWebhook(string title, string description, WebhookDestination dest = WebhookDestination.Public) => SendWebhook ( new EmbedBuilder @@ -36,6 +64,7 @@ public static class WebhookHelper Title = title, Description = description, Color = UnionColor, - } + }, + dest ); } \ No newline at end of file diff --git a/ProjectLighthouse/ProjectLighthouse.csproj b/ProjectLighthouse/ProjectLighthouse.csproj index 73572f6e..b2df14d8 100644 --- a/ProjectLighthouse/ProjectLighthouse.csproj +++ b/ProjectLighthouse/ProjectLighthouse.csproj @@ -59,18 +59,7 @@ - - True - True - Resources.resx - - - - - - ResXFileCodeGenerator - Resources.Designer.cs - + diff --git a/ProjectLighthouse/Types/PageNavigationItem.cs b/ProjectLighthouse/Types/PageNavigationItem.cs index 11068c0a..c7ad4c5d 100644 --- a/ProjectLighthouse/Types/PageNavigationItem.cs +++ b/ProjectLighthouse/Types/PageNavigationItem.cs @@ -1,16 +1,18 @@ +using LBPUnion.ProjectLighthouse.Localization; + #nullable enable namespace LBPUnion.ProjectLighthouse.Types; public class PageNavigationItem { - public PageNavigationItem(string name, string url, string? icon = null) + public PageNavigationItem(TranslatableString name, string url, string? icon = null) { this.Name = name; this.Url = url; this.Icon = icon; } - public string Name { get; set; } + public TranslatableString Name { get; set; } public string Url { get; set; } public string? Icon { get; set; } } \ No newline at end of file diff --git a/README.md b/README.md index 903e3baf..a91d5d3d 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ environment until release**. This is because we have not entirely nailed security down yet, and **your instance WILL get attacked** as a result. It's happened before, and it'll happen again. -Simply put, **Project Lighthouse is not ready for the general public yet**. +Simply put, **Project Lighthouse is not ready for the public yet**. In addition, we're not responsible if someone hacks your machine and wipes your database, so make frequent backups, and be sure to report any vulnerabilities. Thank you in advance. @@ -61,12 +61,12 @@ information. ## Compatibility across games and platforms -| Game | Console (PS3/Vita/PSP) | Emulator (RPCS3/Vita3k/PPSSPP) | Next-Gen (PS4/PS5/Vita) | -|----------|-------------------------------------|--------------------------------------------------------------|-------------------------| -| LBP1 | Compatible | Compatible with patched RPCS3 build | No next-gen equivalent | -| LBP2 | Compatible | Compatible with patched RPCS3 build | No next-gen equivalent | -| LBP3 | Mostly compatible, frequent crashes | Mostly compatible with patched RPCS3 build, frequent crashes | Incompatible | -| LBP Vita | Compatible | Incompatible, marked as "Intro" on Vita3k | No next-gen equivalent | -| LBP PSP | Potentially compatible | Incompatible, PSN not supported on PPSSPP | Potentially Compatible | +| Game | Console (PS3/Vita/PSP) | Emulator (RPCS3/Vita3k/PPSSPP) | Next-Gen (PS4/PS5/Adrenaline) | +|----------|------------------------|-------------------------------------------|-------------------------------| +| LBP1 | Compatible | Compatible | No next-gen equivalent | +| LBP2 | Compatible | Compatible | No next-gen equivalent | +| LBP3 | Mostly compatible | Mostly compatible | Incompatible | +| LBP Vita | Compatible | Incompatible, PSN not supported on Vita3k | No next-gen equivalent | +| LBP PSP | Potentially compatible | Incompatible, PSN not supported on PPSSPP | Potentially Compatible | Project Lighthouse is mostly a work in progress, so this chart is subject to change at any point. diff --git a/crowdin.yml b/crowdin.yml new file mode 100644 index 00000000..2e6c5d14 --- /dev/null +++ b/crowdin.yml @@ -0,0 +1,6 @@ +preserve_hierarchy: true +files: + - source: /ProjectLighthouse.Localization/*.resx + translation: /ProjectLighthouse.Localization/%file_name%.lang-%locale%.%file_extension% + ignore: + - /ProjectLighthouse.Localization/%file_name%.*.%file_extension%