Skip to content

Commit

Permalink
localize migrate script / automation
Browse files Browse the repository at this point in the history
  • Loading branch information
silamon committed Oct 31, 2024
1 parent f9bbe12 commit a9e47ed
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 6 deletions.
8 changes: 6 additions & 2 deletions src/panels/config/automation/ha-automation-editor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -712,8 +712,12 @@ export class HaAutomationEditor extends KeyboardShortcutMixin(LitElement) {
private async _duplicate() {
const result = this._readOnly
? await showConfirmationDialog(this, {
title: "Migrate automation?",
text: "You can migrate this automation, so it can be edited from the UI. After it is migrated and you have saved it, you will have to manually delete your old automation from your configuration. Do you want to migrate this automation?",
title: this.hass.localize(
"ui.panel.config.automation.picker.migrate_automation"
),
text: this.hass.localize(
"ui.panel.config.automation.picker.migrate_automation_description"
),
})
: await this.confirmUnsavedChanged();
if (result) {
Expand Down
8 changes: 6 additions & 2 deletions src/panels/config/script/ha-script-editor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -681,8 +681,12 @@ export class HaScriptEditor extends KeyboardShortcutMixin(LitElement) {
private async _duplicate() {
const result = this._readOnly
? await showConfirmationDialog(this, {
title: "Migrate script?",
text: "You can migrate this script, so it can be edited from the UI. After it is migrated and you have saved it, you will have to manually delete your old script from your configuration. Do you want to migrate this script?",
title: this.hass.localize(
"ui.panel.config.script.picker.migrate_script"

Check failure on line 685 in src/panels/config/script/ha-script-editor.ts

View workflow job for this annotation

GitHub Actions / Lint and check format

Argument of type '"ui.panel.config.script.picker.migrate_script"' is not assignable to parameter of type 'LocalizeKeys'.
),
text: this.hass.localize(
"ui.panel.config.script.picker.migrate_script_description"

Check failure on line 688 in src/panels/config/script/ha-script-editor.ts

View workflow job for this annotation

GitHub Actions / Lint and check format

Argument of type '"ui.panel.config.script.picker.migrate_script_description"' is not assignable to parameter of type 'LocalizeKeys'.
),
})
: await this.confirmUnsavedChanged();
if (result) {
Expand Down
8 changes: 6 additions & 2 deletions src/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -2792,7 +2792,9 @@
},
"empty_header": "Start automating",
"empty_text_1": "Automations make Home Assistant automatically respond to things happening in and around your home.",
"empty_text_2": "Automations connect triggers to actions in a ''when trigger then action'' fashion with optional conditions. For example: ''When the sun sets and if {user} is home, then turn on the lights''."
"empty_text_2": "Automations connect triggers to actions in a ''when trigger then action'' fashion with optional conditions. For example: ''When the sun sets and if {user} is home, then turn on the lights''.",
"migrate_automation": "Migrate automation?",
"migrate_automation_description": "You can migrate this automation, so it can be edited from the UI. After it is migrated and you have saved it, you will have to manually delete your old automation from your configuration. Do you want to migrate this automation?"
},
"dialog_new": {
"header": "Create automation",
Expand Down Expand Up @@ -3746,7 +3748,9 @@
"save_script": "Save script",
"sequence": "Sequence",
"sequence_sentence": "The sequence of actions of this script.",
"link_available_actions": "Learn more about available actions."
"link_available_actions": "Learn more about available actions.",
"migrate_script": "Migrate script?",
"migrate_script_description": "You can migrate this script, so it can be edited from the UI. After it is migrated and you have saved it, you will have to manually delete your old script from your configuration. Do you want to migrate this script?"
},
"trace": {
"edit_script": "Edit script"
Expand Down

0 comments on commit a9e47ed

Please sign in to comment.