Update Restart add-on dialog (#13896)

This commit is contained in:
Paul Bottein 2022-09-28 11:01:12 +02:00 committed by GitHub
parent be30cdb51f
commit 4a07d3d39b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 9 deletions

View File

@ -18,9 +18,11 @@ export const suggestAddonRestart = async (
addon: HassioAddonDetails
): Promise<void> => {
const confirmed = await showConfirmationDialog(element, {
title: supervisor.localize("common.restart_name", "name", addon.name),
title: supervisor.localize("dialog.restart_addon.title", {
name: addon.name,
}),
text: supervisor.localize("dialog.restart_addon.text"),
confirmText: supervisor.localize("dialog.restart_addon.confirm_text"),
confirmText: supervisor.localize("dialog.restart_addon.restart"),
dismissText: supervisor.localize("common.cancel"),
});
if (confirmed) {
@ -28,11 +30,9 @@ export const suggestAddonRestart = async (
await restartHassioAddon(hass, addon.slug);
} catch (err: any) {
showAlertDialog(element, {
title: supervisor.localize(
"common.failed_to_restart_name",
"name",
addon.name
),
title: supervisor.localize("common.failed_to_restart_name", {
name: addon.name,
}),
text: extractApiErrorMessage(err),
});
}

View File

@ -5129,8 +5129,9 @@
"used": "Repository is in use for installed add-ons and can't be removed."
},
"restart_addon": {
"confirm_text": "Restart add-on",
"text": "Do you want to restart the add-on with your changes?"
"title": "Restart {name}?",
"text": "To use the new saved configuration this add-on must be restarted.",
"restart": "Restart"
},
"hardware": {
"title": "Hardware",