Skip to content

Commit

Permalink
Make quotation marks localizable in Add badge dialog (#23383)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
NoRi2909 authored Dec 23, 2024
1 parent 8fa36c8 commit a35ba38
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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");

Expand Down
2 changes: 1 addition & 1 deletion src/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -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%]",
Expand Down

0 comments on commit a35ba38

Please sign in to comment.