From a35ba38a2d8f1945f418fd3ba4b7a3a8f2f6bc5c Mon Sep 17 00:00:00 2001 From: Norbert Rittel Date: Mon, 23 Dec 2024 06:38:18 +0100 Subject: [PATCH] Make quotation marks localizable in Add badge dialog (#23383) * Add quotation and question marks to en.json for localization Currently the quotation marks are hard-coded. This commit puts them into the strings file and adds the missing question mark at the end. * Remove hard-coded quotation marks from hui-dialog-create-badge.ts --- .../lovelace/editor/badge-editor/hui-dialog-create-badge.ts | 2 +- src/translations/en.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/panels/lovelace/editor/badge-editor/hui-dialog-create-badge.ts b/src/panels/lovelace/editor/badge-editor/hui-dialog-create-badge.ts index b284dd2fd43b..58d37b40ed73 100644 --- a/src/panels/lovelace/editor/badge-editor/hui-dialog-create-badge.ts +++ b/src/panels/lovelace/editor/badge-editor/hui-dialog-create-badge.ts @@ -81,7 +81,7 @@ export class HuiCreateDialogBadge const title = this._containerConfig.title ? this.hass!.localize( "ui.panel.lovelace.editor.edit_badge.pick_badge_title", - { name: `"${this._containerConfig.title}"` } + { name: this._containerConfig.title } ) : this.hass!.localize("ui.panel.lovelace.editor.edit_badge.pick_badge"); diff --git a/src/translations/en.json b/src/translations/en.json index ee8566aa4642..91d388eca75f 100644 --- a/src/translations/en.json +++ b/src/translations/en.json @@ -6048,7 +6048,7 @@ "header": "Badge configuration", "typed_header": "{type} Badge configuration", "pick_badge": "Which badge would you like to add?", - "pick_badge_title": "Which badge would you like to add to {name}", + "pick_badge_title": "Which badge would you like to add to \"{name}\"?", "toggle_editor": "[%key:ui::panel::lovelace::editor::edit_card::toggle_editor%]", "unsaved_changes": "[%key:ui::panel::lovelace::editor::edit_card::unsaved_changes%]", "confirm_cancel": "[%key:ui::panel::lovelace::editor::edit_card::confirm_cancel%]",