From 197aab1ba3e86d20e3b7a0c547253e24168cf356 Mon Sep 17 00:00:00 2001 From: jvyden Date: Thu, 14 Apr 2022 17:06:13 -0400 Subject: [PATCH] Add landing page strings --- .../LandingPage.resx | 56 +++++++++++++++++++ .../ProjectLighthouse.Localization.csproj | 7 +++ .../StringLists/LandingPageStrings.cs | 15 +++++ .../TranslationAreas.cs | 1 + ProjectLighthouse/Pages/LandingPage.cshtml | 2 +- 5 files changed, 80 insertions(+), 1 deletion(-) create mode 100644 ProjectLighthouse.Localization/LandingPage.resx create mode 100644 ProjectLighthouse.Localization/StringLists/LandingPageStrings.cs diff --git a/ProjectLighthouse.Localization/LandingPage.resx b/ProjectLighthouse.Localization/LandingPage.resx new file mode 100644 index 00000000..627a5769 --- /dev/null +++ b/ProjectLighthouse.Localization/LandingPage.resx @@ -0,0 +1,56 @@ + + + + + + + + + + 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 Project Lighthouse! + 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. + + \ No newline at end of file diff --git a/ProjectLighthouse.Localization/ProjectLighthouse.Localization.csproj b/ProjectLighthouse.Localization/ProjectLighthouse.Localization.csproj index 824bcb4c..f6397a51 100644 --- a/ProjectLighthouse.Localization/ProjectLighthouse.Localization.csproj +++ b/ProjectLighthouse.Localization/ProjectLighthouse.Localization.csproj @@ -8,4 +8,11 @@ Exe + + + ResXFileCodeGenerator + LandingPage.Designer.cs + + + diff --git a/ProjectLighthouse.Localization/StringLists/LandingPageStrings.cs b/ProjectLighthouse.Localization/StringLists/LandingPageStrings.cs new file mode 100644 index 00000000..e7c46916 --- /dev/null +++ b/ProjectLighthouse.Localization/StringLists/LandingPageStrings.cs @@ -0,0 +1,15 @@ +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 AuthAttemptsPending = create("authAttemptsPending"); + + private static TranslatableString create(string key) => new(TranslationAreas.BaseLayout, key); +} \ No newline at end of file diff --git a/ProjectLighthouse.Localization/TranslationAreas.cs b/ProjectLighthouse.Localization/TranslationAreas.cs index 5b380df0..0a4523ee 100644 --- a/ProjectLighthouse.Localization/TranslationAreas.cs +++ b/ProjectLighthouse.Localization/TranslationAreas.cs @@ -3,4 +3,5 @@ namespace LBPUnion.ProjectLighthouse.Localization; public enum TranslationAreas { BaseLayout, + LandingPage, } \ No newline at end of file diff --git a/ProjectLighthouse/Pages/LandingPage.cshtml b/ProjectLighthouse/Pages/LandingPage.cshtml index 47735d4c..098f5e4e 100644 --- a/ProjectLighthouse/Pages/LandingPage.cshtml +++ b/ProjectLighthouse/Pages/LandingPage.cshtml @@ -7,7 +7,7 @@ Layout = "Layouts/BaseLayout"; Model.ShowTitleInPage = false; } -

Welcome to Project Lighthouse!

+

Welcome to Project Lighthouse!

@if (Model.User != null) {