From 7ffd30643ad27275680a576aa5f818a1178d83a2 Mon Sep 17 00:00:00 2001 From: Paul Bottein Date: Fri, 16 Sep 2022 16:39:51 +0200 Subject: [PATCH] Update delete person dialog (#13763) --- src/panels/config/person/ha-config-person.ts | 10 ++++++++-- src/translations/en.json | 4 ++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/panels/config/person/ha-config-person.ts b/src/panels/config/person/ha-config-person.ts index 4546e79507..87d16caf94 100644 --- a/src/panels/config/person/ha-config-person.ts +++ b/src/panels/config/person/ha-config-person.ts @@ -233,10 +233,16 @@ class HaConfigPerson extends LitElement { removeEntry: async () => { if ( !(await showConfirmationDialog(this, { - title: this.hass!.localize("ui.panel.config.person.confirm_delete"), - text: this.hass!.localize("ui.panel.config.person.confirm_delete2"), + title: this.hass!.localize( + "ui.panel.config.person.confirm_delete_title", + { name: entry!.name } + ), + text: this.hass!.localize( + "ui.panel.config.person.confirm_delete_text" + ), dismissText: this.hass!.localize("ui.common.cancel"), confirmText: this.hass!.localize("ui.common.delete"), + destructive: true, })) ) { return false; diff --git a/src/translations/en.json b/src/translations/en.json index e15a9985d5..8d2387eb14 100755 --- a/src/translations/en.json +++ b/src/translations/en.json @@ -2749,8 +2749,8 @@ "no_persons_created_yet": "Looks like you have not added any people yet.", "create_person": "Create Person", "add_person": "Add Person", - "confirm_delete": "Are you sure you want to delete this person?", - "confirm_delete2": "All devices belonging to this person will become unassigned.", + "confirm_delete_title": "Delete {name}?", + "confirm_delete_text": "This person will be permanently deleted and all devices belonging to this person will become unassigned.", "person_not_found_title": "Person Not Found", "person_not_found": "We couldn't find the person you were trying to edit.", "detail": {