diff --git a/src/panels/developer-tools/info/developer-tools-info.ts b/src/panels/developer-tools/info/developer-tools-info.ts old mode 100755 new mode 100644 index dbeef30367..9e86c9df61 --- a/src/panels/developer-tools/info/developer-tools-info.ts +++ b/src/panels/developer-tools/info/developer-tools-info.ts @@ -31,12 +31,18 @@ class HaPanelDevInfo extends LitElement { const nonDefaultLinkText = localStorage.defaultPage === OPT_IN_PANEL && OPT_IN_PANEL === "states" - ? "Go to the Lovelace UI" - : "Go to the states UI"; + ? this.hass.localize("ui.panel.developer-tools.tabs.info.lovelace_ui") + : this.hass.localize("ui.panel.developer-tools.tabs.info.states_ui"); - const defaultPageText = `${ - localStorage.defaultPage === OPT_IN_PANEL ? "Remove" : "Set" - } ${OPT_IN_PANEL} as default page on this device`; + const defaultPageText = `${this.hass.localize( + "ui.panel.developer-tools.tabs.info.default_ui", + "action", + localStorage.defaultPage === OPT_IN_PANEL + ? this.hass.localize("ui.panel.developer-tools.tabs.info.remove") + : this.hass.localize("ui.panel.developer-tools.tabs.info.set"), + "name", + OPT_IN_PANEL + )}`; return html`
@@ -45,42 +51,58 @@ class HaPanelDevInfo extends LitElement { >Home Assistant logo

Home Assistant ${hass.config.version}

- Path to configuration.yaml: ${hass.config.config_dir} + ${this.hass.localize( + "ui.panel.developer-tools.tabs.info.path_configuration", + "path", + hass.config.config_dir + )}

- Developed by a bunch of awesome people. + ${this.hass.localize( + "ui.panel.developer-tools.tabs.info.developed_by" + )}

- Published under the Apache 2.0 license
- Source: + ${this.hass.localize( + "ui.panel.developer-tools.tabs.info.license" + )}
+ ${this.hass.localize("ui.panel.developer-tools.tabs.info.source")} server${this.hass.localize( + "ui.panel.developer-tools.tabs.info.server" + )} — frontend-ui${this.hass.localize( + "ui.panel.developer-tools.tabs.info.frontend" + )}

- Built using + ${this.hass.localize( + "ui.panel.developer-tools.tabs.info.built_using" + )} Python 3, Polymer, - Icons by + ${this.hass.localize("ui.panel.developer-tools.tabs.info.icons_by")} Google @@ -90,12 +112,20 @@ class HaPanelDevInfo extends LitElement { >.

- Frontend version: ${JS_VERSION} - ${JS_TYPE} + ${this.hass.localize( + "ui.panel.developer-tools.tabs.info.frontend_version", + "version", + JS_VERSION, + "type", + JS_TYPE + )} ${ customUiList.length > 0 ? html`

- Custom UIs: + ${this.hass.localize( + "ui.panel.developer-tools.tabs.info.custom_uis" + )} ${customUiList.map( (item) => html`
diff --git a/src/panels/developer-tools/info/system-health-card.ts b/src/panels/developer-tools/info/system-health-card.ts index 8db1b1ae0b..b0acaa3b1a 100644 --- a/src/panels/developer-tools/info/system-health-card.ts +++ b/src/panels/developer-tools/info/system-health-card.ts @@ -32,7 +32,7 @@ const sortKeys = (a: string, b: string) => { }; class SystemHealthCard extends LitElement { - @property() public hass?: HomeAssistant; + @property() public hass!: HomeAssistant; @property() private _info?: SystemHealthInfo; protected render(): TemplateResult | void { @@ -78,7 +78,7 @@ class SystemHealthCard extends LitElement { } return html` - +
${sections}
`; @@ -98,8 +98,9 @@ class SystemHealthCard extends LitElement { } catch (err) { this._info = { system_health: { - error: - "System Health component is not loaded. Add 'system_health:' to configuration.yaml", + error: this.hass.localize( + "ui.panel.developer-tools.tabs.info.system_health_error" + ), }, }; } diff --git a/src/translations/en.json b/src/translations/en.json index 3964da212a..7f77a2cdaf 100755 --- a/src/translations/en.json +++ b/src/translations/en.json @@ -1793,7 +1793,24 @@ "developer-tools": { "tabs": { "info": { - "title": "Info" + "title": "Info", + "remove": "Remove", + "set": "Set", + "default_ui": "{action} {name} as default page on this device", + "lovelace_ui": "Go to the Lovelace UI", + "states_ui": "Go to the states UI", + "home_assistant_logo": "Home Assistant logo", + "path_configuration": "Path to configuration.yaml: {path}", + "developed_by": "Developed by a bunch of awesome people.", + "license": "Published under the Apache 2.0 license", + "source": "Source:", + "server": "server", + "frontend": "frontend-ui", + "built_using": "Built using", + "icons_by": "Icons by", + "frontend_version": "Frontend version: {version} - {type}", + "custom_uis": "Custom UIs:", + "system_health_error": "System Health component is not loaded. Add 'system_health:' to configuration.yaml" }, "logs": { "title": "Logs",