mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-28 11:46:42 +00:00
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
|
// So we sanitize the translation with innerText and then inject
|
||||||
// the name with a bold tag.
|
// the name with a bold tag.
|
||||||
const loggingInWith = document.createElement("div");
|
const loggingInWith = document.createElement("div");
|
||||||
loggingInWith.innerText = this.hass!.localize(
|
loggingInWith.innerText = this.localize(
|
||||||
"ui.panel.page-authorize.logging_in_with",
|
"ui.panel.page-authorize.logging_in_with",
|
||||||
"authProviderName",
|
"authProviderName",
|
||||||
"NAME"
|
"NAME"
|
||||||
@ -78,7 +78,7 @@ class HaAuthorize extends litLocalizeLiteMixin(LitElement) {
|
|||||||
return html`
|
return html`
|
||||||
${this.renderStyle()}
|
${this.renderStyle()}
|
||||||
<p>
|
<p>
|
||||||
${this.hass!.localize(
|
${this.localize(
|
||||||
"ui.panel.page-authorize.authorizing_client",
|
"ui.panel.page-authorize.authorizing_client",
|
||||||
"clientId",
|
"clientId",
|
||||||
this.clientId
|
this.clientId
|
||||||
|
@ -6,8 +6,7 @@ import {
|
|||||||
} from "lit-element";
|
} from "lit-element";
|
||||||
import { getActiveTranslation } from "../util/hass-translation";
|
import { getActiveTranslation } from "../util/hass-translation";
|
||||||
import { localizeLiteBaseMixin } from "./localize-lite-base-mixin";
|
import { localizeLiteBaseMixin } from "./localize-lite-base-mixin";
|
||||||
import { computeLocalize } from "../common/translations/localize";
|
import { computeLocalize, LocalizeFunc } from "../common/translations/localize";
|
||||||
import { LocalizeMixin } from "../types";
|
|
||||||
|
|
||||||
const empty = () => "";
|
const empty = () => "";
|
||||||
|
|
||||||
@ -15,11 +14,12 @@ interface LitLocalizeLiteMixin {
|
|||||||
language: string;
|
language: string;
|
||||||
resources: {};
|
resources: {};
|
||||||
translationFragment: string;
|
translationFragment: string;
|
||||||
|
localize: LocalizeFunc;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const litLocalizeLiteMixin = <T extends LitElement>(
|
export const litLocalizeLiteMixin = <T extends LitElement>(
|
||||||
superClass: Constructor<T>
|
superClass: Constructor<T>
|
||||||
): Constructor<T & LocalizeMixin & LitLocalizeLiteMixin> =>
|
): Constructor<T & LitLocalizeLiteMixin> =>
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
class extends localizeLiteBaseMixin(superClass) {
|
class extends localizeLiteBaseMixin(superClass) {
|
||||||
static get properties(): PropertyDeclarations {
|
static get properties(): PropertyDeclarations {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user