Fix entity registry dialog translations (#4575)

Fixes #4567
This commit is contained in:
Bram Kragten 2020-01-24 19:09:40 +01:00 committed by Paulus Schoutsen
parent f3f32c800e
commit 32fd7a51f4
3 changed files with 34 additions and 32 deletions

View File

@ -62,7 +62,7 @@ export class DialogEntityRegistryDetail extends LitElement {
<app-toolbar>
<paper-icon-button
aria-label=${this.hass.localize(
"ui.panel.config.entities.dialog.dismiss"
"ui.dialogs.entity_registry.dismiss"
)}
icon="hass:close"
dialog-dismiss
@ -76,7 +76,7 @@ export class DialogEntityRegistryDetail extends LitElement {
? html`
<paper-icon-button
aria-label=${this.hass.localize(
"ui.panel.config.entities.dialog.control"
"ui.dialogs.entity_registry.control"
)}
icon="hass:tune"
@click=${this._openMoreInfo}
@ -91,10 +91,10 @@ export class DialogEntityRegistryDetail extends LitElement {
@selected-item-changed=${this._handleTabSelected}
>
<paper-tab id="tab-settings">
${this.hass.localize("ui.panel.config.entities.dialog.settings")}
${this.hass.localize("ui.dialogs.entity_registry.settings")}
</paper-tab>
<paper-tab id="tab-related">
${this.hass.localize("ui.panel.config.entities.dialog.related")}
${this.hass.localize("ui.dialogs.entity_registry.related")}
</paper-tab>
</paper-tabs>
${cache(

View File

@ -67,7 +67,7 @@ export class EntityRegistrySettings extends LitElement {
? html`
<div>
${this.hass!.localize(
"ui.panel.config.entities.editor.unavailable"
"ui.dialogs.entity_registry.editor.unavailable"
)}
</div>
`
@ -81,7 +81,9 @@ export class EntityRegistrySettings extends LitElement {
<paper-input
.value=${this._name}
@value-changed=${this._nameChanged}
.label=${this.hass.localize("ui.panel.config.entities.editor.name")}
.label=${this.hass.localize(
"ui.dialogs.entity_registry.editor.name"
)}
.placeholder=${stateObj ? computeStateName(stateObj) : ""}
.disabled=${this._submitting}
></paper-input>
@ -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 {
<div>
<div>
${this.hass.localize(
"ui.panel.config.entities.editor.enabled_label"
"ui.dialogs.entity_registry.editor.enabled_label"
)}
</div>
<div class="secondary">
${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"
)}
<br />${this.hass.localize(
"ui.panel.config.entities.editor.note"
"ui.dialogs.entity_registry.editor.note"
)}
</div>
</div>
@ -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")}
</mwc-button>
<mwc-button
@click="${this._updateEntry}"
.disabled=${invalidDomainUpdate || this._submitting}
>
${this.hass.localize("ui.panel.config.entities.editor.update")}
${this.hass.localize("ui.dialogs.entity_registry.editor.update")}
</mwc-button>
</div>
`;
@ -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(),
});

View File

@ -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": {