From 81cc73ece35d1892a397ad8b4fe14542d646a85f Mon Sep 17 00:00:00 2001 From: Jan-Philipp Benecke Date: Wed, 27 Nov 2024 07:49:58 +0100 Subject: [PATCH] Make missed strings translatable in `ha-script-trace` and `ha-automation-trace` (#23013) --- .../config/automation/ha-automation-trace.ts | 10 ++++- src/panels/config/script/ha-script-trace.ts | 38 ++++++++++++++++--- src/translations/en.json | 5 ++- 3 files changed, 44 insertions(+), 9 deletions(-) diff --git a/src/panels/config/automation/ha-automation-trace.ts b/src/panels/config/automation/ha-automation-trace.ts index eba5464722..b5039f3faf 100644 --- a/src/panels/config/automation/ha-automation-trace.ts +++ b/src/panels/config/automation/ha-automation-trace.ts @@ -424,7 +424,9 @@ export class HaAutomationTrace extends LitElement { } await showAlertDialog(this, { - text: "Chosen trace is no longer available", + text: this.hass!.localize( + "ui.panel.config.automation.trace.trace_no_longer_available" + ), }); } @@ -471,7 +473,11 @@ export class HaAutomationTrace extends LitElement { } private _importTrace() { - const traceText = prompt("Enter downloaded trace"); + const traceText = prompt( + this.hass.localize( + "ui.panel.config.automation.trace.enter_downloaded_trace" + ) + ); if (!traceText) { return; } diff --git a/src/panels/config/script/ha-script-trace.ts b/src/panels/config/script/ha-script-trace.ts index be1ac70464..8ede65d41d 100644 --- a/src/panels/config/script/ha-script-trace.ts +++ b/src/panels/config/script/ha-script-trace.ts @@ -230,10 +230,30 @@ export class HaScriptTrace extends LitElement {
${[ - ["details", "Step Details"], - ["timeline", "Trace Timeline"], - ["logbook", "Related logbook entries"], - ["config", "Script Config"], + [ + "details", + this.hass.localize( + "ui.panel.config.automation.trace.tabs.details" + ), + ], + [ + "timeline", + this.hass.localize( + "ui.panel.config.automation.trace.tabs.timeline" + ), + ], + [ + "logbook", + this.hass.localize( + "ui.panel.config.automation.trace.tabs.logbook" + ), + ], + [ + "config", + this.hass.localize( + "ui.panel.config.automation.trace.tabs.script_config" + ), + ], ].map( ([view, label]) => html`