mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-18 23:06:40 +00:00
Rename imperial unit system to us_customary (#14092)
This commit is contained in:
parent
bad3edc340
commit
0b6c6b2b98
@ -508,7 +508,7 @@ export const demoEntitiesArsaboo: DemoConfig["entities"] = (localize) =>
|
|||||||
origin_addresses: ["XYZ"],
|
origin_addresses: ["XYZ"],
|
||||||
status: "OK",
|
status: "OK",
|
||||||
mode: "driving",
|
mode: "driving",
|
||||||
units: "imperial",
|
units: "us_customary",
|
||||||
duration_in_traffic: "41 mins",
|
duration_in_traffic: "41 mins",
|
||||||
duration: "44 mins",
|
duration: "44 mins",
|
||||||
distance: "34.3 mi",
|
distance: "34.3 mi",
|
||||||
@ -527,7 +527,7 @@ export const demoEntitiesArsaboo: DemoConfig["entities"] = (localize) =>
|
|||||||
origin_addresses: ["XYZ"],
|
origin_addresses: ["XYZ"],
|
||||||
status: "OK",
|
status: "OK",
|
||||||
mode: "driving",
|
mode: "driving",
|
||||||
units: "imperial",
|
units: "us_customary",
|
||||||
duration_in_traffic: "37 mins",
|
duration_in_traffic: "37 mins",
|
||||||
duration: "37 mins",
|
duration: "37 mins",
|
||||||
distance: "30.2 mi",
|
distance: "30.2 mi",
|
||||||
|
@ -6,7 +6,7 @@ export interface ConfigUpdateValues {
|
|||||||
latitude: number;
|
latitude: number;
|
||||||
longitude: number;
|
longitude: number;
|
||||||
elevation: number;
|
elevation: number;
|
||||||
unit_system: "metric" | "imperial";
|
unit_system: "metric" | "us_customary";
|
||||||
time_zone: string;
|
time_zone: string;
|
||||||
external_url?: string | null;
|
external_url?: string | null;
|
||||||
internal_url?: string | null;
|
internal_url?: string | null;
|
||||||
|
@ -163,18 +163,18 @@ class OnboardingCoreConfig extends LitElement {
|
|||||||
</ha-formfield>
|
</ha-formfield>
|
||||||
<ha-formfield
|
<ha-formfield
|
||||||
.label=${html`${this.hass.localize(
|
.label=${html`${this.hass.localize(
|
||||||
"ui.panel.config.core.section.core.core_config.unit_system_imperial"
|
"ui.panel.config.core.section.core.core_config.unit_system_us_customary"
|
||||||
)}
|
)}
|
||||||
<div class="secondary">
|
<div class="secondary">
|
||||||
${this.hass.localize(
|
${this.hass.localize(
|
||||||
"ui.panel.config.core.section.core.core_config.imperial_example"
|
"ui.panel.config.core.section.core.core_config.us_customary_example"
|
||||||
)}
|
)}
|
||||||
</div>`}
|
</div>`}
|
||||||
>
|
>
|
||||||
<ha-radio
|
<ha-radio
|
||||||
name="unit_system"
|
name="unit_system"
|
||||||
value="imperial"
|
value="us_customary"
|
||||||
.checked=${this._unitSystemValue === "imperial"}
|
.checked=${this._unitSystemValue === "us_customary"}
|
||||||
@change=${this._unitSystemChanged}
|
@change=${this._unitSystemChanged}
|
||||||
.disabled=${this._working}
|
.disabled=${this._working}
|
||||||
></ha-radio>
|
></ha-radio>
|
||||||
@ -301,7 +301,9 @@ class OnboardingCoreConfig extends LitElement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private _unitSystemChanged(ev: CustomEvent) {
|
private _unitSystemChanged(ev: CustomEvent) {
|
||||||
this._unitSystem = (ev.target as HaRadio).value as "metric" | "imperial";
|
this._unitSystem = (ev.target as HaRadio).value as
|
||||||
|
| "metric"
|
||||||
|
| "us_customary";
|
||||||
}
|
}
|
||||||
|
|
||||||
private async _detect() {
|
private async _detect() {
|
||||||
|
@ -144,20 +144,20 @@ class HaConfigSectionGeneral extends LitElement {
|
|||||||
.label=${html`
|
.label=${html`
|
||||||
<span style="font-size: 14px">
|
<span style="font-size: 14px">
|
||||||
${this.hass.localize(
|
${this.hass.localize(
|
||||||
"ui.panel.config.core.section.core.core_config.imperial_example"
|
"ui.panel.config.core.section.core.core_config.us_customary_example"
|
||||||
)}
|
)}
|
||||||
</span>
|
</span>
|
||||||
<div style="color: var(--secondary-text-color)">
|
<div style="color: var(--secondary-text-color)">
|
||||||
${this.hass.localize(
|
${this.hass.localize(
|
||||||
"ui.panel.config.core.section.core.core_config.unit_system_imperial"
|
"ui.panel.config.core.section.core.core_config.unit_system_us_customary"
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
`}
|
`}
|
||||||
>
|
>
|
||||||
<ha-radio
|
<ha-radio
|
||||||
name="unit_system"
|
name="unit_system"
|
||||||
value="imperial"
|
value="us_customary"
|
||||||
.checked=${this._unitSystem === "imperial"}
|
.checked=${this._unitSystem === "us_customary"}
|
||||||
@change=${this._unitSystemChanged}
|
@change=${this._unitSystemChanged}
|
||||||
.disabled=${this._submitting}
|
.disabled=${this._submitting}
|
||||||
></ha-radio>
|
></ha-radio>
|
||||||
@ -238,7 +238,7 @@ class HaConfigSectionGeneral extends LitElement {
|
|||||||
this._unitSystem =
|
this._unitSystem =
|
||||||
this.hass.config.unit_system.temperature === UNIT_C
|
this.hass.config.unit_system.temperature === UNIT_C
|
||||||
? "metric"
|
? "metric"
|
||||||
: "imperial";
|
: "us_customary";
|
||||||
this._currency = this.hass.config.currency;
|
this._currency = this.hass.config.currency;
|
||||||
this._elevation = this.hass.config.elevation;
|
this._elevation = this.hass.config.elevation;
|
||||||
this._timeZone = this.hass.config.time_zone;
|
this._timeZone = this.hass.config.time_zone;
|
||||||
@ -259,7 +259,9 @@ class HaConfigSectionGeneral extends LitElement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private _unitSystemChanged(ev: CustomEvent) {
|
private _unitSystemChanged(ev: CustomEvent) {
|
||||||
this._unitSystem = (ev.target as HaRadio).value as "metric" | "imperial";
|
this._unitSystem = (ev.target as HaRadio).value as
|
||||||
|
| "metric"
|
||||||
|
| "us_customary";
|
||||||
}
|
}
|
||||||
|
|
||||||
private _locationChanged(ev: CustomEvent) {
|
private _locationChanged(ev: CustomEvent) {
|
||||||
|
@ -1614,9 +1614,9 @@
|
|||||||
"elevation_meters": "meters",
|
"elevation_meters": "meters",
|
||||||
"time_zone": "Time Zone",
|
"time_zone": "Time Zone",
|
||||||
"unit_system": "Unit System",
|
"unit_system": "Unit System",
|
||||||
"unit_system_imperial": "Imperial",
|
"unit_system_us_customary": "US customary",
|
||||||
"unit_system_metric": "Metric",
|
"unit_system_metric": "Metric",
|
||||||
"imperial_example": "Fahrenheit, pounds",
|
"us_customary_example": "Fahrenheit, pounds",
|
||||||
"metric_example": "Celsius, kilograms",
|
"metric_example": "Celsius, kilograms",
|
||||||
"find_currency_value": "Find my value",
|
"find_currency_value": "Find my value",
|
||||||
"save_button": "Save",
|
"save_button": "Save",
|
||||||
@ -2363,7 +2363,9 @@
|
|||||||
"sequence_sentence": "The sequence of actions of this script.",
|
"sequence_sentence": "The sequence of actions of this script.",
|
||||||
"link_available_actions": "Learn more about available actions."
|
"link_available_actions": "Learn more about available actions."
|
||||||
},
|
},
|
||||||
"trace": { "edit_script": "Edit script" }
|
"trace": {
|
||||||
|
"edit_script": "Edit script"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"scene": {
|
"scene": {
|
||||||
"caption": "Scenes",
|
"caption": "Scenes",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user