mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-24 17:56:46 +00:00
Move ZHA config panel section translations to backend (#9018)
This commit is contained in:
parent
92b32458ad
commit
ce2743a982
@ -25,6 +25,7 @@ export type TranslationCategory =
|
||||
| "title"
|
||||
| "state"
|
||||
| "config"
|
||||
| "config_panel"
|
||||
| "options"
|
||||
| "device_automation"
|
||||
| "mfa_setup"
|
||||
|
@ -63,6 +63,7 @@ class ZHAConfigDashboard extends LitElement {
|
||||
protected firstUpdated(changedProperties: PropertyValues): void {
|
||||
super.firstUpdated(changedProperties);
|
||||
if (this.hass) {
|
||||
this.hass.loadBackendTranslation("config_panel", "zha", false);
|
||||
this._fetchConfiguration();
|
||||
}
|
||||
}
|
||||
@ -108,7 +109,7 @@ class ZHAConfigDashboard extends LitElement {
|
||||
? Object.entries(this._configuration.schemas).map(
|
||||
([section, schema]) => html` <ha-card
|
||||
header=${this.hass.localize(
|
||||
`ui.panel.config.zha.configuration_page.${section}.title`
|
||||
`component.zha.config_panel.${section}.title`
|
||||
)}
|
||||
>
|
||||
<div class="card-content">
|
||||
@ -164,9 +165,8 @@ class ZHAConfigDashboard extends LitElement {
|
||||
private _computeLabelCallback(localize, section: string) {
|
||||
// Returns a callback for ha-form to calculate labels per schema object
|
||||
return (schema) =>
|
||||
localize(
|
||||
`ui.panel.config.zha.configuration_page.${section}.${schema.name}`
|
||||
) || schema.name;
|
||||
localize(`component.zha.config_panel.${section}.${schema.name}`) ||
|
||||
schema.name;
|
||||
}
|
||||
|
||||
static get styles(): CSSResultArray {
|
||||
|
@ -2382,12 +2382,7 @@
|
||||
},
|
||||
"configuration_page": {
|
||||
"shortcuts_title": "Shortcuts",
|
||||
"update_button": "Update Configuration",
|
||||
"zha_options": {
|
||||
"title": "Global Options",
|
||||
"enable_identify_on_join": "Enable identify effect when devices join the network",
|
||||
"default_light_transition": "Default light transition time (seconds)"
|
||||
}
|
||||
"update_button": "Update Configuration"
|
||||
},
|
||||
"add_device_page": {
|
||||
"spinner": "Searching for ZHA Zigbee devices...",
|
||||
|
Loading…
x
Reference in New Issue
Block a user