Fix localize lite mixin types (#2613)
This commit is contained in:
parent
fd4ede39ba
commit
5a797a6dec
|
@ -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()}
|
||||
<p>
|
||||
${this.hass!.localize(
|
||||
${this.localize(
|
||||
"ui.panel.page-authorize.authorizing_client",
|
||||
"clientId",
|
||||
this.clientId
|
||||
|
|
|
@ -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 = <T extends LitElement>(
|
||||
superClass: Constructor<T>
|
||||
): Constructor<T & LocalizeMixin & LitLocalizeLiteMixin> =>
|
||||
): Constructor<T & LitLocalizeLiteMixin> =>
|
||||
// @ts-ignore
|
||||
class extends localizeLiteBaseMixin(superClass) {
|
||||
static get properties(): PropertyDeclarations {
|
||||
|
|
Loading…
Reference in New Issue