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

View File

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