From 32fd7a51f4e2d839e090a342f7b3d46952f754a7 Mon Sep 17 00:00:00 2001 From: Bram Kragten Date: Fri, 24 Jan 2020 19:09:40 +0100 Subject: [PATCH] Fix entity registry dialog translations (#4575) Fixes #4567 --- .../entities/dialog-entity-registry-detail.ts | 8 ++--- .../entities/entity-registry-settings.ts | 22 ++++++------ src/translations/en.json | 36 +++++++++---------- 3 files changed, 34 insertions(+), 32 deletions(-) diff --git a/src/panels/config/entities/dialog-entity-registry-detail.ts b/src/panels/config/entities/dialog-entity-registry-detail.ts index 2e2c96c446..196c71204d 100644 --- a/src/panels/config/entities/dialog-entity-registry-detail.ts +++ b/src/panels/config/entities/dialog-entity-registry-detail.ts @@ -62,7 +62,7 @@ export class DialogEntityRegistryDetail extends LitElement { - ${this.hass.localize("ui.panel.config.entities.dialog.settings")} + ${this.hass.localize("ui.dialogs.entity_registry.settings")} - ${this.hass.localize("ui.panel.config.entities.dialog.related")} + ${this.hass.localize("ui.dialogs.entity_registry.related")} ${cache( diff --git a/src/panels/config/entities/entity-registry-settings.ts b/src/panels/config/entities/entity-registry-settings.ts index b5c0d0ba23..6806f5c6d1 100644 --- a/src/panels/config/entities/entity-registry-settings.ts +++ b/src/panels/config/entities/entity-registry-settings.ts @@ -67,7 +67,7 @@ export class EntityRegistrySettings extends LitElement { ? html`
${this.hass!.localize( - "ui.panel.config.entities.editor.unavailable" + "ui.dialogs.entity_registry.editor.unavailable" )}
` @@ -81,7 +81,9 @@ export class EntityRegistrySettings extends LitElement { @@ -89,7 +91,7 @@ export class EntityRegistrySettings extends LitElement { .value=${this._entityId} @value-changed=${this._entityIdChanged} .label=${this.hass.localize( - "ui.panel.config.entities.editor.entity_id" + "ui.dialogs.entity_registry.editor.entity_id" )} error-message="Domain needs to stay the same" .invalid=${invalidDomainUpdate} @@ -103,13 +105,13 @@ export class EntityRegistrySettings extends LitElement {
${this.hass.localize( - "ui.panel.config.entities.editor.enabled_label" + "ui.dialogs.entity_registry.editor.enabled_label" )}
${this._disabledBy && this._disabledBy !== "user" ? this.hass.localize( - "ui.panel.config.entities.editor.enabled_cause", + "ui.dialogs.entity_registry.editor.enabled_cause", "cause", this.hass.localize( `config_entry.disabled_by.${this._disabledBy}` @@ -117,10 +119,10 @@ export class EntityRegistrySettings extends LitElement { ) : ""} ${this.hass.localize( - "ui.panel.config.entities.editor.enabled_description" + "ui.dialogs.entity_registry.editor.enabled_description" )}
${this.hass.localize( - "ui.panel.config.entities.editor.note" + "ui.dialogs.entity_registry.editor.note" )}
@@ -135,13 +137,13 @@ export class EntityRegistrySettings extends LitElement { .disabled=${this._submitting || !(stateObj && stateObj.attributes.restored)} > - ${this.hass.localize("ui.panel.config.entities.editor.delete")} + ${this.hass.localize("ui.dialogs.entity_registry.editor.delete")} - ${this.hass.localize("ui.panel.config.entities.editor.update")} + ${this.hass.localize("ui.dialogs.entity_registry.editor.update")} `; @@ -187,7 +189,7 @@ export class EntityRegistrySettings extends LitElement { private _confirmDeleteEntry(): void { showConfirmationDialog(this, { text: this.hass.localize( - "ui.panel.config.entities.editor.confirm_delete" + "ui.dialogs.entity_registry.editor.confirm_delete" ), confirm: () => this._deleteEntry(), }); diff --git a/src/translations/en.json b/src/translations/en.json index b70584857e..b71add4930 100755 --- a/src/translations/en.json +++ b/src/translations/en.json @@ -603,6 +603,24 @@ "confirm_remove_text": "Are you sure you want to remove this entity?" } }, + "entity_registry": { + "settings": "Settings", + "control": "Control", + "related": "Related", + "dismiss": "Dismiss", + "editor": { + "name": "Name Override", + "entity_id": "Entity ID", + "unavailable": "This entity is not currently available.", + "enabled_label": "Enable entity", + "enabled_cause": "Disabled by {cause}.", + "enabled_description": "Disabled entities will not be added to Home Assistant.", + "delete": "DELETE", + "confirm_delete": "Are you sure you want to delete this entry?", + "update": "UPDATE", + "note": "Note: this might not work yet with all integrations." + } + }, "options_flow": { "form": { "header": "Options" @@ -1303,24 +1321,6 @@ "confirm_title": "Do you want to remove {number} entities?", "confirm_text": "Entities can only be removed when the integration is no longer providing the entities." } - }, - "dialog": { - "settings": "Settings", - "control": "Control", - "related": "Related", - "dismiss": "Dismiss" - }, - "editor": { - "name": "Name Override", - "entity_id": "Entity ID", - "unavailable": "This entity is not currently available.", - "enabled_label": "Enable entity", - "enabled_cause": "Disabled by {cause}.", - "enabled_description": "Disabled entities will not be added to Home Assistant.", - "delete": "DELETE", - "confirm_delete": "Are you sure you want to delete this entry?", - "update": "UPDATE", - "note": "Note: this might not work yet with all integrations." } }, "person": {