From 21d31a70250cfea0c11b63120c8a2fdb3ca95fbb Mon Sep 17 00:00:00 2001 From: melvinchia3636 Date: Wed, 24 Jun 2026 01:46:48 +0800 Subject: [PATCH] fix: remove namespace preload --- .../src/config/client-i18n.config.ts | 26 ------------------- 1 file changed, 26 deletions(-) diff --git a/packages/localization/src/config/client-i18n.config.ts b/packages/localization/src/config/client-i18n.config.ts index ced69791d..08716ec40 100644 --- a/packages/localization/src/config/client-i18n.config.ts +++ b/packages/localization/src/config/client-i18n.config.ts @@ -25,30 +25,6 @@ export function clientI18nConfig({ forgeAPI, getAvailableLanguages }: ClientI18nConfigOptions): InitOptions { - i18n.on('loaded', () => { - const loadedLangs = i18n.languages || ['en'] - - for (const lang of loadedLangs) { - const commonBundle = i18n.getResourceBundle(lang, 'common') as - | Record - | undefined - - if (commonBundle) { - const subnamespaces = Object.keys(commonBundle) - - for (const sub of subnamespaces) { - i18n.addResourceBundle( - lang, - `common.${sub}`, - (commonBundle[sub] as Record) || {}, - true, - true - ) - } - } - } - }) - return { lng: 'en', fallbackLng: 'en', @@ -67,8 +43,6 @@ export function clientI18nConfig({ return JSON.stringify({ key, value, options }) }, fallbackNS: false, - defaultNS: 'common', - ns: ['common'], saveMissing: false, parseMissingKeyHandler: (key: string) => `[MISSING LOCALE] ${key}`, backend: {