From a430284aa21e3ae1f0d5654e55b2ad2852519cc2 Mon Sep 17 00:00:00 2001 From: wwf <yearningwang@iqtogether.com> Date: 星期三, 04 六月 2025 15:17:49 +0800 Subject: [PATCH] 初始化 --- i18n/i18next-config.ts | 19 +------------------ 1 files changed, 1 insertions(+), 18 deletions(-) diff --git a/i18n/i18next-config.ts b/i18n/i18next-config.ts index 8c5583b..661475e 100644 --- a/i18n/i18next-config.ts +++ b/i18n/i18next-config.ts @@ -4,18 +4,6 @@ import { LanguagesSupported } from '@/i18n/language' -const requireSilent = (lang: string) => { - let res - try { - res = require(`./${lang}/education`).default - } - catch { - res = require('./en-US/education').default - } - - return res -} - const loadLangResources = (lang: string) => ({ translation: { common: require(`./${lang}/common`).default, @@ -40,16 +28,11 @@ tools: require(`./${lang}/tools`).default, workflow: require(`./${lang}/workflow`).default, runLog: require(`./${lang}/run-log`).default, - plugin: require(`./${lang}/plugin`).default, - pluginTags: require(`./${lang}/plugin-tags`).default, - time: require(`./${lang}/time`).default, - education: requireSilent(lang), }, }) -type Resource = Record<string, ReturnType<typeof loadLangResources>> // Automatically generate the resources object -export const resources = LanguagesSupported.reduce<Resource>((acc, lang) => { +const resources = LanguagesSupported.reduce((acc: any, lang: string) => { acc[lang] = loadLangResources(lang) return acc }, {}) -- Gitblit v1.8.0