Make missed strings translatable in ha-script-trace and ha-automation-trace (#23013)

This commit is contained in:
Jan-Philipp Benecke 2024-11-27 07:49:58 +01:00 committed by GitHub
parent f9701b2363
commit 81cc73ece3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 44 additions and 9 deletions

View File

@ -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;
}

View File

@ -230,10 +230,30 @@ export class HaScriptTrace extends LitElement {
<div class="info">
<div class="tabs top">
${[
["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`
<button
@ -410,7 +430,9 @@ export class HaScriptTrace 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"
),
});
}
@ -457,7 +479,11 @@ export class HaScriptTrace 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;
}

View File

@ -3614,6 +3614,8 @@
"older_trace": "Older trace",
"newer_trace": "Newer trace",
"no_traces_found": "No traces found",
"trace_no_longer_available": "Chosen trace is no longer available",
"enter_downloaded_trace": "Enter downloaded trace",
"tabs": {
"details": "Step Details",
"timeline": "Trace Timeline",
@ -3621,7 +3623,8 @@
"automation_config": "Automation Config",
"step_config": "Step Config",
"changed_variables": "Changed Variables",
"blueprint_config": "Blueprint Config"
"blueprint_config": "Blueprint Config",
"script_config": "Script Config"
},
"path": {
"choose": "Select a step on the left for more information.",