From 96d505c3a9f6574680c43725865e326e3f39199f Mon Sep 17 00:00:00 2001 From: detjonmataj Date: Fri, 6 Sep 2024 05:58:37 +0200 Subject: [PATCH] Fix: Update dictionary's name fallback value when using it as a placeholder in `dictionaryItem_description` localization term - Changed the fallback value from 'unnamed' to a zero-width space to avoid confusion with existing dictionary items. Using a quoted empty string is intuitive when the dictionary name is also empty. - Note: Used the zero-width space HTML entity (`​`) instead of an empty string because `term` function from `UmbLocalizationController` short-circuits the arguments with the matching placeholder. Empty strings are considered falsy values thus it return the original template without replacing the placeholders (`%index%` or `{index}`) --- .../workspace/views/workspace-view-dictionary-editor.element.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Umbraco.Web.UI.Client/src/packages/dictionary/workspace/views/workspace-view-dictionary-editor.element.ts b/src/Umbraco.Web.UI.Client/src/packages/dictionary/workspace/views/workspace-view-dictionary-editor.element.ts index ddabdf4cc2..2982f9a2dd 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/dictionary/workspace/views/workspace-view-dictionary-editor.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/dictionary/workspace/views/workspace-view-dictionary-editor.element.ts @@ -84,7 +84,7 @@ export class UmbWorkspaceViewDictionaryEditorElement extends UmbLitElement { override render() { return html` - ${unsafeHTML(this.localize.term('dictionaryItem_description', this._dictionary?.name || 'unnamed'))} + ${unsafeHTML(this.localize.term('dictionaryItem_description', this._dictionary?.name || '​'))} ${repeat( this._languages, (item) => item.unique,