Fix more info translation keys (#17749)

This commit is contained in:
Paul Bottein 2023-08-31 13:06:29 +02:00 committed by GitHub
parent fa788a8223
commit 806cebb024
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 28 additions and 29 deletions

View File

@ -142,7 +142,7 @@ class MoreInfoClimate extends LitElement {
.selected=${this._mainControl === "temperature"}
.disabled=${this.stateObj!.state === UNAVAILABLE}
.label=${this.hass.localize(
"ui.dialogs.more_info_control.light.color"
"ui.dialogs.more_info_control.climate.temperature"
)}
.control=${"temperature"}
@click=${this._setMainControl}
@ -153,7 +153,7 @@ class MoreInfoClimate extends LitElement {
.selected=${this._mainControl === "humidity"}
.disabled=${this.stateObj!.state === UNAVAILABLE}
.label=${this.hass.localize(
"ui.dialogs.more_info_control.light.color_temp"
"ui.dialogs.more_info_control.climate.humidity"
)}
.control=${"humidity"}
@click=${this._setMainControl}
@ -166,10 +166,7 @@ class MoreInfoClimate extends LitElement {
</div>
<ha-more-info-control-select-container>
<ha-control-select-menu
.label=${this.hass.formatEntityAttributeName(
this.stateObj,
"hvac_mode"
)}
.label=${this.hass.localize("ui.card.climate.mode")}
.value=${stateObj.state}
.disabled=${this.stateObj.state === UNAVAILABLE}
fixedMenuPosition

View File

@ -86,7 +86,7 @@ class MoreInfoFan extends LitElement {
}
_handleOscillating(ev) {
const newVal = ev.target.value === "on";
const newVal = ev.target.value === "true";
this.hass.callService("fan", "oscillate", {
entity_id: this.stateObj!.entity_id,
@ -269,7 +269,9 @@ class MoreInfoFan extends LitElement {
this.stateObj,
"oscillating"
)}
.value=${this.stateObj.attributes.oscillating ? "on" : "off"}
.value=${this.stateObj.attributes.oscillating
? "true"
: "false"}
.disabled=${this.stateObj.state === UNAVAILABLE}
fixedMenuPosition
naturalMenuWidth
@ -280,19 +282,27 @@ class MoreInfoFan extends LitElement {
slot="icon"
.path=${haOscillatingOff}
></ha-svg-icon>
<ha-list-item value="on" graphic="icon">
<ha-list-item value="true" graphic="icon">
<ha-svg-icon
slot="graphic"
.path=${haOscillating}
></ha-svg-icon>
${this.hass.localize("state.default.on")}
${this.hass.formatEntityAttributeValue(
this.stateObj,
"oscillating",
true
)}
</ha-list-item>
<ha-list-item value="off" graphic="icon">
<ha-list-item value="false" graphic="icon">
<ha-svg-icon
slot="graphic"
.path=${haOscillatingOff}
></ha-svg-icon>
${this.hass.localize("state.default.off")}
${this.hass.formatEntityAttributeValue(
this.stateObj,
"oscillating",
false
)}
</ha-list-item>
</ha-control-select-menu>
`

View File

@ -73,10 +73,7 @@ class MoreInfoWaterHeater extends LitElement {
${supportOperationMode && stateObj.attributes.operation_list
? html`
<ha-control-select-menu
.label=${this.hass.formatEntityAttributeName(
stateObj,
"operation"
)}
.label=${this.hass.localize("ui.card.water_heater.mode")}
.value=${stateObj.state}
.disabled=${stateObj.state === UNAVAILABLE}
fixedMenuPosition

View File

@ -121,10 +121,7 @@ class HuiClimateHvacModeTileFeature
.value=${this._currentHvacMode}
@value-changed=${this._valueChanged}
hide-label
.ariaLabel=${this.hass.formatEntityAttributeName(
this.stateObj,
"hvac_mode"
)}
.ariaLabel=${this.hass.localize("ui.card.climate.mode")}
style=${styleMap({
"--control-select-color": color,
})}

View File

@ -125,10 +125,7 @@ class HuiWaterHeaterOperationModeTileFeature
.value=${this._currentOperationMode}
@value-changed=${this._valueChanged}
hide-label
.ariaLabel=${this.hass.formatEntityAttributeName(
this.stateObj,
"hvac_mode"
)}
.ariaLabel=${this.hass.localize("ui.card.water_heater.mode")}
style=${styleMap({
"--control-select-color": color,
})}

View File

@ -107,8 +107,7 @@
"cooling": "{name} cooling",
"high": "high",
"low": "low",
"operation": "Operation",
"away_mode": "Away mode"
"mode": "Mode"
},
"counter": {
"actions": {
@ -228,8 +227,8 @@
"currently": "Currently",
"on_off": "On / off",
"target_temperature": "Target temperature",
"operation": "Operation",
"away_mode": "Away mode"
"away_mode": "Away mode",
"mode": "Mode"
},
"weather": {
"attributes": {
@ -1021,7 +1020,9 @@
"climate": {
"target_label": "{action} to target",
"target": "Target",
"humidity_target": "Humidity target"
"humidity_target": "Humidity target",
"temperature": "Temperature",
"humidity": "Humidity"
},
"humidifier": {
"target_label": "[%key:ui::dialogs::more_info_control::climate::target_label%]",