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 {
|
||||
static STORE_KEY = "locale"
|
||||
#store = null
|
||||
store = null
|
||||
|
||||
constructor({ store, components = [] }) {
|
||||
counterpart.registerTranslations("en", this.fetchTranslationJson("en_EN"));
|
||||
@ -52,9 +52,9 @@ class AppLocalization {
|
||||
this.localizedComponents = new Set(components);
|
||||
}
|
||||
|
||||
this.#store = store;
|
||||
if (this.#store.has(AppLocalization.STORE_KEY)) {
|
||||
const locales = this.#store.get(AppLocalization.STORE_KEY);
|
||||
this.store = store;
|
||||
if (this.store.has(AppLocalization.STORE_KEY)) {
|
||||
const locales = this.store.get(AppLocalization.STORE_KEY);
|
||||
this.setAppLocale(locales);
|
||||
}
|
||||
|
||||
@ -90,7 +90,7 @@ class AppLocalization {
|
||||
});
|
||||
|
||||
counterpart.setLocale(locales);
|
||||
this.#store.set(AppLocalization.STORE_KEY, locales);
|
||||
this.store.set(AppLocalization.STORE_KEY, locales);
|
||||
|
||||
this.resetLocalizedUI();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user