diff --git a/src/panels/config/automation/ha-automation-editor.ts b/src/panels/config/automation/ha-automation-editor.ts index 5cc7b8abc7..74d245004a 100644 --- a/src/panels/config/automation/ha-automation-editor.ts +++ b/src/panels/config/automation/ha-automation-editor.ts @@ -82,6 +82,9 @@ export class HaAutomationEditor extends LitElement { ? "" : html` @@ -218,7 +221,11 @@ export class HaAutomationEditor extends LitElement { } private async _delete() { - if (!confirm("Are you sure you want to delete this automation?")) { + if ( + !confirm( + this.hass.localize("ui.panel.config.automation.picker.delete_confirm") + ) + ) { return; } await deleteAutomation(this.hass, this.automation.attributes.id!); diff --git a/src/panels/config/automation/ha-automation-picker.ts b/src/panels/config/automation/ha-automation-picker.ts index 632f7fc9f8..a1c69d2072 100644 --- a/src/panels/config/automation/ha-automation-picker.ts +++ b/src/panels/config/automation/ha-automation-picker.ts @@ -85,16 +85,16 @@ class HaAutomationPicker extends LitElement {
${computeStateName(automation)}
- Last triggered: ${ - automation.attributes.last_triggered - ? format_date_time( - new Date( - automation.attributes.last_triggered - ), - this.hass.language - ) - : "never" - } + ${this.hass.localize( + "ui.card.automation.last_triggered" + )}: ${ + automation.attributes.last_triggered + ? format_date_time( + new Date(automation.attributes.last_triggered), + this.hass.language + ) + : this.hass.localize("ui.components.relative_time.never") + }
@@ -102,6 +102,9 @@ class HaAutomationPicker extends LitElement { .automation=${automation} @click=${this._showInfo} icon="hass:information-outline" + title="${this.hass.localize( + "ui.panel.config.automation.picker.show_info_automation" + )}" > @@ -120,8 +126,9 @@ class HaAutomationPicker extends LitElement { !automation.attributes.id ? html` - Only automations defined in - automations.yaml are editable. + ${this.hass.localize( + "ui.panel.config.automation.picker.only_editable" + )} ` : "" diff --git a/src/panels/config/js/script.tsx b/src/panels/config/js/script.tsx index c36ce7e78f..c61da7248e 100644 --- a/src/panels/config/js/script.tsx +++ b/src/panels/config/js/script.tsx @@ -40,7 +40,7 @@ export default class ScriptEditor extends Component<{ {alias} - Use scripts to execute a sequence of actions. + {localize("ui.panel.config.script.editor.introduction")}
@@ -55,12 +55,16 @@ export default class ScriptEditor extends Component<{ - Sequence + + {localize("ui.panel.config.script.editor.sequence")} + - The sequence of actions of this script. + {localize("ui.panel.config.script.editor.sequence_sentence")}

- Learn more about available actions. + {localize( + "ui.panel.config.script.editor.link_available_actions" + )}

diff --git a/src/panels/config/script/ha-script-editor.js b/src/panels/config/script/ha-script-editor.js index 9f14af1c1b..dd06a37aae 100644 --- a/src/panels/config/script/ha-script-editor.js +++ b/src/panels/config/script/ha-script-editor.js @@ -104,6 +104,7 @@ class HaScriptEditor extends LocalizeMixin(NavigateMixin(PolymerElement)) { diff --git a/src/panels/config/script/ha-script-picker.ts b/src/panels/config/script/ha-script-picker.ts index 99d23503e1..6373cf1407 100644 --- a/src/panels/config/script/ha-script-picker.ts +++ b/src/panels/config/script/ha-script-picker.ts @@ -72,6 +72,9 @@ class HaScriptPicker extends LitElement { @@ -81,6 +84,9 @@ class HaScriptPicker extends LitElement {
diff --git a/src/translations/en.json b/src/translations/en.json index 2c0d282612..da6083486a 100755 --- a/src/translations/en.json +++ b/src/translations/en.json @@ -739,7 +739,12 @@ "learn_more": "Learn more about automations", "pick_automation": "Pick automation to edit", "no_automations": "We couldn’t find any editable automations", - "add_automation": "Add automation" + "add_automation": "Add automation", + "only_editable": "Only automations defined in automations.yaml are editable.", + "edit_automation": "Edit automation", + "show_info_automation": "Show info about automation", + "delete_automation": "Delete automation", + "delete_confirm": "Are you sure you want to delete this automation?" }, "editor": { "introduction": "Use automations to bring your home alive.", @@ -956,13 +961,20 @@ "introduction": "The script editor allows you to create and edit scripts. Please follow the link below to read the instructions to make sure that you have configured Home Assistant correctly.", "learn_more": "Learn more about scripts", "no_scripts": "We couldn’t find any editable scripts", - "add_script": "Add script" + "add_script": "Add script", + "trigger_script": "Trigger script", + "edit_script": "Edit script" }, "editor": { + "introduction": "Use scripts to execute a sequence of actions.", "header": "Script: {name}", "default_name": "New Script", "load_error_not_editable": "Only scripts inside scripts.yaml are editable.", - "delete_confirm": "Are you sure you want to delete this script?" + "delete_confirm": "Are you sure you want to delete this script?", + "delete_script": "Delete script", + "sequence": "Sequence", + "sequence_sentence": "The sequence of actions of this script.", + "link_available_actions": "Learn more about available actions." } }, "cloud": {