diff --git a/frontend/src/lang/modules/en.ts b/frontend/src/lang/modules/en.ts index e89b664db..f7aefcc56 100644 --- a/frontend/src/lang/modules/en.ts +++ b/frontend/src/lang/modules/en.ts @@ -1,9 +1,9 @@ import fit2cloudEnLocale from 'fit2cloud-ui-plus/src/locale/lang/en'; let xpackEnLocale = {}; -try { - const commercialTranslationModule = await import('@/xpack/lang/en'); - xpackEnLocale = commercialTranslationModule.default || {}; -} catch (error) {} +const xpackModules = import.meta.globEager('../../xpack/lang/en.ts'); +if (xpackModules['../../xpack/lang/en.ts']) { + xpackEnLocale = xpackModules['../../xpack/lang/en.ts'].default || {}; +} const message = { commons: { diff --git a/frontend/src/lang/modules/tw.ts b/frontend/src/lang/modules/tw.ts index ea3ddc81d..47a2dc8e7 100644 --- a/frontend/src/lang/modules/tw.ts +++ b/frontend/src/lang/modules/tw.ts @@ -1,9 +1,10 @@ import fit2cloudTwLocale from 'fit2cloud-ui-plus/src/locale/lang/zh-cn'; let xpackTwLocale = {}; -try { - const commercialTranslationModule = await import('@/xpack/lang/tw'); - xpackTwLocale = commercialTranslationModule.default || {}; -} catch (error) {} +const xpackModules = import.meta.globEager('../../xpack/lang/tw.ts'); +if (xpackModules['../../xpack/lang/tw.ts']) { + xpackTwLocale = xpackModules['../../xpack/lang/tw.ts'].default || {}; +} + const message = { commons: { true: '是', diff --git a/frontend/src/lang/modules/zh.ts b/frontend/src/lang/modules/zh.ts index fdeede12e..5ed308f45 100644 --- a/frontend/src/lang/modules/zh.ts +++ b/frontend/src/lang/modules/zh.ts @@ -1,9 +1,9 @@ import fit2cloudZhLocale from 'fit2cloud-ui-plus/src/locale/lang/zh-cn'; let xpackZhLocale = {}; -try { - const commercialTranslationModule = await import('@/xpack/lang/zh'); - xpackZhLocale = commercialTranslationModule.default || {}; -} catch (error) {} +const xpackModules = import.meta.globEager('../../xpack/lang/zh.ts'); +if (xpackModules['../../xpack/lang/zh.ts']) { + xpackZhLocale = xpackModules['../../xpack/lang/zh.ts'].default || {}; +} const message = { commons: {