Update delete dashboard dialog to be more descriptive (#10051)

Co-authored-by: Bram Kragten <mail@bramkragten.nl>
Co-authored-by: Joakim Sørensen <hi@ludeeus.dev>
This commit is contained in:
Jefferson Bledsoe 2021-09-22 10:38:21 +01:00 committed by GitHub
parent 49494c572b
commit ea51186767
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 3 deletions

View File

@ -279,9 +279,14 @@ export class HaConfigLovelaceDashboards extends LitElement {
removeDashboard: async () => { removeDashboard: async () => {
if ( if (
!(await showConfirmationDialog(this, { !(await showConfirmationDialog(this, {
text: this.hass!.localize( title: this.hass!.localize(
"ui.panel.config.lovelace.dashboards.confirm_delete" "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; return false;

View File

@ -1254,7 +1254,8 @@
"open": "Open", "open": "Open",
"add_dashboard": "Add dashboard" "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_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.", "cant_edit_default": "The standard Lovelace dashboard cannot be edited from the UI. You can hide it by setting another dashboard as default.",
"detail": { "detail": {