From ea5118676708d0c29854c51416e81108d6a0b553 Mon Sep 17 00:00:00 2001 From: Jefferson Bledsoe Date: Wed, 22 Sep 2021 10:38:21 +0100 Subject: [PATCH] Update delete dashboard dialog to be more descriptive (#10051) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Bram Kragten Co-authored-by: Joakim Sørensen --- .../lovelace/dashboards/ha-config-lovelace-dashboards.ts | 9 +++++++-- src/translations/en.json | 3 ++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/panels/config/lovelace/dashboards/ha-config-lovelace-dashboards.ts b/src/panels/config/lovelace/dashboards/ha-config-lovelace-dashboards.ts index e1784189c6..6c53171b26 100644 --- a/src/panels/config/lovelace/dashboards/ha-config-lovelace-dashboards.ts +++ b/src/panels/config/lovelace/dashboards/ha-config-lovelace-dashboards.ts @@ -279,9 +279,14 @@ export class HaConfigLovelaceDashboards extends LitElement { removeDashboard: async () => { if ( !(await showConfirmationDialog(this, { - text: this.hass!.localize( - "ui.panel.config.lovelace.dashboards.confirm_delete" + title: this.hass!.localize( + "ui.panel.config.lovelace.dashboards.confirm_delete_title", + { dashboard_title: dashboard!.title } ), + text: this.hass!.localize( + "ui.panel.config.lovelace.dashboards.confirm_delete_text" + ), + confirmText: this.hass!.localize("ui.common.delete"), })) ) { return false; diff --git a/src/translations/en.json b/src/translations/en.json index 7e0a71e14a..0c60bfa1f3 100755 --- a/src/translations/en.json +++ b/src/translations/en.json @@ -1254,7 +1254,8 @@ "open": "Open", "add_dashboard": "Add dashboard" }, - "confirm_delete": "Are you sure you want to delete this dashboard?", + "confirm_delete_title": "Delete {dashboard_title}?", + "confirm_delete_text": "Your dashboard will be permanently deleted.", "cant_edit_yaml": "Dashboards defined in YAML cannot be edited from the UI. Change them in configuration.yaml.", "cant_edit_default": "The standard Lovelace dashboard cannot be edited from the UI. You can hide it by setting another dashboard as default.", "detail": {