Update delete automation dialog (#13765)

This commit is contained in:
Paul Bottein 2022-09-22 15:22:20 +02:00 committed by GitHub
parent 9f19bdde65
commit db8bc9d34a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 3 deletions

View File

@ -575,10 +575,15 @@ export class HaAutomationEditor extends KeyboardShortcutMixin(LitElement) {
private async _deleteConfirm() {
showConfirmationDialog(this, {
title: this.hass.localize(
"ui.panel.config.automation.picker.delete_confirm_title"
),
text: this.hass.localize(
"ui.panel.config.automation.picker.delete_confirm"
"ui.panel.config.automation.picker.delete_confirm_text",
{ name: this._config?.alias }
),
confirmText: this.hass!.localize("ui.common.delete"),
destructive: true,
dismissText: this.hass!.localize("ui.common.cancel"),
confirm: () => this._delete(),
});

View File

@ -341,12 +341,17 @@ class HaAutomationPicker extends LitElement {
private async _deleteConfirm(automation) {
showConfirmationDialog(this, {
title: this.hass.localize(
"ui.panel.config.automation.picker.delete_confirm_title"
),
text: this.hass.localize(
"ui.panel.config.automation.picker.delete_confirm"
"ui.panel.config.automation.picker.delete_confirm_text",
{ name: automation.name }
),
confirmText: this.hass!.localize("ui.common.delete"),
dismissText: this.hass!.localize("ui.common.cancel"),
confirm: () => this._delete(automation),
destructive: true,
});
}

View File

@ -1796,7 +1796,8 @@
"dev_automation": "Debug automation",
"show_info_automation": "Show info about automation",
"delete": "[%key:ui::common::delete%]",
"delete_confirm": "Are you sure you want to delete this automation?",
"delete_confirm_title": "Delete automation?",
"delete_confirm_text": "{name} will be permanently deleted.",
"duplicate": "[%key:ui::common::duplicate%]",
"disabled": "Disabled",
"headers": {