Localization updates (#6359)

This commit is contained in:
Yosi Levy 2020-07-11 19:07:22 +03:00 committed by GitHub
parent 833ccf3637
commit 7d1835e59c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 35 additions and 3 deletions

View File

@ -26,6 +26,9 @@ class SearchInput extends LitElement {
@property({ type: Boolean }) @property({ type: Boolean })
public autofocus = false; public autofocus = false;
@property({ type: String })
public label?: string;
public focus() { public focus() {
this.shadowRoot!.querySelector("paper-input")!.focus(); this.shadowRoot!.querySelector("paper-input")!.focus();
} }
@ -43,7 +46,7 @@ class SearchInput extends LitElement {
<paper-input <paper-input
class=${classMap({ "no-underline": this.noUnderline })} class=${classMap({ "no-underline": this.noUnderline })}
.autofocus=${this.autofocus} .autofocus=${this.autofocus}
label="Search" .label=${this.label || "Search"}
.value=${this.filter} .value=${this.filter}
@value-changed=${this._filterInputChanged} @value-changed=${this._filterInputChanged}
.noLabelFloat=${this.noLabelFloat} .noLabelFloat=${this.noLabelFloat}

View File

@ -81,6 +81,7 @@ class StepFlowPickHandler extends LitElement {
autofocus autofocus
.filter=${this.filter} .filter=${this.filter}
@value-changed=${this._filterChanged} @value-changed=${this._filterChanged}
.label=${this.hass.localize("ui.panel.config.integrations.search")}
></search-input> ></search-input>
<div <div
style=${styleMap({ style=${styleMap({

View File

@ -127,6 +127,9 @@ export class HaTabsSubpageDataTable extends LitElement {
no-label-float no-label-float
no-underline no-underline
@value-changed=${this._handleSearchChange} @value-changed=${this._handleSearchChange}
.label=${this.hass.localize(
"ui.components.data-table.search"
)}
></search-input> ></search-input>
${this.activeFilters ${this.activeFilters
? html`<div class="active-filters"> ? html`<div class="active-filters">
@ -172,6 +175,9 @@ export class HaTabsSubpageDataTable extends LitElement {
no-label-float no-label-float
no-underline no-underline
@value-changed=${this._handleSearchChange} @value-changed=${this._handleSearchChange}
.label=${this.hass.localize(
"ui.components.data-table.search"
)}
> >
</search-input> </search-input>
${this.activeFilters ${this.activeFilters

View File

@ -422,6 +422,9 @@ export class HaConfigEntities extends SubscribeMixin(LitElement) {
no-underline no-underline
@value-changed=${this._handleSearchChange} @value-changed=${this._handleSearchChange}
.filter=${this._filter} .filter=${this._filter}
.label=${this.hass.localize(
"ui.panel.config.entities.picker.search"
)}
></search-input ></search-input
>${activeFilters >${activeFilters
? html`<div class="active-filters"> ? html`<div class="active-filters">

View File

@ -155,6 +155,9 @@ export class HaConfigHelpers extends LitElement {
.data=${this._getItems(this._stateItems)} .data=${this._getItems(this._stateItems)}
@row-click=${this._openEditDialog} @row-click=${this._openEditDialog}
hasFab hasFab
.noDataText=${this.hass.localize(
"ui.panel.config.helpers.picker.no_helpers"
)}
> >
</hass-tabs-subpage-data-table> </hass-tabs-subpage-data-table>
<mwc-fab <mwc-fab

View File

@ -263,6 +263,9 @@ class HaConfigIntegrations extends SubscribeMixin(LitElement) {
no-label-float no-label-float
no-underline no-underline
@value-changed=${this._handleSearchChange} @value-changed=${this._handleSearchChange}
.label=${this.hass.localize(
"ui.panel.config.integrations.search"
)}
></search-input> ></search-input>
</slot> </slot>
</div> </div>
@ -293,6 +296,9 @@ class HaConfigIntegrations extends SubscribeMixin(LitElement) {
no-underline no-underline
.filter=${this._filter} .filter=${this._filter}
@value-changed=${this._handleSearchChange} @value-changed=${this._handleSearchChange}
.label=${this.hass.localize(
"ui.panel.config.integrations.search"
)}
></search-input> ></search-input>
</div> </div>
` `

View File

@ -97,6 +97,9 @@ export class HuiCardPicker extends LitElement {
.filter=${this._filter} .filter=${this._filter}
no-label-float no-label-float
@value-changed=${this._handleSearchChange} @value-changed=${this._handleSearchChange}
.label=${this.hass.localize(
"ui.panel.lovelace.editor.card.generic.search"
)}
></search-input> ></search-input>
<div <div
id="content" id="content"

View File

@ -331,6 +331,9 @@
"scene": "Part of the following scenes", "scene": "Part of the following scenes",
"script": "Part of the following scripts", "script": "Part of the following scripts",
"automation": "Part of the following automations" "automation": "Part of the following automations"
},
"data-table": {
"search": "Search"
} }
}, },
"dialogs": { "dialogs": {
@ -602,7 +605,8 @@
"type": "Type", "type": "Type",
"editable": "Editable" "editable": "Editable"
}, },
"add_helper": "Add helper" "add_helper": "Add helper",
"no_helpers": "Looks like you don't have any helpers yet!"
}, },
"dialog": { "dialog": {
"create": "Create", "create": "Create",
@ -1338,6 +1342,7 @@
"header": "Entities", "header": "Entities",
"introduction": "Home Assistant keeps a registry of every entity it has ever seen that can be uniquely identified. Each of these entities will have an entity ID assigned which will be reserved for just this entity.", "introduction": "Home Assistant keeps a registry of every entity it has ever seen that can be uniquely identified. Each of these entities will have an entity ID assigned which will be reserved for just this entity.",
"introduction2": "Use the entity registry to override the name, change the entity ID or remove the entry from Home Assistant.", "introduction2": "Use the entity registry to override the name, change the entity ID or remove the entry from Home Assistant.",
"search": "Search entities",
"filter": { "filter": {
"filter": "Filter", "filter": "Filter",
"show_disabled": "Show disabled entities", "show_disabled": "Show disabled entities",
@ -1452,6 +1457,7 @@
"details": "Integration details", "details": "Integration details",
"rename_dialog": "Edit the name of this config entry", "rename_dialog": "Edit the name of this config entry",
"rename_input_label": "Entry name", "rename_input_label": "Entry name",
"search": "Search integrations",
"ignore": { "ignore": {
"ignore": "Ignore", "ignore": "Ignore",
"confirm_ignore_title": "Ignore discovery of {name}?", "confirm_ignore_title": "Ignore discovery of {name}?",
@ -1996,7 +2002,8 @@
"unit": "Unit", "unit": "Unit",
"url": "Url", "url": "Url",
"state": "State", "state": "State",
"secondary_info_attribute": "Secondary Info Attribute" "secondary_info_attribute": "Secondary Info Attribute",
"search": "Search"
}, },
"map": { "map": {
"name": "Map", "name": "Map",