diff --git a/src/auth/ha-authorize.ts b/src/auth/ha-authorize.ts index 989d72d6c8..41e841af03 100644 --- a/src/auth/ha-authorize.ts +++ b/src/auth/ha-authorize.ts @@ -61,7 +61,7 @@ class HaAuthorize extends litLocalizeLiteMixin(LitElement) { // So we sanitize the translation with innerText and then inject // the name with a bold tag. const loggingInWith = document.createElement("div"); - loggingInWith.innerText = this.hass!.localize( + loggingInWith.innerText = this.localize( "ui.panel.page-authorize.logging_in_with", "authProviderName", "NAME" @@ -78,7 +78,7 @@ class HaAuthorize extends litLocalizeLiteMixin(LitElement) { return html` ${this.renderStyle()}
- ${this.hass!.localize(
+ ${this.localize(
"ui.panel.page-authorize.authorizing_client",
"clientId",
this.clientId
diff --git a/src/mixins/lit-localize-lite-mixin.ts b/src/mixins/lit-localize-lite-mixin.ts
index 8aacd8089c..c80555d7b3 100644
--- a/src/mixins/lit-localize-lite-mixin.ts
+++ b/src/mixins/lit-localize-lite-mixin.ts
@@ -6,8 +6,7 @@ import {
} from "lit-element";
import { getActiveTranslation } from "../util/hass-translation";
import { localizeLiteBaseMixin } from "./localize-lite-base-mixin";
-import { computeLocalize } from "../common/translations/localize";
-import { LocalizeMixin } from "../types";
+import { computeLocalize, LocalizeFunc } from "../common/translations/localize";
const empty = () => "";
@@ -15,11 +14,12 @@ interface LitLocalizeLiteMixin {
language: string;
resources: {};
translationFragment: string;
+ localize: LocalizeFunc;
}
export const litLocalizeLiteMixin =