From 9fb97011c85adca42b18c5af394a5c60fecc22b8 Mon Sep 17 00:00:00 2001 From: dyatlov-a Date: Tue, 24 Sep 2024 20:42:51 +0400 Subject: [PATCH] Refactoring ResourcesManager --- .../AppraiserSettingSectionProvider.cs | 15 +- .../FeatureProperties/SelectValue.cs | 4 +- .../FeatureProperties/SettingItem.cs | 4 +- .../FeatureProperties/SettingSection.cs | 6 +- .../RandomCoffeeSettingSectionProvider.cs | 24 +- .../ReviewerSettingSectionProvider.cs | 25 +- .../Constructor/Stages/NavigationStages.razor | 2 +- .../Stages/Stage2/FeaturesFactory.cs | 3 +- .../Stages/Stage3/CalendarEditor.razor | 2 +- .../Stages/Stage3/SetSettings.razor | 2 - .../Constructor/Stages/Stage4/Complete.razor | 1 - .../Features/Layouts/MainFooter.razor | 2 +- .../Features/Meta/MetaData.razor | 2 +- .../Features/Meta/OpenGraph.razor | 2 +- .../Features/_Imports.razor | 1 + src/Inc.TeamAssistant.WebUI/Messages.cs | 424 +++++++++--------- .../Services/ClientCore/ResourcesManager.cs | 7 +- 17 files changed, 268 insertions(+), 258 deletions(-) diff --git a/src/Inc.TeamAssistant.Appraiser.Application/Services/AppraiserSettingSectionProvider.cs b/src/Inc.TeamAssistant.Appraiser.Application/Services/AppraiserSettingSectionProvider.cs index 9d40b889..9938b76a 100644 --- a/src/Inc.TeamAssistant.Appraiser.Application/Services/AppraiserSettingSectionProvider.cs +++ b/src/Inc.TeamAssistant.Appraiser.Application/Services/AppraiserSettingSectionProvider.cs @@ -1,15 +1,16 @@ using Inc.TeamAssistant.Appraiser.Domain; using Inc.TeamAssistant.Primitives.FeatureProperties; +using Inc.TeamAssistant.Primitives.Languages; namespace Inc.TeamAssistant.Appraiser.Application.Services; internal sealed class AppraiserSettingSectionProvider : ISettingSectionProvider { - private readonly IReadOnlyDictionary _storyType = new Dictionary + private readonly IReadOnlyDictionary _storyType = new Dictionary { - [StoryType.Fibonacci] = "Constructor_FormSectionSetSettingsFibonacciDescription", - [StoryType.TShirt] = "Constructor_FormSectionSetSettingsTShirtDescription", - [StoryType.PowerOfTwo] = "Constructor_FormSectionSetSettingsPowerOfTwoDescription" + [StoryType.Fibonacci] = new("Constructor_FormSectionSetSettingsFibonacciDescription"), + [StoryType.TShirt] = new("Constructor_FormSectionSetSettingsTShirtDescription"), + [StoryType.PowerOfTwo] = new("Constructor_FormSectionSetSettingsPowerOfTwoDescription") }; public string FeatureName => "Appraiser"; @@ -19,12 +20,12 @@ public IReadOnlyCollection GetSections() return [ new SettingSection( - "Constructor_FormSectionSetSettingsAppraiserHeader", - "Constructor_FormSectionSetSettingsAppraiserHelp", + new("Constructor_FormSectionSetSettingsAppraiserHeader"), + new("Constructor_FormSectionSetSettingsAppraiserHelp"), [ new( AppraiserProperties.StoryTypeKey, - "Constructor_FormSectionSetSettingsStoryTypeFieldLabel", + new("Constructor_FormSectionSetSettingsStoryTypeFieldLabel"), GetValuesForStoryType().ToArray()) ]) ]; diff --git a/src/Inc.TeamAssistant.Primitives/FeatureProperties/SelectValue.cs b/src/Inc.TeamAssistant.Primitives/FeatureProperties/SelectValue.cs index 110e12b2..757b9f89 100644 --- a/src/Inc.TeamAssistant.Primitives/FeatureProperties/SelectValue.cs +++ b/src/Inc.TeamAssistant.Primitives/FeatureProperties/SelectValue.cs @@ -1,3 +1,5 @@ +using Inc.TeamAssistant.Primitives.Languages; + namespace Inc.TeamAssistant.Primitives.FeatureProperties; -public sealed record SelectValue(string MessageId, string Value); \ No newline at end of file +public sealed record SelectValue(MessageId MessageId, string Value); \ No newline at end of file diff --git a/src/Inc.TeamAssistant.Primitives/FeatureProperties/SettingItem.cs b/src/Inc.TeamAssistant.Primitives/FeatureProperties/SettingItem.cs index 5b36149e..a90a752a 100644 --- a/src/Inc.TeamAssistant.Primitives/FeatureProperties/SettingItem.cs +++ b/src/Inc.TeamAssistant.Primitives/FeatureProperties/SettingItem.cs @@ -1,6 +1,8 @@ +using Inc.TeamAssistant.Primitives.Languages; + namespace Inc.TeamAssistant.Primitives.FeatureProperties; public sealed record SettingItem( string PropertyName, - string LabelMessageId, + MessageId LabelMessageId, IReadOnlyCollection Values); \ No newline at end of file diff --git a/src/Inc.TeamAssistant.Primitives/FeatureProperties/SettingSection.cs b/src/Inc.TeamAssistant.Primitives/FeatureProperties/SettingSection.cs index b3ab12e3..052ade13 100644 --- a/src/Inc.TeamAssistant.Primitives/FeatureProperties/SettingSection.cs +++ b/src/Inc.TeamAssistant.Primitives/FeatureProperties/SettingSection.cs @@ -1,6 +1,8 @@ +using Inc.TeamAssistant.Primitives.Languages; + namespace Inc.TeamAssistant.Primitives.FeatureProperties; public sealed record SettingSection( - string HeaderMessageId, - string HelpMessageId, + MessageId HeaderMessageId, + MessageId HelpMessageId, IReadOnlyCollection SettingItems); \ No newline at end of file diff --git a/src/Inc.TeamAssistant.RandomCoffee.Application/Services/RandomCoffeeSettingSectionProvider.cs b/src/Inc.TeamAssistant.RandomCoffee.Application/Services/RandomCoffeeSettingSectionProvider.cs index d1c8f77e..d5bc18a3 100644 --- a/src/Inc.TeamAssistant.RandomCoffee.Application/Services/RandomCoffeeSettingSectionProvider.cs +++ b/src/Inc.TeamAssistant.RandomCoffee.Application/Services/RandomCoffeeSettingSectionProvider.cs @@ -12,16 +12,16 @@ public IReadOnlyCollection GetSections() return [ new SettingSection( - "Constructor_FormSectionSetSettingsRandomCoffeeHeader", - "Constructor_FormSectionSetSettingsRandomCoffeeHelp", + new("Constructor_FormSectionSetSettingsRandomCoffeeHeader"), + new("Constructor_FormSectionSetSettingsRandomCoffeeHelp"), [ new( RandomCoffeeProperties.RoundIntervalKey, - "Constructor_FormSectionSetSettingsRoundIntervalFieldLabel", + new("Constructor_FormSectionSetSettingsRoundIntervalFieldLabel"), GetValuesForRoundInterval().ToArray()), new( RandomCoffeeProperties.VotingIntervalKey, - "Constructor_FormSectionSetSettingsVotingIntervalFieldLabel", + new("Constructor_FormSectionSetSettingsVotingIntervalFieldLabel"), GetValuesForVotingInterval().ToArray()) ]) ]; @@ -29,17 +29,17 @@ public IReadOnlyCollection GetSections() private IEnumerable GetValuesForRoundInterval() { - yield return new SelectValue("Constructor_FormSectionSetSettingsRoundInterval1Description", "7.00:00:00"); - yield return new SelectValue("Constructor_FormSectionSetSettingsRoundInterval2Description", "14.00:00:00"); - yield return new SelectValue("Constructor_FormSectionSetSettingsRoundInterval3Description", "21.00:00:00"); - yield return new SelectValue("Constructor_FormSectionSetSettingsRoundInterval4Description", "28.00:00:00"); + yield return new SelectValue(new("Constructor_FormSectionSetSettingsRoundInterval1Description"), "7.00:00:00"); + yield return new SelectValue(new("Constructor_FormSectionSetSettingsRoundInterval2Description"), "14.00:00:00"); + yield return new SelectValue(new("Constructor_FormSectionSetSettingsRoundInterval3Description"), "21.00:00:00"); + yield return new SelectValue(new("Constructor_FormSectionSetSettingsRoundInterval4Description"), "28.00:00:00"); } private IEnumerable GetValuesForVotingInterval() { - yield return new SelectValue("Constructor_FormSectionSetSettingsVotingInterval1Description", "02:00:00"); - yield return new SelectValue("Constructor_FormSectionSetSettingsVotingInterval2Description", "04:00:00"); - yield return new SelectValue("Constructor_FormSectionSetSettingsVotingInterval3Description", "1.00:00:00"); - yield return new SelectValue("Constructor_FormSectionSetSettingsVotingInterval4Description", "2.00:00:00"); + yield return new SelectValue(new("Constructor_FormSectionSetSettingsVotingInterval1Description"), "02:00:00"); + yield return new SelectValue(new("Constructor_FormSectionSetSettingsVotingInterval2Description"), "04:00:00"); + yield return new SelectValue(new("Constructor_FormSectionSetSettingsVotingInterval3Description"), "1.00:00:00"); + yield return new SelectValue(new("Constructor_FormSectionSetSettingsVotingInterval4Description"), "2.00:00:00"); } } \ No newline at end of file diff --git a/src/Inc.TeamAssistant.Reviewer.Application/Services/ReviewerSettingSectionProvider.cs b/src/Inc.TeamAssistant.Reviewer.Application/Services/ReviewerSettingSectionProvider.cs index 6bdee13c..84e46232 100644 --- a/src/Inc.TeamAssistant.Reviewer.Application/Services/ReviewerSettingSectionProvider.cs +++ b/src/Inc.TeamAssistant.Reviewer.Application/Services/ReviewerSettingSectionProvider.cs @@ -1,14 +1,15 @@ using Inc.TeamAssistant.Primitives.FeatureProperties; +using Inc.TeamAssistant.Primitives.Languages; using Inc.TeamAssistant.Reviewer.Domain; namespace Inc.TeamAssistant.Reviewer.Application.Services; internal sealed class ReviewerSettingSectionProvider : ISettingSectionProvider { - private readonly IReadOnlyDictionary _storyType = new Dictionary + private readonly IReadOnlyDictionary _storyType = new Dictionary { - [NextReviewerType.RoundRobin] = "Constructor_FormSectionSetSettingsRoundRobinDescription", - [NextReviewerType.Random] = "Constructor_FormSectionSetSettingsRandomDescription" + [NextReviewerType.RoundRobin] = new("Constructor_FormSectionSetSettingsRoundRobinDescription"), + [NextReviewerType.Random] = new("Constructor_FormSectionSetSettingsRandomDescription") }; public string FeatureName => "Reviewer"; @@ -18,20 +19,20 @@ public IReadOnlyCollection GetSections() return [ new SettingSection( - "Constructor_FormSectionSetSettingsReviewerHeader", - "Constructor_FormSectionSetSettingsReviewerHelp", + new("Constructor_FormSectionSetSettingsReviewerHeader"), + new("Constructor_FormSectionSetSettingsReviewerHelp"), [ new( ReviewerProperties.NextReviewerTypeKey, - "Constructor_FormSectionSetSettingsNextReviewerStrategyFieldLabel", + new("Constructor_FormSectionSetSettingsNextReviewerStrategyFieldLabel"), GetValuesForNextReviewerType().ToArray()), new( ReviewerProperties.WaitingNotificationIntervalKey, - "Constructor_FormSectionSetSettingsWaitingNotificationIntervalFieldLabel", + new("Constructor_FormSectionSetSettingsWaitingNotificationIntervalFieldLabel"), GetValuesForNotificationInterval().ToArray()), new( ReviewerProperties.InProgressNotificationIntervalKey, - "Constructor_FormSectionSetSettingsInProgressNotificationIntervalFieldLabel", + new("Constructor_FormSectionSetSettingsInProgressNotificationIntervalFieldLabel"), GetValuesForNotificationInterval().ToArray()) ]) ]; @@ -46,9 +47,9 @@ private IEnumerable GetValuesForNextReviewerType() private IEnumerable GetValuesForNotificationInterval() { - yield return new SelectValue("Constructor_FormSectionSetSettingsNotificationInterval1Description", "00:30:00"); - yield return new SelectValue("Constructor_FormSectionSetSettingsNotificationInterval2Description", "01:00:00"); - yield return new SelectValue("Constructor_FormSectionSetSettingsNotificationInterval3Description", "01:30:00"); - yield return new SelectValue("Constructor_FormSectionSetSettingsNotificationInterval4Description", "02:00:00"); + yield return new SelectValue(new("Constructor_FormSectionSetSettingsNotificationInterval1Description"), "00:30:00"); + yield return new SelectValue(new("Constructor_FormSectionSetSettingsNotificationInterval2Description"), "01:00:00"); + yield return new SelectValue(new("Constructor_FormSectionSetSettingsNotificationInterval3Description"), "01:30:00"); + yield return new SelectValue(new("Constructor_FormSectionSetSettingsNotificationInterval4Description"), "02:00:00"); } } \ No newline at end of file diff --git a/src/Inc.TeamAssistant.WebUI/Features/Constructor/Stages/NavigationStages.razor b/src/Inc.TeamAssistant.WebUI/Features/Constructor/Stages/NavigationStages.razor index a992e585..5ebecd72 100644 --- a/src/Inc.TeamAssistant.WebUI/Features/Constructor/Stages/NavigationStages.razor +++ b/src/Inc.TeamAssistant.WebUI/Features/Constructor/Stages/NavigationStages.razor @@ -26,7 +26,7 @@ ? "nav-stages__item_can-move" : string.Empty; - private string GetStageTitle(Stage stage) => $"Constructor_Stage{stage}"; + private MessageId GetStageTitle(Stage stage) => new($"Constructor_Stage{stage}"); private void MoveTo(Stage stage) { diff --git a/src/Inc.TeamAssistant.WebUI/Features/Constructor/Stages/Stage2/FeaturesFactory.cs b/src/Inc.TeamAssistant.WebUI/Features/Constructor/Stages/Stage2/FeaturesFactory.cs index ef74392c..ef584336 100644 --- a/src/Inc.TeamAssistant.WebUI/Features/Constructor/Stages/Stage2/FeaturesFactory.cs +++ b/src/Inc.TeamAssistant.WebUI/Features/Constructor/Stages/Stage2/FeaturesFactory.cs @@ -1,3 +1,4 @@ +using Inc.TeamAssistant.Primitives.Languages; using Inc.TeamAssistant.WebUI.Services.ClientCore; namespace Inc.TeamAssistant.WebUI.Features.Constructor.Stages.Stage2; @@ -17,7 +18,7 @@ public FeaturesFactory(ResourcesManager resources) private string Create(string featureName, string propertyName) { - var key = $"Constructor_Feature{featureName}{propertyName}"; + var key = new MessageId($"Constructor_Feature{featureName}{propertyName}"); return _resources[key]; } diff --git a/src/Inc.TeamAssistant.WebUI/Features/Constructor/Stages/Stage3/CalendarEditor.razor b/src/Inc.TeamAssistant.WebUI/Features/Constructor/Stages/Stage3/CalendarEditor.razor index 6d6d7f12..4c374227 100644 --- a/src/Inc.TeamAssistant.WebUI/Features/Constructor/Stages/Stage3/CalendarEditor.razor +++ b/src/Inc.TeamAssistant.WebUI/Features/Constructor/Stages/Stage3/CalendarEditor.razor @@ -184,7 +184,7 @@ StateHasChanged(); } - private string GetDayOfWeekTitle(DayOfWeek dayOfWeek) => $"Constructor_DayOfWeek{dayOfWeek}"; + private MessageId GetDayOfWeekTitle(DayOfWeek dayOfWeek) => new($"Constructor_DayOfWeek{dayOfWeek}"); public async Task SubmitForm() { diff --git a/src/Inc.TeamAssistant.WebUI/Features/Constructor/Stages/Stage3/SetSettings.razor b/src/Inc.TeamAssistant.WebUI/Features/Constructor/Stages/Stage3/SetSettings.razor index 0ed3cfe1..62640dcf 100644 --- a/src/Inc.TeamAssistant.WebUI/Features/Constructor/Stages/Stage3/SetSettings.razor +++ b/src/Inc.TeamAssistant.WebUI/Features/Constructor/Stages/Stage3/SetSettings.razor @@ -1,5 +1,3 @@ -@using Inc.TeamAssistant.Primitives.Languages - @inject IServiceProvider ServiceProvider @inject ResourcesManager Resources diff --git a/src/Inc.TeamAssistant.WebUI/Features/Constructor/Stages/Stage4/Complete.razor b/src/Inc.TeamAssistant.WebUI/Features/Constructor/Stages/Stage4/Complete.razor index 186f2166..290d7d52 100644 --- a/src/Inc.TeamAssistant.WebUI/Features/Constructor/Stages/Stage4/Complete.razor +++ b/src/Inc.TeamAssistant.WebUI/Features/Constructor/Stages/Stage4/Complete.razor @@ -1,5 +1,4 @@ @using Inc.TeamAssistant.Primitives.FeatureProperties -@using Inc.TeamAssistant.Primitives.Languages @inject IBotService BotService @inject IServiceProvider ServiceProvider diff --git a/src/Inc.TeamAssistant.WebUI/Features/Layouts/MainFooter.razor b/src/Inc.TeamAssistant.WebUI/Features/Layouts/MainFooter.razor index 3f83d0b3..3ee1bc1c 100644 --- a/src/Inc.TeamAssistant.WebUI/Features/Layouts/MainFooter.razor +++ b/src/Inc.TeamAssistant.WebUI/Features/Layouts/MainFooter.razor @@ -33,7 +33,7 @@ { const bool external = true; - var links = new (string Key, FooterLink Value)[] + var links = new (MessageId Key, FooterLink Value)[] { (Messages.Footer_GroupNavigation, new FooterLink( Resources[Messages.Footer_LinkMain], diff --git a/src/Inc.TeamAssistant.WebUI/Features/Meta/MetaData.razor b/src/Inc.TeamAssistant.WebUI/Features/Meta/MetaData.razor index 4b810ad3..aafa59d7 100644 --- a/src/Inc.TeamAssistant.WebUI/Features/Meta/MetaData.razor +++ b/src/Inc.TeamAssistant.WebUI/Features/Meta/MetaData.razor @@ -14,7 +14,7 @@ [Parameter, EditorRequired] public WebsiteSection WebsiteSection { get; set; } - private (string Description, string Keywords, bool Indexed) _data = default!; + private (MessageId Description, MessageId Keywords, bool Indexed) _data = default!; protected override void OnParametersSet() => Load(); diff --git a/src/Inc.TeamAssistant.WebUI/Features/Meta/OpenGraph.razor b/src/Inc.TeamAssistant.WebUI/Features/Meta/OpenGraph.razor index 2e19820b..029e00e0 100644 --- a/src/Inc.TeamAssistant.WebUI/Features/Meta/OpenGraph.razor +++ b/src/Inc.TeamAssistant.WebUI/Features/Meta/OpenGraph.razor @@ -26,7 +26,7 @@ public WebsiteSection WebsiteSection { get; set; } private string _languageId = string.Empty; - private (string Title, string Description, string Image, string ImageText) _data = default; + private (MessageId Title, MessageId Description, string Image, MessageId ImageText) _data = default; protected override void OnParametersSet() => Load(); diff --git a/src/Inc.TeamAssistant.WebUI/Features/_Imports.razor b/src/Inc.TeamAssistant.WebUI/Features/_Imports.razor index da4a5b6b..e8ba9412 100644 --- a/src/Inc.TeamAssistant.WebUI/Features/_Imports.razor +++ b/src/Inc.TeamAssistant.WebUI/Features/_Imports.razor @@ -9,6 +9,7 @@ @using Microsoft.AspNetCore.Components.QuickGrid @using ApexCharts +@using Inc.TeamAssistant.Primitives.Languages @using Inc.TeamAssistant.WebUI.Contracts @using Inc.TeamAssistant.WebUI.Features.Layouts @using Inc.TeamAssistant.WebUI.Features.Meta diff --git a/src/Inc.TeamAssistant.WebUI/Messages.cs b/src/Inc.TeamAssistant.WebUI/Messages.cs index 457108bc..dbfe8910 100644 --- a/src/Inc.TeamAssistant.WebUI/Messages.cs +++ b/src/Inc.TeamAssistant.WebUI/Messages.cs @@ -1,231 +1,233 @@ +using Inc.TeamAssistant.Primitives.Languages; + namespace Inc.TeamAssistant.WebUI; internal static class Messages { - public static readonly string GUI_Authorizing = nameof(GUI_Authorizing); - public static readonly string GUI_Error404 = nameof(GUI_Error404); - public static readonly string GUI_PageNotFound = nameof(GUI_PageNotFound); + public static readonly MessageId GUI_Authorizing = new(nameof(GUI_Authorizing)); + public static readonly MessageId GUI_Error404 = new(nameof(GUI_Error404)); + public static readonly MessageId GUI_PageNotFound = new(nameof(GUI_PageNotFound)); - public static readonly string GUI_TaskAssess = nameof(GUI_TaskAssess); - public static readonly string GUI_MeanRating = nameof(GUI_MeanRating); - public static readonly string GUI_MedianRating = nameof(GUI_MedianRating); - public static readonly string GUI_AcceptedValue = nameof(GUI_AcceptedValue); - public static readonly string GUI_AssessmentSessionAbout = nameof(GUI_AssessmentSessionAbout); - public static readonly string GUI_AssessmentSessionConnect = nameof(GUI_AssessmentSessionConnect); - public static readonly string GUI_EstimationAcceptedTemplate = nameof(GUI_EstimationAcceptedTemplate); + public static readonly MessageId GUI_TaskAssess = new(nameof(GUI_TaskAssess)); + public static readonly MessageId GUI_MeanRating = new(nameof(GUI_MeanRating)); + public static readonly MessageId GUI_MedianRating = new(nameof(GUI_MedianRating)); + public static readonly MessageId GUI_AcceptedValue = new(nameof(GUI_AcceptedValue)); + public static readonly MessageId GUI_AssessmentSessionAbout = new(nameof(GUI_AssessmentSessionAbout)); + public static readonly MessageId GUI_AssessmentSessionConnect = new(nameof(GUI_AssessmentSessionConnect)); + public static readonly MessageId GUI_EstimationAcceptedTemplate = new(nameof(GUI_EstimationAcceptedTemplate)); - public static readonly string GUI_AcceptCookieButton = nameof(GUI_AcceptCookieButton); - public static readonly string GUI_AcceptCookieText = nameof(GUI_AcceptCookieText); + public static readonly MessageId GUI_AcceptCookieButton = new(nameof(GUI_AcceptCookieButton)); + public static readonly MessageId GUI_AcceptCookieText = new(nameof(GUI_AcceptCookieText)); - public static readonly string GUI_History = nameof(GUI_History); - public static readonly string GUI_Tasks = nameof(GUI_Tasks); - public static readonly string GUI_StoryList = nameof(GUI_StoryList); - public static readonly string GUI_AssessmentSession = nameof(GUI_AssessmentSession); + public static readonly MessageId GUI_History = new(nameof(GUI_History)); + public static readonly MessageId GUI_Tasks = new(nameof(GUI_Tasks)); + public static readonly MessageId GUI_StoryList = new(nameof(GUI_StoryList)); + public static readonly MessageId GUI_AssessmentSession = new(nameof(GUI_AssessmentSession)); - public static readonly string GUI_MainTitle = nameof(GUI_MainTitle); - public static readonly string GUI_MainHeader = nameof(GUI_MainHeader); - public static readonly string GUI_MainSubHeader = nameof(GUI_MainSubHeader); - public static readonly string GUI_ToolAppraiser = nameof(GUI_ToolAppraiser); - public static readonly string GUI_ToolReviewer = nameof(GUI_ToolReviewer); - public static readonly string GUI_ToolRandomCoffee = nameof(GUI_ToolRandomCoffee); - public static readonly string GUI_ToolCheckIn = nameof(GUI_ToolCheckIn); - public static readonly string GUI_CreateBotLink = nameof(GUI_CreateBotLink); - public static readonly string GUI_VideoNotSupported = nameof(GUI_VideoNotSupported); - public static readonly string GUI_DataRefreshed = nameof(GUI_DataRefreshed); + public static readonly MessageId GUI_MainTitle = new(nameof(GUI_MainTitle)); + public static readonly MessageId GUI_MainHeader = new(nameof(GUI_MainHeader)); + public static readonly MessageId GUI_MainSubHeader = new(nameof(GUI_MainSubHeader)); + public static readonly MessageId GUI_ToolAppraiser = new(nameof(GUI_ToolAppraiser)); + public static readonly MessageId GUI_ToolReviewer = new(nameof(GUI_ToolReviewer)); + public static readonly MessageId GUI_ToolRandomCoffee = new(nameof(GUI_ToolRandomCoffee)); + public static readonly MessageId GUI_ToolCheckIn = new(nameof(GUI_ToolCheckIn)); + public static readonly MessageId GUI_CreateBotLink = new(nameof(GUI_CreateBotLink)); + public static readonly MessageId GUI_VideoNotSupported = new(nameof(GUI_VideoNotSupported)); + public static readonly MessageId GUI_DataRefreshed = new(nameof(GUI_DataRefreshed)); - public static readonly string Navigation_Login = nameof(Navigation_Login); - public static readonly string Navigation_Logout = nameof(Navigation_Logout); + public static readonly MessageId Navigation_Login = new(nameof(Navigation_Login)); + public static readonly MessageId Navigation_Logout = new(nameof(Navigation_Logout)); - public static readonly string Constructor_NewBot = nameof(Constructor_NewBot); - public static readonly string Constructor_AddBot = nameof(Constructor_AddBot); - public static readonly string Constructor_Edit = nameof(Constructor_Edit); - public static readonly string Constructor_Remove = nameof(Constructor_Remove); - public static readonly string Constructor_Title = nameof(Constructor_Title); - public static readonly string Constructor_SelectBotText = nameof(Constructor_SelectBotText); - public static readonly string Constructor_RemoveConfirmationText = nameof(Constructor_RemoveConfirmationText); - public static readonly string Constructor_FormSectionTokenTitle = nameof(Constructor_FormSectionTokenTitle); - public static readonly string Constructor_FormSectionTokenHelpTemplate = nameof(Constructor_FormSectionTokenHelpTemplate); - public static readonly string Constructor_FormSectionTokenFieldTokenLabel = nameof(Constructor_FormSectionTokenFieldTokenLabel); - public static readonly string Constructor_FormSectionTokenFieldUserNameLabel = nameof(Constructor_FormSectionTokenFieldUserNameLabel); - public static readonly string Constructor_MoveNextTitle = nameof(Constructor_MoveNextTitle); - public static readonly string Constructor_FormSectionFeaturesTitle = nameof(Constructor_FormSectionFeaturesTitle); - public static readonly string Constructor_FormSectionFeaturesHelp = nameof(Constructor_FormSectionFeaturesHelp); - public static readonly string Constructor_FeatureAppraiserName = nameof(Constructor_FeatureAppraiserName); - public static readonly string Constructor_FeatureReviewerName = nameof(Constructor_FeatureReviewerName); - public static readonly string Constructor_FeatureRandomCoffeeName = nameof(Constructor_FeatureRandomCoffeeName); - public static readonly string Constructor_FeatureCheckInName = nameof(Constructor_FeatureCheckInName); - public static readonly string Constructor_FeatureAppraiserDescription = nameof(Constructor_FeatureAppraiserDescription); - public static readonly string Constructor_FeatureReviewerDescription = nameof(Constructor_FeatureReviewerDescription); - public static readonly string Constructor_FeatureRandomCoffeeDescription = nameof(Constructor_FeatureRandomCoffeeDescription); - public static readonly string Constructor_FeatureCheckInDescription = nameof(Constructor_FeatureCheckInDescription); - public static readonly string Constructor_FeatureAdd = nameof(Constructor_FeatureAdd); - public static readonly string Constructor_FeatureRemove = nameof(Constructor_FeatureRemove); - public static readonly string Constructor_FormSectionFeaturesAvailableEmptyText = nameof(Constructor_FormSectionFeaturesAvailableEmptyText); - public static readonly string Constructor_FormSectionFeaturesSelectedEmptyText = nameof(Constructor_FormSectionFeaturesSelectedEmptyText); - public static readonly string Constructor_FormSectionSetSettingsRoundRobinDescription = nameof(Constructor_FormSectionSetSettingsRoundRobinDescription); - public static readonly string Constructor_FormSectionSetSettingsRandomDescription = nameof(Constructor_FormSectionSetSettingsRandomDescription); - public static readonly string Constructor_FormSectionSetSettingsAppraiserHeader = nameof(Constructor_FormSectionSetSettingsAppraiserHeader); - public static readonly string Constructor_FormSectionSetSettingsAppraiserHelp = nameof(Constructor_FormSectionSetSettingsAppraiserHelp); - public static readonly string Constructor_FormSectionSetSettingsStoryTypeFieldLabel = nameof(Constructor_FormSectionSetSettingsStoryTypeFieldLabel); - public static readonly string Constructor_FormSectionSetSettingsReviewerHeader = nameof(Constructor_FormSectionSetSettingsReviewerHeader); - public static readonly string Constructor_FormSectionSetSettingsReviewerHelp = nameof(Constructor_FormSectionSetSettingsReviewerHelp); - public static readonly string Constructor_FormSectionSetSettingsNextReviewerStrategyFieldLabel = nameof(Constructor_FormSectionSetSettingsNextReviewerStrategyFieldLabel); - public static readonly string Constructor_FormSectionTokenCheckHelp = nameof(Constructor_FormSectionTokenCheckHelp); - public static readonly string Constructor_FormSectionFeaturesCheckHelp = nameof(Constructor_FormSectionFeaturesCheckHelp); - public static readonly string Constructor_ButtonCreateText = nameof(Constructor_ButtonCreateText); - public static readonly string Constructor_ButtonUpdateText = nameof(Constructor_ButtonUpdateText); - public static readonly string Constructor_BooleanTrueText = nameof(Constructor_BooleanTrueText); - public static readonly string Constructor_BooleanFalseText = nameof(Constructor_BooleanFalseText); - public static readonly string Constructor_SupportedLanguages = nameof(Constructor_SupportedLanguages); - public static readonly string Constructor_SupportedLanguagesHelp = nameof(Constructor_SupportedLanguagesHelp); - public static readonly string Constructor_SupportedLanguagesCheck = nameof(Constructor_SupportedLanguagesCheck); - public static readonly string Constructor_Languages = nameof(Constructor_Languages); - public static readonly string Constructor_BotName = nameof(Constructor_BotName); - public static readonly string Constructor_BotShortDescription = nameof(Constructor_BotShortDescription); - public static readonly string Constructor_BotDescription = nameof(Constructor_BotDescription); - public static readonly string Constructor_WorkTimeTitle = nameof(Constructor_WorkTimeTitle); - public static readonly string Constructor_WorkTimeHelp = nameof(Constructor_WorkTimeHelp); - public static readonly string Constructor_WorkAllDayLabel = nameof(Constructor_WorkAllDayLabel); - public static readonly string Constructor_WorkTimeStartLabel = nameof(Constructor_WorkTimeStartLabel); - public static readonly string Constructor_WorkTimeEndLabel = nameof(Constructor_WorkTimeEndLabel); - public static readonly string Constructor_WeekendsTitle = nameof(Constructor_WeekendsTitle); - public static readonly string Constructor_WeekendsHelp = nameof(Constructor_WeekendsHelp); - public static readonly string Constructor_WeekendsLabel = nameof(Constructor_WeekendsLabel); - public static readonly string Constructor_HolidaysTitle = nameof(Constructor_HolidaysTitle); - public static readonly string Constructor_HolidaysHelp = nameof(Constructor_HolidaysHelp); - public static readonly string Constructor_DateLabel = nameof(Constructor_DateLabel); - public static readonly string Constructor_WorkdayLabel = nameof(Constructor_WorkdayLabel); - public static readonly string Constructor_AddHolidayLabel = nameof(Constructor_AddHolidayLabel); - public static readonly string Constructor_ConnectingTelegram = nameof(Constructor_ConnectingTelegram); - public static readonly string Constructor_WorkCalendar = nameof(Constructor_WorkCalendar); - public static readonly string Constructor_BotDetailsTelegram = nameof(Constructor_BotDetailsTelegram); - public static readonly string Constructor_BotDetails = nameof(Constructor_BotDetails); - public static readonly string Constructor_BotDetailsHelp = nameof(Constructor_BotDetailsHelp); - public static readonly string Constructor_FeaturesStore = nameof(Constructor_FeaturesStore); - public static readonly string Constructor_Configuration = nameof(Constructor_Configuration); - public static readonly string Constructor_CheckConfigurationTemplate = nameof(Constructor_CheckConfigurationTemplate); - public static readonly string Constructor_RequiredCalendar = nameof(Constructor_RequiredCalendar); - public static readonly string Constructor_DuplicateHolidays = nameof(Constructor_DuplicateHolidays); + public static readonly MessageId Constructor_NewBot = new(nameof(Constructor_NewBot)); + public static readonly MessageId Constructor_AddBot = new(nameof(Constructor_AddBot)); + public static readonly MessageId Constructor_Edit = new(nameof(Constructor_Edit)); + public static readonly MessageId Constructor_Remove = new(nameof(Constructor_Remove)); + public static readonly MessageId Constructor_Title = new(nameof(Constructor_Title)); + public static readonly MessageId Constructor_SelectBotText = new(nameof(Constructor_SelectBotText)); + public static readonly MessageId Constructor_RemoveConfirmationText = new(nameof(Constructor_RemoveConfirmationText)); + public static readonly MessageId Constructor_FormSectionTokenTitle = new(nameof(Constructor_FormSectionTokenTitle)); + public static readonly MessageId Constructor_FormSectionTokenHelpTemplate = new(nameof(Constructor_FormSectionTokenHelpTemplate)); + public static readonly MessageId Constructor_FormSectionTokenFieldTokenLabel = new(nameof(Constructor_FormSectionTokenFieldTokenLabel)); + public static readonly MessageId Constructor_FormSectionTokenFieldUserNameLabel = new(nameof(Constructor_FormSectionTokenFieldUserNameLabel)); + public static readonly MessageId Constructor_MoveNextTitle = new(nameof(Constructor_MoveNextTitle)); + public static readonly MessageId Constructor_FormSectionFeaturesTitle = new(nameof(Constructor_FormSectionFeaturesTitle)); + public static readonly MessageId Constructor_FormSectionFeaturesHelp = new(nameof(Constructor_FormSectionFeaturesHelp)); + public static readonly MessageId Constructor_FeatureAppraiserName = new(nameof(Constructor_FeatureAppraiserName)); + public static readonly MessageId Constructor_FeatureReviewerName = new(nameof(Constructor_FeatureReviewerName)); + public static readonly MessageId Constructor_FeatureRandomCoffeeName = new(nameof(Constructor_FeatureRandomCoffeeName)); + public static readonly MessageId Constructor_FeatureCheckInName = new(nameof(Constructor_FeatureCheckInName)); + public static readonly MessageId Constructor_FeatureAppraiserDescription = new(nameof(Constructor_FeatureAppraiserDescription)); + public static readonly MessageId Constructor_FeatureReviewerDescription = new(nameof(Constructor_FeatureReviewerDescription)); + public static readonly MessageId Constructor_FeatureRandomCoffeeDescription = new(nameof(Constructor_FeatureRandomCoffeeDescription)); + public static readonly MessageId Constructor_FeatureCheckInDescription = new(nameof(Constructor_FeatureCheckInDescription)); + public static readonly MessageId Constructor_FeatureAdd = new(nameof(Constructor_FeatureAdd)); + public static readonly MessageId Constructor_FeatureRemove = new(nameof(Constructor_FeatureRemove)); + public static readonly MessageId Constructor_FormSectionFeaturesAvailableEmptyText = new(nameof(Constructor_FormSectionFeaturesAvailableEmptyText)); + public static readonly MessageId Constructor_FormSectionFeaturesSelectedEmptyText = new(nameof(Constructor_FormSectionFeaturesSelectedEmptyText)); + public static readonly MessageId Constructor_FormSectionSetSettingsRoundRobinDescription = new(nameof(Constructor_FormSectionSetSettingsRoundRobinDescription)); + public static readonly MessageId Constructor_FormSectionSetSettingsRandomDescription = new(nameof(Constructor_FormSectionSetSettingsRandomDescription)); + public static readonly MessageId Constructor_FormSectionSetSettingsAppraiserHeader = new(nameof(Constructor_FormSectionSetSettingsAppraiserHeader)); + public static readonly MessageId Constructor_FormSectionSetSettingsAppraiserHelp = new(nameof(Constructor_FormSectionSetSettingsAppraiserHelp)); + public static readonly MessageId Constructor_FormSectionSetSettingsStoryTypeFieldLabel = new(nameof(Constructor_FormSectionSetSettingsStoryTypeFieldLabel)); + public static readonly MessageId Constructor_FormSectionSetSettingsReviewerHeader = new(nameof(Constructor_FormSectionSetSettingsReviewerHeader)); + public static readonly MessageId Constructor_FormSectionSetSettingsReviewerHelp = new(nameof(Constructor_FormSectionSetSettingsReviewerHelp)); + public static readonly MessageId Constructor_FormSectionSetSettingsNextReviewerStrategyFieldLabel = new(nameof(Constructor_FormSectionSetSettingsNextReviewerStrategyFieldLabel)); + public static readonly MessageId Constructor_FormSectionTokenCheckHelp = new(nameof(Constructor_FormSectionTokenCheckHelp)); + public static readonly MessageId Constructor_FormSectionFeaturesCheckHelp = new(nameof(Constructor_FormSectionFeaturesCheckHelp)); + public static readonly MessageId Constructor_ButtonCreateText = new(nameof(Constructor_ButtonCreateText)); + public static readonly MessageId Constructor_ButtonUpdateText = new(nameof(Constructor_ButtonUpdateText)); + public static readonly MessageId Constructor_BooleanTrueText = new(nameof(Constructor_BooleanTrueText)); + public static readonly MessageId Constructor_BooleanFalseText = new(nameof(Constructor_BooleanFalseText)); + public static readonly MessageId Constructor_SupportedLanguages = new(nameof(Constructor_SupportedLanguages)); + public static readonly MessageId Constructor_SupportedLanguagesHelp = new(nameof(Constructor_SupportedLanguagesHelp)); + public static readonly MessageId Constructor_SupportedLanguagesCheck = new(nameof(Constructor_SupportedLanguagesCheck)); + public static readonly MessageId Constructor_Languages = new(nameof(Constructor_Languages)); + public static readonly MessageId Constructor_BotName = new(nameof(Constructor_BotName)); + public static readonly MessageId Constructor_BotShortDescription = new(nameof(Constructor_BotShortDescription)); + public static readonly MessageId Constructor_BotDescription = new(nameof(Constructor_BotDescription)); + public static readonly MessageId Constructor_WorkTimeTitle = new(nameof(Constructor_WorkTimeTitle)); + public static readonly MessageId Constructor_WorkTimeHelp = new(nameof(Constructor_WorkTimeHelp)); + public static readonly MessageId Constructor_WorkAllDayLabel = new(nameof(Constructor_WorkAllDayLabel)); + public static readonly MessageId Constructor_WorkTimeStartLabel = new(nameof(Constructor_WorkTimeStartLabel)); + public static readonly MessageId Constructor_WorkTimeEndLabel = new(nameof(Constructor_WorkTimeEndLabel)); + public static readonly MessageId Constructor_WeekendsTitle = new(nameof(Constructor_WeekendsTitle)); + public static readonly MessageId Constructor_WeekendsHelp = new(nameof(Constructor_WeekendsHelp)); + public static readonly MessageId Constructor_WeekendsLabel = new(nameof(Constructor_WeekendsLabel)); + public static readonly MessageId Constructor_HolidaysTitle = new(nameof(Constructor_HolidaysTitle)); + public static readonly MessageId Constructor_HolidaysHelp = new(nameof(Constructor_HolidaysHelp)); + public static readonly MessageId Constructor_DateLabel = new(nameof(Constructor_DateLabel)); + public static readonly MessageId Constructor_WorkdayLabel = new(nameof(Constructor_WorkdayLabel)); + public static readonly MessageId Constructor_AddHolidayLabel = new(nameof(Constructor_AddHolidayLabel)); + public static readonly MessageId Constructor_ConnectingTelegram = new(nameof(Constructor_ConnectingTelegram)); + public static readonly MessageId Constructor_WorkCalendar = new(nameof(Constructor_WorkCalendar)); + public static readonly MessageId Constructor_BotDetailsTelegram = new(nameof(Constructor_BotDetailsTelegram)); + public static readonly MessageId Constructor_BotDetails = new(nameof(Constructor_BotDetails)); + public static readonly MessageId Constructor_BotDetailsHelp = new(nameof(Constructor_BotDetailsHelp)); + public static readonly MessageId Constructor_FeaturesStore = new(nameof(Constructor_FeaturesStore)); + public static readonly MessageId Constructor_Configuration = new(nameof(Constructor_Configuration)); + public static readonly MessageId Constructor_CheckConfigurationTemplate = new(nameof(Constructor_CheckConfigurationTemplate)); + public static readonly MessageId Constructor_RequiredCalendar = new(nameof(Constructor_RequiredCalendar)); + public static readonly MessageId Constructor_DuplicateHolidays = new(nameof(Constructor_DuplicateHolidays)); - public static readonly string Dashboard_MoveToDashboard = nameof(Dashboard_MoveToDashboard); - public static readonly string Dashboard_Title = nameof(Dashboard_Title); - public static readonly string Dashboard_SelectTeam = nameof(Dashboard_SelectTeam); - public static readonly string Dashboard_CreateBot = nameof(Dashboard_CreateBot); - public static readonly string Dashboard_SelectTeamTitle = nameof(Dashboard_SelectTeamTitle); - public static readonly string Dashboard_TeamField = nameof(Dashboard_TeamField); - public static readonly string Dashboard_BotField = nameof(Dashboard_BotField); - public static readonly string Dashboard_ExcludeFromTeam = nameof(Dashboard_ExcludeFromTeam); - public static readonly string Dashboard_LeaveTeammate = nameof(Dashboard_LeaveTeammate); - public static readonly string Dashboard_Days = nameof(Dashboard_Days); - public static readonly string Dashboard_Forever = nameof(Dashboard_Forever); - public static readonly string Dashboard_PersonName = nameof(Dashboard_PersonName); - public static readonly string Dashboard_LeaveUntil = nameof(Dashboard_LeaveUntil); - public static readonly string Dashboard_RecoveryTeammate = nameof(Dashboard_RecoveryTeammate); - public static readonly string Dashboard_ReviewByReviewerTemplate = nameof(Dashboard_ReviewByReviewerTemplate); - public static readonly string Dashboard_ReviewByOwnerTemplate = nameof(Dashboard_ReviewByOwnerTemplate); - public static readonly string Dashboard_ReviewAverageStatsTitle = nameof(Dashboard_ReviewAverageStatsTitle); - public static readonly string Dashboard_ReviewAverageFirstTouch = nameof(Dashboard_ReviewAverageFirstTouch); - public static readonly string Dashboard_ReviewAverageReview = nameof(Dashboard_ReviewAverageReview); - public static readonly string Dashboard_ReviewAverageCorrection = nameof(Dashboard_ReviewAverageCorrection); - public static readonly string Dashboard_ReviewDescriptionTitle = nameof(Dashboard_ReviewDescriptionTitle); - public static readonly string Dashboard_ReviewReviewerNameTitle = nameof(Dashboard_ReviewReviewerNameTitle); - public static readonly string Dashboard_ReviewOwnerNameTitle = nameof(Dashboard_ReviewOwnerNameTitle); - public static readonly string Dashboard_ReviewStateTitle = nameof(Dashboard_ReviewStateTitle); - public static readonly string Dashboard_ReviewStateNone = nameof(Dashboard_ReviewStateNone); - public static readonly string Dashboard_ReviewStateNew = nameof(Dashboard_ReviewStateNew); - public static readonly string Dashboard_ReviewStateInProgress = nameof(Dashboard_ReviewStateInProgress); - public static readonly string Dashboard_ReviewStateOnCorrection = nameof(Dashboard_ReviewStateOnCorrection); - public static readonly string Dashboard_ReviewStateAccept = nameof(Dashboard_ReviewStateAccept); - public static readonly string Dashboard_ReviewStats = nameof(Dashboard_ReviewStats); - public static readonly string Dashboard_FirstTouch = nameof(Dashboard_FirstTouch); - public static readonly string Dashboard_Correction = nameof(Dashboard_Correction); - public static readonly string Dashboard_Review = nameof(Dashboard_Review); - public static readonly string Dashboard_NoData = nameof(Dashboard_NoData); - public static readonly string Dashboard_TeammatesWidgetTitle = nameof(Dashboard_TeammatesWidgetTitle); - public static readonly string Dashboard_BotWidgetTitle = nameof(Dashboard_BotWidgetTitle); - public static readonly string Dashboard_ReviewTotalStatsWidgetTitle = nameof(Dashboard_ReviewTotalStatsWidgetTitle); - public static readonly string Dashboard_LastTasksWidgetTitle = nameof(Dashboard_LastTasksWidgetTitle); - public static readonly string Dashboard_ReviewAverageStatsWidgetTitle = nameof(Dashboard_ReviewAverageStatsWidgetTitle); - public static readonly string Dashboard_CheckInMoveToMapTitle = nameof(Dashboard_CheckInMoveToMapTitle); - public static readonly string Dashboard_CheckInMapWidgetTitle = nameof(Dashboard_CheckInMapWidgetTitle); - public static readonly string Dashboard_RandomCoffeeHistoryWidgetTitle = nameof(Dashboard_RandomCoffeeHistoryWidgetTitle); - public static readonly string Dashboard_RandomCoffeeNoPair = nameof(Dashboard_RandomCoffeeNoPair); - public static readonly string Dashboard_RandomCoffeeFirstTitle = nameof(Dashboard_RandomCoffeeFirstTitle); - public static readonly string Dashboard_RandomCoffeeSecondTitle = nameof(Dashboard_RandomCoffeeSecondTitle); - public static readonly string Dashboard_TwoWeeks = nameof(Dashboard_TwoWeeks); - public static readonly string Dashboard_FourWeeks = nameof(Dashboard_FourWeeks); - public static readonly string Dashboard_TwelveWeeks = nameof(Dashboard_TwelveWeeks); - public static readonly string Dashboard_OneMonth = nameof(Dashboard_OneMonth); - public static readonly string Dashboard_ThreeMonths = nameof(Dashboard_ThreeMonths); - public static readonly string Dashboard_SixMonths = nameof(Dashboard_SixMonths); - public static readonly string Dashboard_GoToCurrentSessionButtonText = nameof(Dashboard_GoToCurrentSessionButtonText); - public static readonly string Dashboard_AssessmentDate = nameof(Dashboard_AssessmentDate); - public static readonly string Dashboard_AppraiserHistoryTitle = nameof(Dashboard_AppraiserHistoryTitle); - public static readonly string Dashboard_TotalStories = nameof(Dashboard_TotalStories); - public static readonly string Dashboard_AssessmentSum = nameof(Dashboard_AssessmentSum); - public static readonly string Dashboard_ConnectToTeamHelp = nameof(Dashboard_ConnectToTeamHelp); - public static readonly string Dashboard_ConnectToTeamButton = nameof(Dashboard_ConnectToTeamButton); - public static readonly string Dashboard_HasConcreteReviewer = nameof(Dashboard_HasConcreteReviewer); - public static readonly string Dashboard_IsOriginalReviewer = nameof(Dashboard_IsOriginalReviewer); - public static readonly string Dashboard_AppraiserIntegrationTitle = nameof(Dashboard_AppraiserIntegrationTitle); - public static readonly string Dashboard_AppraiserIntegrationAccessTokenLabel = nameof(Dashboard_AppraiserIntegrationAccessTokenLabel); - public static readonly string Dashboard_AppraiserIntegrationProjectKeyLabel = nameof(Dashboard_AppraiserIntegrationProjectKeyLabel); - public static readonly string Dashboard_AppraiserIntegrationScrumMasterLabel = nameof(Dashboard_AppraiserIntegrationScrumMasterLabel); - public static readonly string Dashboard_AppraiserIntegrationSaveButton = nameof(Dashboard_AppraiserIntegrationSaveButton); - public static readonly string Dashboard_AppraiserIntegrationDisableButton = nameof(Dashboard_AppraiserIntegrationDisableButton); - public static readonly string Dashboard_AppraiserIntegrationEnableButton = nameof(Dashboard_AppraiserIntegrationEnableButton); - public static readonly string Dashboard_AppraiserIntegrationConfirmText = nameof(Dashboard_AppraiserIntegrationConfirmText); - public static readonly string Dashboard_AppraiserIntegrationEnableSuccess = nameof(Dashboard_AppraiserIntegrationEnableSuccess); - public static readonly string Dashboard_Settings = nameof(Dashboard_Settings); - public static readonly string Dashboard_Apply = nameof(Dashboard_Apply); - public static readonly string Dashboard_SettingsApplied = nameof(Dashboard_SettingsApplied); - public static readonly string ContentDialog_Close = nameof(ContentDialog_Close); + public static readonly MessageId Dashboard_MoveToDashboard = new(nameof(Dashboard_MoveToDashboard)); + public static readonly MessageId Dashboard_Title = new(nameof(Dashboard_Title)); + public static readonly MessageId Dashboard_SelectTeam = new(nameof(Dashboard_SelectTeam)); + public static readonly MessageId Dashboard_CreateBot = new(nameof(Dashboard_CreateBot)); + public static readonly MessageId Dashboard_SelectTeamTitle = new(nameof(Dashboard_SelectTeamTitle)); + public static readonly MessageId Dashboard_TeamField = new(nameof(Dashboard_TeamField)); + public static readonly MessageId Dashboard_BotField = new(nameof(Dashboard_BotField)); + public static readonly MessageId Dashboard_ExcludeFromTeam = new(nameof(Dashboard_ExcludeFromTeam)); + public static readonly MessageId Dashboard_LeaveTeammate = new(nameof(Dashboard_LeaveTeammate)); + public static readonly MessageId Dashboard_Days = new(nameof(Dashboard_Days)); + public static readonly MessageId Dashboard_Forever = new(nameof(Dashboard_Forever)); + public static readonly MessageId Dashboard_PersonName = new(nameof(Dashboard_PersonName)); + public static readonly MessageId Dashboard_LeaveUntil = new(nameof(Dashboard_LeaveUntil)); + public static readonly MessageId Dashboard_RecoveryTeammate = new(nameof(Dashboard_RecoveryTeammate)); + public static readonly MessageId Dashboard_ReviewByReviewerTemplate = new(nameof(Dashboard_ReviewByReviewerTemplate)); + public static readonly MessageId Dashboard_ReviewByOwnerTemplate = new(nameof(Dashboard_ReviewByOwnerTemplate)); + public static readonly MessageId Dashboard_ReviewAverageStatsTitle = new(nameof(Dashboard_ReviewAverageStatsTitle)); + public static readonly MessageId Dashboard_ReviewAverageFirstTouch = new(nameof(Dashboard_ReviewAverageFirstTouch)); + public static readonly MessageId Dashboard_ReviewAverageReview = new(nameof(Dashboard_ReviewAverageReview)); + public static readonly MessageId Dashboard_ReviewAverageCorrection = new(nameof(Dashboard_ReviewAverageCorrection)); + public static readonly MessageId Dashboard_ReviewDescriptionTitle = new(nameof(Dashboard_ReviewDescriptionTitle)); + public static readonly MessageId Dashboard_ReviewReviewerNameTitle = new(nameof(Dashboard_ReviewReviewerNameTitle)); + public static readonly MessageId Dashboard_ReviewOwnerNameTitle = new(nameof(Dashboard_ReviewOwnerNameTitle)); + public static readonly MessageId Dashboard_ReviewStateTitle = new(nameof(Dashboard_ReviewStateTitle)); + public static readonly MessageId Dashboard_ReviewStateNone = new(nameof(Dashboard_ReviewStateNone)); + public static readonly MessageId Dashboard_ReviewStateNew = new(nameof(Dashboard_ReviewStateNew)); + public static readonly MessageId Dashboard_ReviewStateInProgress = new(nameof(Dashboard_ReviewStateInProgress)); + public static readonly MessageId Dashboard_ReviewStateOnCorrection = new(nameof(Dashboard_ReviewStateOnCorrection)); + public static readonly MessageId Dashboard_ReviewStateAccept = new(nameof(Dashboard_ReviewStateAccept)); + public static readonly MessageId Dashboard_ReviewStats = new(nameof(Dashboard_ReviewStats)); + public static readonly MessageId Dashboard_FirstTouch = new(nameof(Dashboard_FirstTouch)); + public static readonly MessageId Dashboard_Correction = new(nameof(Dashboard_Correction)); + public static readonly MessageId Dashboard_Review = new(nameof(Dashboard_Review)); + public static readonly MessageId Dashboard_NoData = new(nameof(Dashboard_NoData)); + public static readonly MessageId Dashboard_TeammatesWidgetTitle = new(nameof(Dashboard_TeammatesWidgetTitle)); + public static readonly MessageId Dashboard_BotWidgetTitle = new(nameof(Dashboard_BotWidgetTitle)); + public static readonly MessageId Dashboard_ReviewTotalStatsWidgetTitle = new(nameof(Dashboard_ReviewTotalStatsWidgetTitle)); + public static readonly MessageId Dashboard_LastTasksWidgetTitle = new(nameof(Dashboard_LastTasksWidgetTitle)); + public static readonly MessageId Dashboard_ReviewAverageStatsWidgetTitle = new(nameof(Dashboard_ReviewAverageStatsWidgetTitle)); + public static readonly MessageId Dashboard_CheckInMoveToMapTitle = new(nameof(Dashboard_CheckInMoveToMapTitle)); + public static readonly MessageId Dashboard_CheckInMapWidgetTitle = new(nameof(Dashboard_CheckInMapWidgetTitle)); + public static readonly MessageId Dashboard_RandomCoffeeHistoryWidgetTitle = new(nameof(Dashboard_RandomCoffeeHistoryWidgetTitle)); + public static readonly MessageId Dashboard_RandomCoffeeNoPair = new(nameof(Dashboard_RandomCoffeeNoPair)); + public static readonly MessageId Dashboard_RandomCoffeeFirstTitle = new(nameof(Dashboard_RandomCoffeeFirstTitle)); + public static readonly MessageId Dashboard_RandomCoffeeSecondTitle = new(nameof(Dashboard_RandomCoffeeSecondTitle)); + public static readonly MessageId Dashboard_TwoWeeks = new(nameof(Dashboard_TwoWeeks)); + public static readonly MessageId Dashboard_FourWeeks = new(nameof(Dashboard_FourWeeks)); + public static readonly MessageId Dashboard_TwelveWeeks = new(nameof(Dashboard_TwelveWeeks)); + public static readonly MessageId Dashboard_OneMonth = new(nameof(Dashboard_OneMonth)); + public static readonly MessageId Dashboard_ThreeMonths = new(nameof(Dashboard_ThreeMonths)); + public static readonly MessageId Dashboard_SixMonths = new(nameof(Dashboard_SixMonths)); + public static readonly MessageId Dashboard_GoToCurrentSessionButtonText = new(nameof(Dashboard_GoToCurrentSessionButtonText)); + public static readonly MessageId Dashboard_AssessmentDate = new(nameof(Dashboard_AssessmentDate)); + public static readonly MessageId Dashboard_AppraiserHistoryTitle = new(nameof(Dashboard_AppraiserHistoryTitle)); + public static readonly MessageId Dashboard_TotalStories = new(nameof(Dashboard_TotalStories)); + public static readonly MessageId Dashboard_AssessmentSum = new(nameof(Dashboard_AssessmentSum)); + public static readonly MessageId Dashboard_ConnectToTeamHelp = new(nameof(Dashboard_ConnectToTeamHelp)); + public static readonly MessageId Dashboard_ConnectToTeamButton = new(nameof(Dashboard_ConnectToTeamButton)); + public static readonly MessageId Dashboard_HasConcreteReviewer = new(nameof(Dashboard_HasConcreteReviewer)); + public static readonly MessageId Dashboard_IsOriginalReviewer = new(nameof(Dashboard_IsOriginalReviewer)); + public static readonly MessageId Dashboard_AppraiserIntegrationTitle = new(nameof(Dashboard_AppraiserIntegrationTitle)); + public static readonly MessageId Dashboard_AppraiserIntegrationAccessTokenLabel = new(nameof(Dashboard_AppraiserIntegrationAccessTokenLabel)); + public static readonly MessageId Dashboard_AppraiserIntegrationProjectKeyLabel = new(nameof(Dashboard_AppraiserIntegrationProjectKeyLabel)); + public static readonly MessageId Dashboard_AppraiserIntegrationScrumMasterLabel = new(nameof(Dashboard_AppraiserIntegrationScrumMasterLabel)); + public static readonly MessageId Dashboard_AppraiserIntegrationSaveButton = new(nameof(Dashboard_AppraiserIntegrationSaveButton)); + public static readonly MessageId Dashboard_AppraiserIntegrationDisableButton = new(nameof(Dashboard_AppraiserIntegrationDisableButton)); + public static readonly MessageId Dashboard_AppraiserIntegrationEnableButton = new(nameof(Dashboard_AppraiserIntegrationEnableButton)); + public static readonly MessageId Dashboard_AppraiserIntegrationConfirmText = new(nameof(Dashboard_AppraiserIntegrationConfirmText)); + public static readonly MessageId Dashboard_AppraiserIntegrationEnableSuccess = new(nameof(Dashboard_AppraiserIntegrationEnableSuccess)); + public static readonly MessageId Dashboard_Settings = new(nameof(Dashboard_Settings)); + public static readonly MessageId Dashboard_Apply = new(nameof(Dashboard_Apply)); + public static readonly MessageId Dashboard_SettingsApplied = new(nameof(Dashboard_SettingsApplied)); + public static readonly MessageId ContentDialog_Close = new(nameof(ContentDialog_Close)); - public static readonly string Footer_GroupNavigation = nameof(Footer_GroupNavigation); - public static readonly string Footer_GroupTech = nameof(Footer_GroupTech); - public static readonly string Footer_GroupStorage = nameof(Footer_GroupStorage); - public static readonly string Footer_GroupTools = nameof(Footer_GroupTools); - public static readonly string Footer_LinkMain = nameof(Footer_LinkMain); - public static readonly string Footer_LinkConstructor = nameof(Footer_LinkConstructor); - public static readonly string Footer_LinkDashboard = nameof(Footer_LinkDashboard); + public static readonly MessageId Footer_GroupNavigation = new(nameof(Footer_GroupNavigation)); + public static readonly MessageId Footer_GroupTech = new(nameof(Footer_GroupTech)); + public static readonly MessageId Footer_GroupStorage = new(nameof(Footer_GroupStorage)); + public static readonly MessageId Footer_GroupTools = new(nameof(Footer_GroupTools)); + public static readonly MessageId Footer_LinkMain = new(nameof(Footer_LinkMain)); + public static readonly MessageId Footer_LinkConstructor = new(nameof(Footer_LinkConstructor)); + public static readonly MessageId Footer_LinkDashboard = new(nameof(Footer_LinkDashboard)); - public static readonly string Login_AsSuperuserText = nameof(Login_AsSuperuserText); - public static readonly string Login_Title = nameof(Login_Title); - public static readonly string Login_CreateBot = nameof(Login_CreateBot); - public static readonly string Login_TelegramText = nameof(Login_TelegramText); + public static readonly MessageId Login_AsSuperuserText = new(nameof(Login_AsSuperuserText)); + public static readonly MessageId Login_Title = new(nameof(Login_Title)); + public static readonly MessageId Login_CreateBot = new(nameof(Login_CreateBot)); + public static readonly MessageId Login_TelegramText = new(nameof(Login_TelegramText)); - public static readonly string ConfirmDialog_Yes = nameof(ConfirmDialog_Yes); - public static readonly string ConfirmDialog_No = nameof(ConfirmDialog_No); + public static readonly MessageId ConfirmDialog_Yes = new(nameof(ConfirmDialog_Yes)); + public static readonly MessageId ConfirmDialog_No = new(nameof(ConfirmDialog_No)); - public static readonly string Validation_TokenInvalid = nameof(Validation_TokenInvalid); + public static readonly MessageId Validation_TokenInvalid = new(nameof(Validation_TokenInvalid)); - public static readonly string OgMainTitle = nameof(OgMainTitle); - public static readonly string OgMainDescription = nameof(OgMainDescription); - public static readonly string OgMainImageText = nameof(OgMainImageText); - public static readonly string OgAppraiserTitle = nameof(OgAppraiserTitle); - public static readonly string OgAppraiserDescription = nameof(OgAppraiserDescription); - public static readonly string OgAppraiserImageText = nameof(OgAppraiserImageText); - public static readonly string OgCheckInTitle = nameof(OgCheckInTitle); - public static readonly string OgCheckInDescription = nameof(OgCheckInDescription); - public static readonly string OgCheckInImageText = nameof(OgCheckInImageText); + public static readonly MessageId OgMainTitle = new(nameof(OgMainTitle)); + public static readonly MessageId OgMainDescription = new(nameof(OgMainDescription)); + public static readonly MessageId OgMainImageText = new(nameof(OgMainImageText)); + public static readonly MessageId OgAppraiserTitle = new(nameof(OgAppraiserTitle)); + public static readonly MessageId OgAppraiserDescription = new(nameof(OgAppraiserDescription)); + public static readonly MessageId OgAppraiserImageText = new(nameof(OgAppraiserImageText)); + public static readonly MessageId OgCheckInTitle = new(nameof(OgCheckInTitle)); + public static readonly MessageId OgCheckInDescription = new(nameof(OgCheckInDescription)); + public static readonly MessageId OgCheckInImageText = new(nameof(OgCheckInImageText)); - public static readonly string CheckIn_PageTitle = nameof(CheckIn_PageTitle); - public static readonly string CheckIn_DefaultLayerTitle = nameof(CheckIn_DefaultLayerTitle); - public static readonly string CheckIn_RouteShow = nameof(CheckIn_RouteShow); - public static readonly string CheckIn_RouteHide = nameof(CheckIn_RouteHide); + public static readonly MessageId CheckIn_PageTitle = new(nameof(CheckIn_PageTitle)); + public static readonly MessageId CheckIn_DefaultLayerTitle = new(nameof(CheckIn_DefaultLayerTitle)); + public static readonly MessageId CheckIn_RouteShow = new(nameof(CheckIn_RouteShow)); + public static readonly MessageId CheckIn_RouteHide = new(nameof(CheckIn_RouteHide)); - public static readonly string MetaAuthor = nameof(MetaAuthor); - public static readonly string MetaMainTitle = nameof(MetaMainTitle); - public static readonly string MetaMainDescription = nameof(MetaMainDescription); - public static readonly string MetaMainKeywords = nameof(MetaMainKeywords); - public static readonly string MetaAppraiserTitle = nameof(MetaAppraiserTitle); - public static readonly string MetaAppraiserDescription = nameof(MetaAppraiserDescription); - public static readonly string MetaAppraiserKeywords = nameof(MetaAppraiserKeywords); - public static readonly string MetaCheckInTitle = nameof(MetaCheckInTitle); - public static readonly string MetaCheckInDescription = nameof(MetaCheckInDescription); - public static readonly string MetaCheckInKeywords = nameof(MetaCheckInKeywords); + public static readonly MessageId MetaAuthor = new(nameof(MetaAuthor)); + public static readonly MessageId MetaMainTitle = new(nameof(MetaMainTitle)); + public static readonly MessageId MetaMainDescription = new(nameof(MetaMainDescription)); + public static readonly MessageId MetaMainKeywords = new(nameof(MetaMainKeywords)); + public static readonly MessageId MetaAppraiserTitle = new(nameof(MetaAppraiserTitle)); + public static readonly MessageId MetaAppraiserDescription = new(nameof(MetaAppraiserDescription)); + public static readonly MessageId MetaAppraiserKeywords = new(nameof(MetaAppraiserKeywords)); + public static readonly MessageId MetaCheckInTitle = new(nameof(MetaCheckInTitle)); + public static readonly MessageId MetaCheckInDescription = new(nameof(MetaCheckInDescription)); + public static readonly MessageId MetaCheckInKeywords = new(nameof(MetaCheckInKeywords)); - public static readonly string PanelOpen = nameof(PanelOpen); - public static readonly string PanelSave = nameof(PanelSave); - public static readonly string LoadingReload = nameof(LoadingReload); + public static readonly MessageId PanelOpen = new(nameof(PanelOpen)); + public static readonly MessageId PanelSave = new(nameof(PanelSave)); + public static readonly MessageId LoadingReload = new(nameof(LoadingReload)); } \ No newline at end of file diff --git a/src/Inc.TeamAssistant.WebUI/Services/ClientCore/ResourcesManager.cs b/src/Inc.TeamAssistant.WebUI/Services/ClientCore/ResourcesManager.cs index a8ea87a9..4013dbf5 100644 --- a/src/Inc.TeamAssistant.WebUI/Services/ClientCore/ResourcesManager.cs +++ b/src/Inc.TeamAssistant.WebUI/Services/ClientCore/ResourcesManager.cs @@ -1,3 +1,4 @@ +using Inc.TeamAssistant.Primitives.Languages; using Inc.TeamAssistant.WebUI.Contracts; using Microsoft.AspNetCore.Components; @@ -58,18 +59,18 @@ private async Task Load(CancellationToken token) _resources = resources; } - public string this[string name] + public string this[MessageId messageId] { get { - ArgumentException.ThrowIfNullOrWhiteSpace(name); + ArgumentNullException.ThrowIfNull(messageId); var languageContext = _renderContext.GetLanguageContext(); var resources = _resources.TryGetValue(languageContext.CurrentLanguage.Value, out var result) ? result : new Dictionary(); - return resources.GetValueOrDefault(name, name); + return resources.GetValueOrDefault(messageId.Value, messageId.Value); } }