Update to use translations

This commit is contained in:
Christopher Altona 2022-06-30 02:15:53 +00:00
parent 64533865b0
commit e2f20ecd48
2 changed files with 15 additions and 10 deletions

View File

@ -158,13 +158,13 @@ class HaPanelHistory extends SubscribeMixin(LitElement) {
@click=${this._showAll} @click=${this._showAll}
.disabled=${this._isLoading} .disabled=${this._isLoading}
.path=${mdiExpandAll} .path=${mdiExpandAll}
.label=${"Show All"} .label=${this.hass.localize("ui.panel.history.add_all")}
></ha-icon-button> ></ha-icon-button>
<ha-icon-button <ha-icon-button
@click=${this._removeAll} @click=${this._removeAll}
.disabled=${this._isLoading} .disabled=${this._isLoading}
.path=${mdiCollapseAll} .path=${mdiCollapseAll}
.label=${"Clear All"} .label=${this.hass.localize("ui.panel.history.remove_all")}
></ha-icon-button> ></ha-icon-button>
<ha-icon-button <ha-icon-button
@click=${this._refreshHistory} @click=${this._refreshHistory}
@ -201,8 +201,8 @@ class HaPanelHistory extends SubscribeMixin(LitElement) {
></ha-circular-progress> ></ha-circular-progress>
</div>` </div>`
: this._targetPickerValue === undefined : this._targetPickerValue === undefined
? html`<div class="info"> ? html` <div class="start-search">
Select what you would like to see history for above ${this.hass.localize("ui.panel.history.start_search")}
</div>` </div>`
: html` : html`
<state-history-charts <state-history-charts
@ -496,12 +496,6 @@ class HaPanelHistory extends SubscribeMixin(LitElement) {
flex-wrap: wrap; flex-wrap: wrap;
} }
.info {
text-align: center;
line-height: 60px;
color: var(--secondary-text-color);
}
ha-date-range-picker { ha-date-range-picker {
margin-right: 16px; margin-right: 16px;
margin-inline-end: 16px; margin-inline-end: 16px;
@ -534,6 +528,12 @@ class HaPanelHistory extends SubscribeMixin(LitElement) {
max-width: none; max-width: none;
width: 100%; width: 100%;
} }
.start-search {
padding-top: 16px;
text-align: center;
color: var(--secondary-text-color);
}
`, `,
]; ];
} }

View File

@ -4555,6 +4555,11 @@
"energy_distribution_title": "Energy distribution", "energy_distribution_title": "Energy distribution",
"energy_sources_table_title": "Sources", "energy_sources_table_title": "Sources",
"energy_devices_graph_title": "Monitor individual devices" "energy_devices_graph_title": "Monitor individual devices"
},
"history": {
"start_search": "Start by selecting an area, device or entity above",
"add_all": "Add all entities",
"remove_all": "Remove all selections"
} }
} }
}, },