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

View File

@ -67,7 +67,7 @@ export class EntityRegistrySettings extends LitElement {
? html` ? html`
<div> <div>
${this.hass!.localize( ${this.hass!.localize(
"ui.panel.config.entities.editor.unavailable" "ui.dialogs.entity_registry.editor.unavailable"
)} )}
</div> </div>
` `
@ -81,7 +81,9 @@ export class EntityRegistrySettings extends LitElement {
<paper-input <paper-input
.value=${this._name} .value=${this._name}
@value-changed=${this._nameChanged} @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) : ""} .placeholder=${stateObj ? computeStateName(stateObj) : ""}
.disabled=${this._submitting} .disabled=${this._submitting}
></paper-input> ></paper-input>
@ -89,7 +91,7 @@ export class EntityRegistrySettings extends LitElement {
.value=${this._entityId} .value=${this._entityId}
@value-changed=${this._entityIdChanged} @value-changed=${this._entityIdChanged}
.label=${this.hass.localize( .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" error-message="Domain needs to stay the same"
.invalid=${invalidDomainUpdate} .invalid=${invalidDomainUpdate}
@ -103,13 +105,13 @@ export class EntityRegistrySettings extends LitElement {
<div> <div>
<div> <div>
${this.hass.localize( ${this.hass.localize(
"ui.panel.config.entities.editor.enabled_label" "ui.dialogs.entity_registry.editor.enabled_label"
)} )}
</div> </div>
<div class="secondary"> <div class="secondary">
${this._disabledBy && this._disabledBy !== "user" ${this._disabledBy && this._disabledBy !== "user"
? this.hass.localize( ? this.hass.localize(
"ui.panel.config.entities.editor.enabled_cause", "ui.dialogs.entity_registry.editor.enabled_cause",
"cause", "cause",
this.hass.localize( this.hass.localize(
`config_entry.disabled_by.${this._disabledBy}` `config_entry.disabled_by.${this._disabledBy}`
@ -117,10 +119,10 @@ export class EntityRegistrySettings extends LitElement {
) )
: ""} : ""}
${this.hass.localize( ${this.hass.localize(
"ui.panel.config.entities.editor.enabled_description" "ui.dialogs.entity_registry.editor.enabled_description"
)} )}
<br />${this.hass.localize( <br />${this.hass.localize(
"ui.panel.config.entities.editor.note" "ui.dialogs.entity_registry.editor.note"
)} )}
</div> </div>
</div> </div>
@ -135,13 +137,13 @@ export class EntityRegistrySettings extends LitElement {
.disabled=${this._submitting || .disabled=${this._submitting ||
!(stateObj && stateObj.attributes.restored)} !(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>
<mwc-button <mwc-button
@click="${this._updateEntry}" @click="${this._updateEntry}"
.disabled=${invalidDomainUpdate || this._submitting} .disabled=${invalidDomainUpdate || this._submitting}
> >
${this.hass.localize("ui.panel.config.entities.editor.update")} ${this.hass.localize("ui.dialogs.entity_registry.editor.update")}
</mwc-button> </mwc-button>
</div> </div>
`; `;
@ -187,7 +189,7 @@ export class EntityRegistrySettings extends LitElement {
private _confirmDeleteEntry(): void { private _confirmDeleteEntry(): void {
showConfirmationDialog(this, { showConfirmationDialog(this, {
text: this.hass.localize( text: this.hass.localize(
"ui.panel.config.entities.editor.confirm_delete" "ui.dialogs.entity_registry.editor.confirm_delete"
), ),
confirm: () => this._deleteEntry(), confirm: () => this._deleteEntry(),
}); });

View File

@ -603,6 +603,24 @@
"confirm_remove_text": "Are you sure you want to remove this entity?" "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": { "options_flow": {
"form": { "form": {
"header": "Options" "header": "Options"
@ -1303,24 +1321,6 @@
"confirm_title": "Do you want to remove {number} entities?", "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." "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": { "person": {