mirror of
https://github.com/plankanban/planka.git
synced 2025-12-23 01:11:40 +03:00
@@ -58,7 +58,7 @@ i18n
|
|||||||
.use(initReactI18next)
|
.use(initReactI18next)
|
||||||
.init({
|
.init({
|
||||||
resources: embedLocales,
|
resources: embedLocales,
|
||||||
fallbackLng: false,
|
fallbackLng: 'en',
|
||||||
supportedLngs: languages,
|
supportedLngs: languages,
|
||||||
load: 'languageOnly',
|
load: 'languageOnly',
|
||||||
interpolation: {
|
interpolation: {
|
||||||
@@ -79,7 +79,11 @@ i18n
|
|||||||
debug: process.env.NODE_ENV !== 'production',
|
debug: process.env.NODE_ENV !== 'production',
|
||||||
});
|
});
|
||||||
|
|
||||||
i18n.loadCoreLocale = (language) =>
|
i18n.loadCoreLocale = (language = i18n.resolvedLanguage) => {
|
||||||
|
if (language === 'en') {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
import(`./locales/${language}/core`).then((module) => {
|
import(`./locales/${language}/core`).then((module) => {
|
||||||
const locale = module.default;
|
const locale = module.default;
|
||||||
|
|
||||||
@@ -91,5 +95,6 @@ i18n.loadCoreLocale = (language) =>
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
};
|
||||||
|
|
||||||
export default i18n;
|
export default i18n;
|
||||||
|
|||||||
@@ -1,9 +1,11 @@
|
|||||||
|
import merge from 'lodash/merge';
|
||||||
import fromPairs from 'lodash/fromPairs';
|
import fromPairs from 'lodash/fromPairs';
|
||||||
|
|
||||||
import csLogin from './cs/login';
|
import csLogin from './cs/login';
|
||||||
import daLogin from './da/login';
|
import daLogin from './da/login';
|
||||||
import deLogin from './de/login';
|
import deLogin from './de/login';
|
||||||
import enLogin from './en/login';
|
import enLogin from './en/login';
|
||||||
|
import enCore from './en/core';
|
||||||
import esLogin from './es/login';
|
import esLogin from './es/login';
|
||||||
import frLogin from './fr/login';
|
import frLogin from './fr/login';
|
||||||
import jaLogin from './ja/login';
|
import jaLogin from './ja/login';
|
||||||
@@ -16,7 +18,7 @@ const localePairs = [
|
|||||||
['cs', csLogin],
|
['cs', csLogin],
|
||||||
['da', daLogin],
|
['da', daLogin],
|
||||||
['de', deLogin],
|
['de', deLogin],
|
||||||
['en', enLogin],
|
['en', merge(enLogin, enCore)],
|
||||||
['es', esLogin],
|
['es', esLogin],
|
||||||
['fr', frLogin],
|
['fr', frLogin],
|
||||||
['ja', jaLogin],
|
['ja', jaLogin],
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ export function* initializeCoreService() {
|
|||||||
notifications,
|
notifications,
|
||||||
} = yield call(fetchCoreRequest); // TODO: handle error
|
} = yield call(fetchCoreRequest); // TODO: handle error
|
||||||
|
|
||||||
yield call(i18n.loadCoreLocale, i18n.resolvedLanguage);
|
yield call(i18n.loadCoreLocale);
|
||||||
|
|
||||||
yield put(
|
yield put(
|
||||||
initializeCore(
|
initializeCore(
|
||||||
|
|||||||
Reference in New Issue
Block a user