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;
if (this._cardConfig && this._cardConfig.type) {
heading = computeRTL(this.hass)
? `${this.hass!.localize("ui.panel.lovelace.editor.edit_card.header")}
${this.hass!.localize(
`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"
)}`;
heading = this.hass!.localize(
"ui.panel.lovelace.editor.edit_card.typed_header",
"type",
this.hass!.localize(
`ui.panel.lovelace.editor.card.${this._cardConfig.type}.name`
)
);
} else if (!this._cardConfig) {
heading = this._viewConfig.title
? this.hass!.localize(

View File

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