From cae46453a74843754e830e227912d4fe74d2df38 Mon Sep 17 00:00:00 2001 From: Yosi Levy Date: Mon, 20 Jul 2020 13:56:39 +0300 Subject: [PATCH] New parameterized label --- .../editor/card-editor/hui-dialog-edit-card.ts | 17 +++++++---------- src/translations/en.json | 1 + 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/src/panels/lovelace/editor/card-editor/hui-dialog-edit-card.ts b/src/panels/lovelace/editor/card-editor/hui-dialog-edit-card.ts index 8ff6fd9bfe..64182158e6 100755 --- a/src/panels/lovelace/editor/card-editor/hui-dialog-edit-card.ts +++ b/src/panels/lovelace/editor/card-editor/hui-dialog-edit-card.ts @@ -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( diff --git a/src/translations/en.json b/src/translations/en.json index 9dcdeb92e0..74d57e0d64 100755 --- a/src/translations/en.json +++ b/src/translations/en.json @@ -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",