fix(localize): fire localeChanged after loading missing locales

This commit is contained in:
Thomas Allmer 2020-01-13 10:31:35 +01:00 committed by Thomas Allmer
parent 4a93599228
commit bf7603e7e2

View file

@ -238,10 +238,10 @@ export class LocalizeManager extends LionSingleton {
if (newLocale === oldLocale) {
return;
}
this.dispatchEvent(new CustomEvent('localeChanged', { detail: { newLocale, oldLocale } }));
if (this._autoLoadOnLocaleChange) {
this._loadAllMissing(newLocale, oldLocale);
}
this.dispatchEvent(new CustomEvent('localeChanged', { detail: { newLocale, oldLocale } }));
}
_loadAllMissing(newLocale, oldLocale) {