mirror of
https://github.com/CringeStudios/element-desktop.git
synced 2025-01-31 05:29:58 +01:00
stop using experimental class private methods
This commit is contained in:
parent
105070716e
commit
e950303966
@ -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();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user