Use username in example on empty automation page (#19189)

This commit is contained in:
Bram Kragten 2023-12-29 20:45:51 +01:00 committed by GitHub
parent cb568d005e
commit c95a30c837
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 4 deletions

View File

@ -62,7 +62,7 @@ class BrowseMediaTTS extends LitElement {
this.hass.localize( this.hass.localize(
"ui.components.media-browser.tts.example_message", "ui.components.media-browser.tts.example_message",
{ {
name: this.hass.user?.name || "", name: this.hass.user?.name || "Alice",
} }
)} )}
> >

View File

@ -342,7 +342,8 @@ class HaAutomationPicker extends LitElement {
</p> </p>
<p> <p>
${this.hass.localize( ${this.hass.localize(
"ui.panel.config.automation.picker.empty_text_2" "ui.panel.config.automation.picker.empty_text_2",
{ user: this.hass.user?.name || "Alice" }
)} )}
</p> </p>
<a <a

View File

@ -128,7 +128,7 @@ export class HaManualAutomationEditor extends LitElement {
? html`<p> ? html`<p>
${this.hass.localize( ${this.hass.localize(
"ui.panel.config.automation.editor.conditions.description", "ui.panel.config.automation.editor.conditions.description",
{ user: this.hass.user?.name } { user: this.hass.user?.name || "Alice" }
)} )}
</p>` </p>`
: nothing} : nothing}

View File

@ -2386,7 +2386,7 @@
}, },
"empty_header": "Start automating", "empty_header": "Start automating",
"empty_text_1": "Automations make Home Assistant automatically respond to things happening in and around your home.", "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 Alice 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''."
}, },
"dialog_new": { "dialog_new": {
"header": "Create automation", "header": "Create automation",