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
This commit is contained in:
Norbert Rittel 2024-12-23 06:38:18 +01:00 committed by GitHub
parent 8fa36c8226
commit a35ba38a2d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -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");

View File

@ -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%]",