stop using experimental class private methods

This commit is contained in:
Germain Souquet 2021-04-26 14:13:32 +01:00
parent 105070716e
commit e950303966

View file

@ -41,7 +41,7 @@ function _t(text, variables = {}) {
class AppLocalization { class AppLocalization {
static STORE_KEY = "locale" static STORE_KEY = "locale"
#store = null store = null
constructor({ store, components = [] }) { constructor({ store, components = [] }) {
counterpart.registerTranslations("en", this.fetchTranslationJson("en_EN")); counterpart.registerTranslations("en", this.fetchTranslationJson("en_EN"));
@ -52,9 +52,9 @@ class AppLocalization {
this.localizedComponents = new Set(components); this.localizedComponents = new Set(components);
} }
this.#store = store; this.store = store;
if (this.#store.has(AppLocalization.STORE_KEY)) { if (this.store.has(AppLocalization.STORE_KEY)) {
const locales = this.#store.get(AppLocalization.STORE_KEY); const locales = this.store.get(AppLocalization.STORE_KEY);
this.setAppLocale(locales); this.setAppLocale(locales);
} }
@ -90,7 +90,7 @@ class AppLocalization {
}); });
counterpart.setLocale(locales); counterpart.setLocale(locales);
this.#store.set(AppLocalization.STORE_KEY, locales); this.store.set(AppLocalization.STORE_KEY, locales);
this.resetLocalizedUI(); this.resetLocalizedUI();
} }