From 12ff70020a12cfaf99895e64eecedbbbd4174747 Mon Sep 17 00:00:00 2001 From: Steve Repsher Date: Thu, 21 Jul 2022 06:17:29 -0400 Subject: [PATCH] Fix more bad localize keys (#13250) --- src/data/device_registry.ts | 2 +- .../config/devices/ha-config-device-page.ts | 43 ++++++++++--------- .../zwave_js/dialog-zwave_js-add-node.ts | 6 +-- .../zwave_js/dialog-zwave_js-heal-network.ts | 8 ++-- .../zwave_js/dialog-zwave_js-heal-node.ts | 4 +- .../dialog-zwave_js-reinterview-node.ts | 6 +-- .../zwave_js/dialog-zwave_js-remove-node.ts | 4 +- 7 files changed, 37 insertions(+), 36 deletions(-) diff --git a/src/data/device_registry.ts b/src/data/device_registry.ts index 72601269c0..a026221819 100644 --- a/src/data/device_registry.ts +++ b/src/data/device_registry.ts @@ -21,7 +21,7 @@ export interface DeviceRegistryEntry { area_id: string | null; name_by_user: string | null; entry_type: "service" | null; - disabled_by: string | null; + disabled_by: "user" | "integration" | "config_entry" | null; configuration_url: string | null; } diff --git a/src/panels/config/devices/ha-config-device-page.ts b/src/panels/config/devices/ha-config-device-page.ts index a91b6eb9d2..3ccf58df9b 100644 --- a/src/panels/config/devices/ha-config-device-page.ts +++ b/src/panels/config/devices/ha-config-device-page.ts @@ -344,7 +344,7 @@ export class HaConfigDevicePage extends LitElement { .disabled=${device.disabled_by} .label=${device.disabled_by ? this.hass.localize( - "ui.panel.config.devices.automation.create_disabled", + "ui.panel.config.devices.automation.create_disable", "type", this.hass.localize( `ui.panel.config.devices.type.${ @@ -437,7 +437,7 @@ export class HaConfigDevicePage extends LitElement { .disabled=${device.disabled_by} .label=${device.disabled_by ? this.hass.localize( - "ui.panel.config.devices.scene.create_disabled", + "ui.panel.config.devices.scene.create_disable", "type", this.hass.localize( `ui.panel.config.devices.type.${ @@ -530,7 +530,7 @@ export class HaConfigDevicePage extends LitElement { .disabled=${device.disabled_by} .label=${device.disabled_by ? this.hass.localize( - "ui.panel.config.devices.script.create_disabled", + "ui.panel.config.devices.script.create_disable", "type", this.hass.localize( `ui.panel.config.devices.type.${ @@ -768,26 +768,27 @@ export class HaConfigDevicePage extends LitElement { : "" } - ${!this.narrow ? [automationCard, sceneCard, scriptCard] : ""} + ${!this.narrow ? [automationCard, sceneCard, scriptCard] : ""}
- ${["control", "sensor", "config", "diagnostic"].map((category) => - // Make sure we render controls if no other cards will be rendered - entitiesByCategory[category].length > 0 || - (entities.length === 0 && category === "control") - ? html` - - - ` - : "" + ${(["control", "sensor", "config", "diagnostic"] as const).map( + (category) => + // Make sure we render controls if no other cards will be rendered + entitiesByCategory[category].length > 0 || + (entities.length === 0 && category === "control") + ? html` + + + ` + : "" )}
diff --git a/src/panels/config/integrations/integration-panels/zwave_js/dialog-zwave_js-add-node.ts b/src/panels/config/integrations/integration-panels/zwave_js/dialog-zwave_js-add-node.ts index c1a75807c7..9f6cb644dc 100644 --- a/src/panels/config/integrations/integration-panels/zwave_js/dialog-zwave_js-add-node.ts +++ b/src/panels/config/integrations/integration-panels/zwave_js/dialog-zwave_js-add-node.ts @@ -401,7 +401,7 @@ class DialogZWaveJSAddNode extends LitElement {
- ${this.hass.localize("ui.panel.config.zwave_js.common.close")} + ${this.hass.localize("ui.common.close")} ` : this._status === "finished" @@ -451,7 +451,7 @@ class DialogZWaveJSAddNode extends LitElement { - ${this.hass.localize("ui.panel.config.zwave_js.common.close")} + ${this.hass.localize("ui.common.close")} ` : this._status === "provisioned" @@ -469,7 +469,7 @@ class DialogZWaveJSAddNode extends LitElement { - ${this.hass.localize("ui.panel.config.zwave_js.common.close")} + ${this.hass.localize("ui.common.close")} ` : ""} diff --git a/src/panels/config/integrations/integration-panels/zwave_js/dialog-zwave_js-heal-network.ts b/src/panels/config/integrations/integration-panels/zwave_js/dialog-zwave_js-heal-network.ts index 8044a6b366..3cf31dc360 100644 --- a/src/panels/config/integrations/integration-panels/zwave_js/dialog-zwave_js-heal-network.ts +++ b/src/panels/config/integrations/integration-panels/zwave_js/dialog-zwave_js-heal-network.ts @@ -120,7 +120,7 @@ class DialogZWaveJSHealNetwork extends LitElement { )} - ${this.hass.localize("ui.panel.config.zwave_js.common.close")} + ${this.hass.localize("ui.common.close")} ` : ``} @@ -140,7 +140,7 @@ class DialogZWaveJSHealNetwork extends LitElement { - ${this.hass.localize("ui.panel.config.zwave_js.common.close")} + ${this.hass.localize("ui.common.close")} ` : ``} @@ -160,7 +160,7 @@ class DialogZWaveJSHealNetwork extends LitElement { - ${this.hass.localize("ui.panel.config.zwave_js.common.close")} + ${this.hass.localize("ui.common.close")} ` : ``} @@ -180,7 +180,7 @@ class DialogZWaveJSHealNetwork extends LitElement { - ${this.hass.localize("ui.panel.config.zwave_js.common.close")} + ${this.hass.localize("ui.common.close")} ` : ``} diff --git a/src/panels/config/integrations/integration-panels/zwave_js/dialog-zwave_js-heal-node.ts b/src/panels/config/integrations/integration-panels/zwave_js/dialog-zwave_js-heal-node.ts index 5615d78d40..f880f5c20f 100644 --- a/src/panels/config/integrations/integration-panels/zwave_js/dialog-zwave_js-heal-node.ts +++ b/src/panels/config/integrations/integration-panels/zwave_js/dialog-zwave_js-heal-node.ts @@ -166,7 +166,7 @@ class DialogZWaveJSHealNode extends LitElement { - ${this.hass.localize("ui.panel.config.zwave_js.common.close")} + ${this.hass.localize("ui.common.close")} ` : ``} @@ -186,7 +186,7 @@ class DialogZWaveJSHealNode extends LitElement { - ${this.hass.localize("ui.panel.config.zwave_js.common.close")} + ${this.hass.localize("ui.common.close")} ` : ``} diff --git a/src/panels/config/integrations/integration-panels/zwave_js/dialog-zwave_js-reinterview-node.ts b/src/panels/config/integrations/integration-panels/zwave_js/dialog-zwave_js-reinterview-node.ts index 5b3bda96b5..0c3eda988d 100644 --- a/src/panels/config/integrations/integration-panels/zwave_js/dialog-zwave_js-reinterview-node.ts +++ b/src/panels/config/integrations/integration-panels/zwave_js/dialog-zwave_js-reinterview-node.ts @@ -85,7 +85,7 @@ class DialogZWaveJSReinterviewNode extends LitElement { - ${this.hass.localize("ui.panel.config.zwave_js.common.close")} + ${this.hass.localize("ui.common.close")} ` : ``} @@ -105,7 +105,7 @@ class DialogZWaveJSReinterviewNode extends LitElement { - ${this.hass.localize("ui.panel.config.zwave_js.common.close")} + ${this.hass.localize("ui.common.close")} ` : ``} @@ -125,7 +125,7 @@ class DialogZWaveJSReinterviewNode extends LitElement { - ${this.hass.localize("ui.panel.config.zwave_js.common.close")} + ${this.hass.localize("ui.common.close")} ` : ``} diff --git a/src/panels/config/integrations/integration-panels/zwave_js/dialog-zwave_js-remove-node.ts b/src/panels/config/integrations/integration-panels/zwave_js/dialog-zwave_js-remove-node.ts index 2216b00a3e..bad6ef4597 100644 --- a/src/panels/config/integrations/integration-panels/zwave_js/dialog-zwave_js-remove-node.ts +++ b/src/panels/config/integrations/integration-panels/zwave_js/dialog-zwave_js-remove-node.ts @@ -110,7 +110,7 @@ class DialogZWaveJSRemoveNode extends LitElement { - ${this.hass.localize("ui.panel.config.zwave_js.common.close")} + ${this.hass.localize("ui.common.close")} ` : ``} @@ -132,7 +132,7 @@ class DialogZWaveJSRemoveNode extends LitElement { - ${this.hass.localize("ui.panel.config.zwave_js.common.close")} + ${this.hass.localize("ui.common.close")} ` : ``}