From 85cf7daaefd4109078a1fe17f6f26ecb9d05399d Mon Sep 17 00:00:00 2001 From: Dmitry Dzygin Date: Mon, 8 Nov 2021 12:44:35 +0100 Subject: [PATCH] Fixing display name not being shown for some of the timezones --- .../C1Console/Tools/SetTimeZoneWorkflow.cs | 8 ++++++-- .../Composite.Plugins.TimezoneDisplayNames.en-us.xml | 11 ++++++++++- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/Composite.Workflows/C1Console/Tools/SetTimeZoneWorkflow.cs b/Composite.Workflows/C1Console/Tools/SetTimeZoneWorkflow.cs index f0096146e2..2bc165dee3 100644 --- a/Composite.Workflows/C1Console/Tools/SetTimeZoneWorkflow.cs +++ b/Composite.Workflows/C1Console/Tools/SetTimeZoneWorkflow.cs @@ -46,9 +46,13 @@ public SetTimeZoneWorkflow() private void initializeCodeActivity_InitializeBindings_ExecuteCode(object sender, EventArgs e) { + string label; var tzs = TimeZoneInfo.GetSystemTimeZones().ToDictionary(systemTimeZone => systemTimeZone.Id, systemTimeZone => - StringResourceSystemFacade.GetString("Composite.Plugins.TimezoneDisplayNames", - "TimezoneDisplayName." + systemTimeZone.Id)); + StringResourceSystemFacade.TryGetString("Composite.Plugins.TimezoneDisplayNames", + "TimezoneDisplayName." + systemTimeZone.Id, out label) + ? label + : systemTimeZone.DisplayName); + var bindings = new Dictionary { {"TimeZones", tzs}, diff --git a/Website/Composite/localization/Composite.Plugins.TimezoneDisplayNames.en-us.xml b/Website/Composite/localization/Composite.Plugins.TimezoneDisplayNames.en-us.xml index 162c1aeb96..3f5d39f231 100644 --- a/Website/Composite/localization/Composite.Plugins.TimezoneDisplayNames.en-us.xml +++ b/Website/Composite/localization/Composite.Plugins.TimezoneDisplayNames.en-us.xml @@ -1,4 +1,4 @@ - + @@ -13,6 +13,7 @@ + @@ -38,6 +39,7 @@ + @@ -48,6 +50,7 @@ + @@ -65,30 +68,36 @@ + + + + + +