Load system health translations from backend (#7643)

This commit is contained in:
Paulus Schoutsen 2020-11-10 23:44:59 +01:00 committed by GitHub
parent 2f4e7b388b
commit fe7d79cee6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 35 deletions

View File

@ -17,7 +17,8 @@ export type TranslationCategory =
| "config"
| "options"
| "device_automation"
| "mfa_setup";
| "mfa_setup"
| "system_health";
export const fetchTranslationPreferences = (hass: HomeAssistant) =>
fetchFrontendUserData(hass.connection, "language");

View File

@ -106,7 +106,7 @@ class SystemHealthCard extends LitElement {
<tr>
<td>
${this.hass.localize(
`ui.panel.config.info.system_health.checks.${domain}.${key}`
`component.${domain}.system_health.info.${key}`
) || key}
</td>
<td>${value}</td>
@ -170,6 +170,8 @@ class SystemHealthCard extends LitElement {
protected firstUpdated(changedProps) {
super.firstUpdated(changedProps);
this.hass!.loadBackendTranslation("system_health");
if (!this.hass!.config.components.includes("system_health")) {
this._info = {
system_health: {

View File

@ -892,39 +892,7 @@
"issues": "Issues",
"system_health": {
"manage": "Manage",
"more_info": "more info",
"checks": {
"homeassistant": {
"arch": "CPU Architecture",
"dev": "Development",
"docker": "Docker",
"hassio": "HassOS",
"installation_type": "Installation Type",
"os_name": "Operating System Name",
"os_version": "Operating System Version",
"python_version": "Python Version",
"timezone": "Timezone",
"version": "Version",
"virtualenv": "Virtual Environment"
},
"cloud": {
"can_reach_cert_server": "Reach Certificate Server",
"can_reach_cloud": "Reach Home Assistant Cloud",
"can_reach_cloud_auth": "Reach Authentication Server",
"relayer_connected": "Relayer Connected",
"remote_connected": "Remote Connected",
"remote_enabled": "Remote Enabled",
"alexa_enabled": "Alexa Enabled",
"google_enabled": "Google Enabled",
"logged_in": "Logged In",
"subscription_expiration": "Subscription Expiration"
},
"lovelace": {
"dashboards": "Dashboards",
"mode": "Mode",
"resources": "Resources"
}
}
"more_info": "more info"
}
},
"logs": {