mirror of
https://github.com/plankanban/planka.git
synced 2025-07-26 00:29:48 +02:00
fix: Fix core locale loading
This commit is contained in:
parent
fe62180cda
commit
a3f33d0361
1 changed files with 8 additions and 10 deletions
|
@ -79,13 +79,12 @@ i18n
|
|||
debug: process.env.NODE_ENV !== 'production',
|
||||
});
|
||||
|
||||
i18n.loadCoreLocale = (language = i18n.resolvedLanguage) => {
|
||||
i18n.loadCoreLocale = async (language = i18n.resolvedLanguage) => {
|
||||
if (language === 'en') {
|
||||
return;
|
||||
}
|
||||
|
||||
import(`./locales/${language}/core`).then((module) => {
|
||||
const locale = module.default;
|
||||
const { default: locale } = await import(`./locales/${language}/core`);
|
||||
|
||||
Object.keys(locale).forEach((namespace) => {
|
||||
if (namespace === 'dateFns') {
|
||||
|
@ -94,7 +93,6 @@ i18n.loadCoreLocale = (language = i18n.resolvedLanguage) => {
|
|||
i18n.addResourceBundle(language, namespace, locale[namespace], true, true);
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
export default i18n;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue