From d57f184a1c910d1a1ddeb2755037671063812fa5 Mon Sep 17 00:00:00 2001 From: "Rasamoelina, Haja Onjatiana" <26148770+rhahao@users.noreply.github.com> Date: Thu, 16 Nov 2023 08:05:32 +0300 Subject: [PATCH] refactor(app): update i18n path --- src/current/i18n.js | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/current/i18n.js b/src/current/i18n.js index 6857d7946f..cb6afeeabe 100644 --- a/src/current/i18n.js +++ b/src/current/i18n.js @@ -6,23 +6,23 @@ const resources = {}; // programatically load all locales for await (const language of LANGUAGE_LIST) { - // load ui namespace - const ui = await import(`./locales/${language.locale}/ui.json`).then((module) => module.default); - // load source namespace - const source = await import(`./locales/${language.locale}/source.json`).then((module) => module.default); + // load ui namespace + const ui = await import(`../shared/locales/${language.locale}/ui.json`).then((module) => module.default); + // load source namespace + const source = await import(`../shared/locales/${language.locale}/source.json`).then((module) => module.default); - resources[language.code] = { - ui, - source, - }; + resources[language.code] = { + ui, + source, + }; } i18n.use(initReactI18next).init({ - resources, - lng: 'e', - fallbackLng: 'e', - keySeparator: true, - interpolation: { escapeValue: false }, + resources, + lng: 'e', + fallbackLng: 'e', + keySeparator: true, + interpolation: { escapeValue: false }, }); export default i18n;