New parameterized label

This commit is contained in:
Yosi Levy 2020-07-20 13:56:39 +03:00
parent e6b9389b33
commit cae46453a7
2 changed files with 8 additions and 10 deletions

View File

@ -104,16 +104,13 @@ export class HuiDialogEditCard extends LitElement {
let heading: string; let heading: string;
if (this._cardConfig && this._cardConfig.type) { if (this._cardConfig && this._cardConfig.type) {
heading = computeRTL(this.hass) heading = this.hass!.localize(
? `${this.hass!.localize("ui.panel.lovelace.editor.edit_card.header")} "ui.panel.lovelace.editor.edit_card.typed_header",
${this.hass!.localize( "type",
this.hass!.localize(
`ui.panel.lovelace.editor.card.${this._cardConfig.type}.name` `ui.panel.lovelace.editor.card.${this._cardConfig.type}.name`
)}` )
: `${this.hass!.localize( );
`ui.panel.lovelace.editor.card.${this._cardConfig.type}.name`
)} ${this.hass!.localize(
"ui.panel.lovelace.editor.edit_card.header"
)}`;
} else if (!this._cardConfig) { } else if (!this._cardConfig) {
heading = this._viewConfig.title heading = this._viewConfig.title
? this.hass!.localize( ? this.hass!.localize(

View File

@ -1898,6 +1898,7 @@
}, },
"edit_card": { "edit_card": {
"header": "Card Configuration", "header": "Card Configuration",
"typed_header": "{type} Card Configuration",
"pick_card": "Which card would you like to add?", "pick_card": "Which card would you like to add?",
"pick_card_view_title": "Which card would you like to add to your {name} view?", "pick_card_view_title": "Which card would you like to add to your {name} view?",
"toggle_editor": "Toggle Editor", "toggle_editor": "Toggle Editor",