Skip to content

Commit

Permalink
Move lokalisePromError
Browse files Browse the repository at this point in the history
  • Loading branch information
gjohansson-ST committed Mar 30, 2024
1 parent d0827a2 commit 35d7913
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/panels/config/integrations/ha-config-integration-page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -551,11 +551,6 @@ class HaConfigIntegrationPage extends SubscribeMixin(LitElement) {
`ui.panel.config.integrations.config_entry.state.${item.state}`,
];
if (item.reason) {
const lokalisePromError = this.hass
.loadBackendTranslation("config", item.domain)
.then((localize) =>
localize(`component.${item.domain}.config.error.${item.reason}`)
);
if (item.error_reason_translation_key) {
const lokalisePromExc = this.hass
.loadBackendTranslation("exceptions", item.domain)
Expand All @@ -567,6 +562,11 @@ class HaConfigIntegrationPage extends SubscribeMixin(LitElement) {
);
stateTextExtra = html`${until(lokalisePromExc)}`;
} else {
const lokalisePromError = this.hass
.loadBackendTranslation("config", item.domain)
.then((localize) =>
localize(`component.${item.domain}.config.error.${item.reason}`)
);
stateTextExtra = html`${until(lokalisePromError, item.reason)}`;
}
} else {
Expand Down

0 comments on commit 35d7913

Please sign in to comment.