Add missing translations to statistics fixing (#10159)

This commit is contained in:
Philip Allgaier 2021-10-06 10:38:44 +02:00 committed by GitHub
parent ea3fae2ce4
commit a696d849b2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 5 deletions

View File

@ -81,14 +81,16 @@ class HaPanelDevStatistics extends LitElement {
issue.data issue.data
) || issue.type ) || issue.type
) )
: "No issues"}`, : localize("ui.panel.developer-tools.tabs.statistics.no_issue")}`,
}, },
fix: { fix: {
title: "", title: "",
template: (_, data: any) => template: (_, data: any) =>
html`${data.issues html`${data.issues
? html`<mwc-button @click=${this._fixIssue} .data=${data.issues}> ? html`<mwc-button @click=${this._fixIssue} .data=${data.issues}>
Fix issue ${localize(
"ui.panel.developer-tools.tabs.statistics.fix_issue.fix"
)}
</mwc-button>` </mwc-button>`
: ""}`, : ""}`,
width: "113px", width: "113px",

View File

@ -82,7 +82,7 @@ export class DialogStatisticsFixUnitsChanged extends LitElement {
<mwc-button slot="primaryAction" @click=${this._fixIssue}> <mwc-button slot="primaryAction" @click=${this._fixIssue}>
${this.hass.localize( ${this.hass.localize(
"ui.panel.developer-tools.tabs.statistics.fix_issue.units_changed.fix" "ui.panel.developer-tools.tabs.statistics.fix_issue.fix"
)} )}
</mwc-button> </mwc-button>
<mwc-button slot="secondaryAction" @click=${this.closeDialog}> <mwc-button slot="secondaryAction" @click=${this.closeDialog}>

View File

@ -3730,6 +3730,7 @@
"title": "Statistics", "title": "Statistics",
"entity": "Entity", "entity": "Entity",
"issue": "Issue", "issue": "Issue",
"no_issue": "No issue",
"issues": { "issues": {
"units_changed": "The unit of this entity changed from ''{metadata_unit}'' to ''{state_unit}''.", "units_changed": "The unit of this entity changed from ''{metadata_unit}'' to ''{state_unit}''.",
"unsupported_unit_state": "The unit (''{state_unit}'') of this entity doesn't match a unit of device class ''{device_class}''.", "unsupported_unit_state": "The unit (''{state_unit}'') of this entity doesn't match a unit of device class ''{device_class}''.",
@ -3738,11 +3739,11 @@
"entity_not_recorded": "This entity is excluded from being recorded." "entity_not_recorded": "This entity is excluded from being recorded."
}, },
"fix_issue": { "fix_issue": {
"fix": "Fix issue",
"units_changed": { "units_changed": {
"title": "The unit of this entity changed", "title": "The unit of this entity changed",
"update": "Update the historic statistic values from ''{metadata_unit}'' to ''{state_unit}''", "update": "Update the historic statistic values from ''{metadata_unit}'' to ''{state_unit}''",
"clear": "Delete all old statistic data for this entity", "clear": "Delete all old statistic data for this entity"
"fix": "Fix issue"
} }
} }
} }