From d003df96f21d2d8846fbe096991d61bf6cbd7dc5 Mon Sep 17 00:00:00 2001 From: Untone Date: Tue, 3 Sep 2024 20:12:46 +0300 Subject: [PATCH] preload-trans --- src/intl/i18next.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/intl/i18next.ts b/src/intl/i18next.ts index ae8b87f4..b5030c67 100644 --- a/src/intl/i18next.ts +++ b/src/intl/i18next.ts @@ -4,6 +4,8 @@ import ICU from 'i18next-icu' import TimeAgo from 'javascript-time-ago' import enTime from 'javascript-time-ago/locale/en' import ruTime from 'javascript-time-ago/locale/ru' +import en from '~/intl/locales/en/translation.json' +import ru from '~/intl/locales/ru/translation.json' TimeAgo.addLocale(enTime) TimeAgo.addLocale(ruTime) @@ -11,8 +13,6 @@ TimeAgo.addLocale(ruTime) export const i18nextInit = async (lng = 'ru') => { if (!i18next.isInitialized) { console.debug('[i18next] initializing...') - const en = await import('~/intl/locales/en/translation.json') - const ru = await import('~/intl/locales/ru/translation.json') await i18next .use(HttpApi) .use(ICU)