From 9bb6d8b20b41c8d02678c6a320f15b1262393c0e Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Mon, 30 Aug 2021 13:50:48 +0200 Subject: [PATCH] https://github.com/umbraco/Umbraco-CMS/issues/10927 - Fixed issue with translations but still support the fix for https://github.com/umbraco/Umbraco-CMS/issues/10627 --- src/Umbraco.Core/Services/LocalizedTextServiceExtensions.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Umbraco.Core/Services/LocalizedTextServiceExtensions.cs b/src/Umbraco.Core/Services/LocalizedTextServiceExtensions.cs index 49512ccae8..39704b2bb2 100644 --- a/src/Umbraco.Core/Services/LocalizedTextServiceExtensions.cs +++ b/src/Umbraco.Core/Services/LocalizedTextServiceExtensions.cs @@ -65,7 +65,7 @@ namespace Umbraco.Extensions if (text == null) return null; - if (text.StartsWith("#") == false || text.IndexOf('_') == -1) + if (text.StartsWith("#") == false) return text; text = text.Substring(1); @@ -75,6 +75,9 @@ namespace Umbraco.Extensions return value; } + if (text.IndexOf('_') == -1) + return text; + var areaAndKey = text.Split('_'); if (areaAndKey.Length < 2)