mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
revert making _i18n sync
Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
parent
a803ab5436
commit
9750627ee3
@ -64,7 +64,7 @@ export const statefulSetsURL = buildURL<IStatefulSetsRouteParams>(statefulSetsRo
|
||||
export const jobsURL = buildURL<IJobsRouteParams>(jobsRoute.path)
|
||||
export const cronJobsURL = buildURL<ICronJobsRouteParams>(cronJobsRoute.path)
|
||||
|
||||
export const resourceURL: Partial<Record<KubeResource, ReturnType<typeof buildURL>>> = {
|
||||
export const workloadURL: Partial<Record<KubeResource, ReturnType<typeof buildURL>>> = {
|
||||
"pods": podsURL,
|
||||
"deployments": deploymentsURL,
|
||||
"daemonsets": daemonSetsURL,
|
||||
|
||||
@ -37,11 +37,11 @@ export class LocalizationStore {
|
||||
reaction(() => this.activeLang, lang => storage.set(lang));
|
||||
}
|
||||
|
||||
init() {
|
||||
this.setLocale(this.activeLang);
|
||||
async init() {
|
||||
await this.setLocale(this.activeLang);
|
||||
}
|
||||
|
||||
setLocale(locale: string) {
|
||||
async setLocale(locale: string) {
|
||||
const catalog = require(`@lingui/loader!../../locales/${locale}/messages.po`); // eslint-disable-line @typescript-eslint/no-var-requires
|
||||
_i18n.loadLocaleData(locale, { plurals: plurals[locale] });
|
||||
_i18n.load(locale, catalog.messages);
|
||||
@ -50,7 +50,7 @@ export class LocalizationStore {
|
||||
moment.locale(locale);
|
||||
this.activeLang = locale;
|
||||
|
||||
_i18n.activate(locale);
|
||||
await _i18n.activate(locale);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user