Translate assigned-to / targeting-this area info (#11337)

This commit is contained in:
Philip Allgaier 2022-01-17 05:52:35 +01:00 committed by GitHub
parent 884ed561a1
commit effec839af
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 33 additions and 7 deletions

View File

@ -265,7 +265,11 @@ class HaConfigAreaPage extends LitElement {
)}
>
${grouped.automation?.length
? html`<h3>Assigned to this area:</h3>
? html`<h3>
${this.hass.localize(
"ui.panel.config.areas.assigned_to_area"
)}:
</h3>
${grouped.automation.map((entity) => {
const entityState = this.hass.states[
entity.entity_id
@ -281,7 +285,11 @@ class HaConfigAreaPage extends LitElement {
(entity) => entity.entity_id === entityId
)
).length
? html`<h3>Targeting this area:</h3>
? html`<h3>
${this.hass.localize(
"ui.panel.config.areas.targeting_area"
)}:
</h3>
${this._related.automation.map((scene) => {
const entityState = this.hass.states[scene] as
| AutomationEntity
@ -314,7 +322,11 @@ class HaConfigAreaPage extends LitElement {
)}
>
${grouped.scene?.length
? html`<h3>Assigned to this area:</h3>
? html`<h3>
${this.hass.localize(
"ui.panel.config.areas.assigned_to_area"
)}:
</h3>
${grouped.scene.map((entity) => {
const entityState =
this.hass.states[entity.entity_id];
@ -329,7 +341,11 @@ class HaConfigAreaPage extends LitElement {
(entity) => entity.entity_id === entityId
)
).length
? html`<h3>Targeting this area:</h3>
? html`<h3>
${this.hass.localize(
"ui.panel.config.areas.targeting_area"
)}:
</h3>
${this._related.scene.map((scene) => {
const entityState = this.hass.states[scene];
return entityState
@ -357,7 +373,11 @@ class HaConfigAreaPage extends LitElement {
)}
>
${grouped.script?.length
? html`<h3>Assigned to this area:</h3>
? html`<h3>
${this.hass.localize(
"ui.panel.config.areas.assigned_to_area"
)}:
</h3>
${grouped.script.map((entity) => {
const entityState = this.hass.states[
entity.entity_id
@ -373,7 +393,11 @@ class HaConfigAreaPage extends LitElement {
(entity) => entity.entity_id === entityId
)
).length
? html`<h3>Targeting this area:</h3>
? html`<h3>
${this.hass.localize(
"ui.panel.config.areas.targeting_area"
)}:
</h3>
${this._related.script.map((scene) => {
const entityState = this.hass.states[scene] as
| ScriptEntity

View File

@ -36,7 +36,7 @@ export class EnergyStrategy {
}
view.cards!.push({
type: "markdown",
content: `An error occured while fetching your energy preferences: ${err.message}.`,
content: `An error occurred while fetching your energy preferences: ${err.message}.`,
});
return view;
}

View File

@ -1006,6 +1006,8 @@
"description": "Group devices and entities into areas",
"edit_settings": "Area settings",
"add_picture": "Add a picture",
"assigned_to_area": "Assigned to this area",
"targeting_area": "Targeting this area",
"data_table": {
"area": "Area",
"devices": "Devices",