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"],
|
||||
status: "OK",
|
||||
mode: "driving",
|
||||
units: "imperial",
|
||||
units: "us_customary",
|
||||
duration_in_traffic: "41 mins",
|
||||
duration: "44 mins",
|
||||
distance: "34.3 mi",
|
||||
@ -527,7 +527,7 @@ export const demoEntitiesArsaboo: DemoConfig["entities"] = (localize) =>
|
||||
origin_addresses: ["XYZ"],
|
||||
status: "OK",
|
||||
mode: "driving",
|
||||
units: "imperial",
|
||||
units: "us_customary",
|
||||
duration_in_traffic: "37 mins",
|
||||
duration: "37 mins",
|
||||
distance: "30.2 mi",
|
||||
|
@ -6,7 +6,7 @@ export interface ConfigUpdateValues {
|
||||
latitude: number;
|
||||
longitude: number;
|
||||
elevation: number;
|
||||
unit_system: "metric" | "imperial";
|
||||
unit_system: "metric" | "us_customary";
|
||||
time_zone: string;
|
||||
external_url?: string | null;
|
||||
internal_url?: string | null;
|
||||
|
@ -163,18 +163,18 @@ class OnboardingCoreConfig extends LitElement {
|
||||
</ha-formfield>
|
||||
<ha-formfield
|
||||
.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">
|
||||
${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>`}
|
||||
>
|
||||
<ha-radio
|
||||
name="unit_system"
|
||||
value="imperial"
|
||||
.checked=${this._unitSystemValue === "imperial"}
|
||||
value="us_customary"
|
||||
.checked=${this._unitSystemValue === "us_customary"}
|
||||
@change=${this._unitSystemChanged}
|
||||
.disabled=${this._working}
|
||||
></ha-radio>
|
||||
@ -301,7 +301,9 @@ class OnboardingCoreConfig extends LitElement {
|
||||
}
|
||||
|
||||
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() {
|
||||
|
@ -144,20 +144,20 @@ class HaConfigSectionGeneral extends LitElement {
|
||||
.label=${html`
|
||||
<span style="font-size: 14px">
|
||||
${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>
|
||||
<div style="color: var(--secondary-text-color)">
|
||||
${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>
|
||||
`}
|
||||
>
|
||||
<ha-radio
|
||||
name="unit_system"
|
||||
value="imperial"
|
||||
.checked=${this._unitSystem === "imperial"}
|
||||
value="us_customary"
|
||||
.checked=${this._unitSystem === "us_customary"}
|
||||
@change=${this._unitSystemChanged}
|
||||
.disabled=${this._submitting}
|
||||
></ha-radio>
|
||||
@ -238,7 +238,7 @@ class HaConfigSectionGeneral extends LitElement {
|
||||
this._unitSystem =
|
||||
this.hass.config.unit_system.temperature === UNIT_C
|
||||
? "metric"
|
||||
: "imperial";
|
||||
: "us_customary";
|
||||
this._currency = this.hass.config.currency;
|
||||
this._elevation = this.hass.config.elevation;
|
||||
this._timeZone = this.hass.config.time_zone;
|
||||
@ -259,7 +259,9 @@ class HaConfigSectionGeneral extends LitElement {
|
||||
}
|
||||
|
||||
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) {
|
||||
|
@ -1614,9 +1614,9 @@
|
||||
"elevation_meters": "meters",
|
||||
"time_zone": "Time Zone",
|
||||
"unit_system": "Unit System",
|
||||
"unit_system_imperial": "Imperial",
|
||||
"unit_system_us_customary": "US customary",
|
||||
"unit_system_metric": "Metric",
|
||||
"imperial_example": "Fahrenheit, pounds",
|
||||
"us_customary_example": "Fahrenheit, pounds",
|
||||
"metric_example": "Celsius, kilograms",
|
||||
"find_currency_value": "Find my value",
|
||||
"save_button": "Save",
|
||||
@ -2363,7 +2363,9 @@
|
||||
"sequence_sentence": "The sequence of actions of this script.",
|
||||
"link_available_actions": "Learn more about available actions."
|
||||
},
|
||||
"trace": { "edit_script": "Edit script" }
|
||||
"trace": {
|
||||
"edit_script": "Edit script"
|
||||
}
|
||||
},
|
||||
"scene": {
|
||||
"caption": "Scenes",
|
||||
|
Loading…
x
Reference in New Issue
Block a user