From fb094f46befe99433cebed345c931734de6d1778 Mon Sep 17 00:00:00 2001 From: Kenn Jacobsen Date: Fri, 7 Dec 2018 14:17:34 +0100 Subject: [PATCH] Fix edit content localization errors (#3840) * Fix wrongly formatted localizations * Swap hardcoded time format for a localized one * Split date and time in publish messages --- src/Umbraco.Web.UI/umbraco/config/lang/da.xml | 4 ++-- src/Umbraco.Web.UI/umbraco/config/lang/en.xml | 4 ++-- src/Umbraco.Web.UI/umbraco/config/lang/en_us.xml | 4 ++-- src/Umbraco.Web/Editors/ContentController.cs | 6 ++---- 4 files changed, 8 insertions(+), 10 deletions(-) diff --git a/src/Umbraco.Web.UI/umbraco/config/lang/da.xml b/src/Umbraco.Web.UI/umbraco/config/lang/da.xml index 01e4a2a031..815cc7bce3 100644 --- a/src/Umbraco.Web.UI/umbraco/config/lang/da.xml +++ b/src/Umbraco.Web.UI/umbraco/config/lang/da.xml @@ -1079,10 +1079,10 @@ Mange hilsner fra Umbraco robotten Ordbogsnøgle gemt Indhold publiceret og nu synligt for besøgende - og nu synligt for besøgende indtil {0} + og nu synligt for besøgende indtil %0% kl. %1% Indhold gemt Husk at publicere for at gøre det synligt for besøgende - Ændringerne bliver publiceret den {0} + Ændringerne bliver publiceret den %0% kl. %1% Send til Godkendelse Rettelser er blevet sendt til godkendelse Medie gemt diff --git a/src/Umbraco.Web.UI/umbraco/config/lang/en.xml b/src/Umbraco.Web.UI/umbraco/config/lang/en.xml index e22943fd40..319743302b 100644 --- a/src/Umbraco.Web.UI/umbraco/config/lang/en.xml +++ b/src/Umbraco.Web.UI/umbraco/config/lang/en.xml @@ -1397,10 +1397,10 @@ To manage your website, simply open the Umbraco back office and start adding con Publishing failed because the parent page isn't published Content published and visible on the website - and visible on the website until {0} + and visible on the website until %0% at %1% Content saved Remember to publish to make changes visible - Changes will be published on {0} + Changes will be published on %0% at %1% Sent For Approval Changes have been sent for approval Media saved diff --git a/src/Umbraco.Web.UI/umbraco/config/lang/en_us.xml b/src/Umbraco.Web.UI/umbraco/config/lang/en_us.xml index 2fd9e6a772..e2142135f9 100644 --- a/src/Umbraco.Web.UI/umbraco/config/lang/en_us.xml +++ b/src/Umbraco.Web.UI/umbraco/config/lang/en_us.xml @@ -1396,10 +1396,10 @@ To manage your website, simply open the Umbraco back office and start adding con Publishing failed because the parent page isn't published Content published and visible on the website - and visible on the website until {0} + and visible on the website until %0% at %1% Content saved Remember to publish to make changes visible - Changes will be published on {0} + Changes will be published on %0% at %1% Sent For Approval Changes have been sent for approval Media saved diff --git a/src/Umbraco.Web/Editors/ContentController.cs b/src/Umbraco.Web/Editors/ContentController.cs index 89bd8016d3..ecc4fe0ff2 100644 --- a/src/Umbraco.Web/Editors/ContentController.cs +++ b/src/Umbraco.Web/Editors/ContentController.cs @@ -697,8 +697,7 @@ namespace Umbraco.Web.Editors display.AddSuccessNotification( Services.TextService.Localize("speechBubbles/editContentSavedHeader"), contentItem.ReleaseDate.HasValue - ? string.Format(Services.TextService.Localize("speechBubbles/editContentSavedWithReleaseDateText"), - $"{contentItem.ReleaseDate.Value.ToLongDateString()} {contentItem.ReleaseDate.Value.ToString("HH:mm")}") + ? Services.TextService.Localize("speechBubbles/editContentSavedWithReleaseDateText", new [] { contentItem.ReleaseDate.Value.ToLongDateString(), contentItem.ReleaseDate.Value.ToShortTimeString() }) : Services.TextService.Localize("speechBubbles/editContentSavedText") ); } @@ -1053,8 +1052,7 @@ namespace Umbraco.Web.Editors display.AddSuccessNotification( Services.TextService.Localize("speechBubbles/editContentPublishedHeader"), expireDate.HasValue - ? string.Format(Services.TextService.Localize("speechBubbles/editContentPublishedWithExpireDateText"), - $"{expireDate.Value.ToLongDateString()} {expireDate.Value.ToString("HH:mm")}") + ? Services.TextService.Localize("speechBubbles/editContentPublishedWithExpireDateText", new [] { expireDate.Value.ToLongDateString(), expireDate.Value.ToShortTimeString() }) : Services.TextService.Localize("speechBubbles/editContentPublishedText") ); break;