style: apply prettier formatting
This commit is contained in:
@@ -14,7 +14,10 @@ type SupportedLang = 'it' | 'en' | 'de' | 'fr';
|
|||||||
const FALLBACK_LANG: SupportedLang = 'it';
|
const FALLBACK_LANG: SupportedLang = 'it';
|
||||||
const translationCache = new Map<SupportedLang, Promise<TranslationObject>>();
|
const translationCache = new Map<SupportedLang, Promise<TranslationObject>>();
|
||||||
|
|
||||||
const translationLoaders: Record<SupportedLang, () => Promise<TranslationObject>> = {
|
const translationLoaders: Record<
|
||||||
|
SupportedLang,
|
||||||
|
() => Promise<TranslationObject>
|
||||||
|
> = {
|
||||||
it: () =>
|
it: () =>
|
||||||
import('../../../assets/i18n/it.json').then(
|
import('../../../assets/i18n/it.json').then(
|
||||||
(module) => module.default as TranslationObject,
|
(module) => module.default as TranslationObject,
|
||||||
@@ -51,8 +54,9 @@ export class StaticTranslateLoader implements TranslateLoader {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private loadTranslation(lang: SupportedLang): Promise<TranslationObject> {
|
private loadTranslation(lang: SupportedLang): Promise<TranslationObject> {
|
||||||
const transferStateKey =
|
const transferStateKey = makeStateKey<TranslationObject>(
|
||||||
makeStateKey<TranslationObject>(`i18n:${lang.toLowerCase()}`);
|
`i18n:${lang.toLowerCase()}`,
|
||||||
|
);
|
||||||
if (
|
if (
|
||||||
isPlatformBrowser(this.platformId) &&
|
isPlatformBrowser(this.platformId) &&
|
||||||
this.transferState.hasKey(transferStateKey)
|
this.transferState.hasKey(transferStateKey)
|
||||||
|
|||||||
Reference in New Issue
Block a user