mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-25 18:26:35 +00:00
Add missing translations for effect and preset translation in more info (#16634)
This commit is contained in:
parent
633c6cfc9b
commit
83570f2419
@ -276,13 +276,21 @@ class MoreInfoFan extends LitElement {
|
|||||||
slot="trigger"
|
slot="trigger"
|
||||||
.disabled=${this.stateObj.state === UNAVAILABLE}
|
.disabled=${this.stateObj.state === UNAVAILABLE}
|
||||||
>
|
>
|
||||||
${this._presetMode ||
|
${this._presetMode
|
||||||
computeAttributeNameDisplay(
|
? computeAttributeValueDisplay(
|
||||||
this.hass.localize,
|
this.hass.localize,
|
||||||
this.stateObj,
|
this.stateObj!,
|
||||||
this.hass.entities,
|
this.hass.locale,
|
||||||
"preset_mode"
|
this.hass.entities,
|
||||||
)}
|
"preset_mode",
|
||||||
|
this._presetMode
|
||||||
|
)
|
||||||
|
: computeAttributeNameDisplay(
|
||||||
|
this.hass.localize,
|
||||||
|
this.stateObj,
|
||||||
|
this.hass.entities,
|
||||||
|
"preset_mode"
|
||||||
|
)}
|
||||||
<ha-svg-icon
|
<ha-svg-icon
|
||||||
slot="icon"
|
slot="icon"
|
||||||
path=${mdiCreation}
|
path=${mdiCreation}
|
||||||
|
@ -18,7 +18,10 @@ import { customElement, property, state } from "lit/decorators";
|
|||||||
import { classMap } from "lit/directives/class-map";
|
import { classMap } from "lit/directives/class-map";
|
||||||
import { fireEvent } from "../../../common/dom/fire_event";
|
import { fireEvent } from "../../../common/dom/fire_event";
|
||||||
import { stopPropagation } from "../../../common/dom/stop_propagation";
|
import { stopPropagation } from "../../../common/dom/stop_propagation";
|
||||||
import { computeAttributeNameDisplay } from "../../../common/entity/compute_attribute_display";
|
import {
|
||||||
|
computeAttributeNameDisplay,
|
||||||
|
computeAttributeValueDisplay,
|
||||||
|
} from "../../../common/entity/compute_attribute_display";
|
||||||
import { supportsFeature } from "../../../common/entity/supports-feature";
|
import { supportsFeature } from "../../../common/entity/supports-feature";
|
||||||
import { blankBeforePercent } from "../../../common/translations/blank_before_percent";
|
import { blankBeforePercent } from "../../../common/translations/blank_before_percent";
|
||||||
import "../../../components/ha-attributes";
|
import "../../../components/ha-attributes";
|
||||||
@ -236,13 +239,21 @@ class MoreInfoLight extends LitElement {
|
|||||||
.disabled=${this.stateObj.state === UNAVAILABLE}
|
.disabled=${this.stateObj.state === UNAVAILABLE}
|
||||||
>
|
>
|
||||||
<ha-svg-icon slot="icon" path=${mdiCreation}></ha-svg-icon>
|
<ha-svg-icon slot="icon" path=${mdiCreation}></ha-svg-icon>
|
||||||
${this._effect ||
|
${this._effect
|
||||||
computeAttributeNameDisplay(
|
? computeAttributeValueDisplay(
|
||||||
this.hass.localize,
|
this.hass.localize,
|
||||||
this.stateObj,
|
this.stateObj!,
|
||||||
this.hass.entities,
|
this.hass.locale,
|
||||||
"effect"
|
this.hass.entities,
|
||||||
)}
|
"effect",
|
||||||
|
this._effect
|
||||||
|
)
|
||||||
|
: computeAttributeNameDisplay(
|
||||||
|
this.hass.localize,
|
||||||
|
this.stateObj,
|
||||||
|
this.hass.entities,
|
||||||
|
"effect"
|
||||||
|
)}
|
||||||
</ha-outlined-button>
|
</ha-outlined-button>
|
||||||
${this.stateObj.attributes.effect_list.map(
|
${this.stateObj.attributes.effect_list.map(
|
||||||
(effect: string) => html`
|
(effect: string) => html`
|
||||||
@ -250,7 +261,14 @@ class MoreInfoLight extends LitElement {
|
|||||||
.value=${effect}
|
.value=${effect}
|
||||||
.activated=${this.stateObj!.attributes.effect === effect}
|
.activated=${this.stateObj!.attributes.effect === effect}
|
||||||
>
|
>
|
||||||
${effect}
|
${computeAttributeValueDisplay(
|
||||||
|
this.hass.localize,
|
||||||
|
this.stateObj!,
|
||||||
|
this.hass.locale,
|
||||||
|
this.hass.entities,
|
||||||
|
"effect",
|
||||||
|
effect
|
||||||
|
)}
|
||||||
</ha-list-item>
|
</ha-list-item>
|
||||||
`
|
`
|
||||||
)}
|
)}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user