feat(i18n): initialize internationalization and update Vite config for locale handling

- Added `initI18n` function call in `main.tsx` to bootstrap internationalization before rendering the app.
- Updated Vite configuration to handle specific locale files for English and Chinese.
This commit is contained in:
shuaiplus
2026-04-29 02:49:45 +08:00
parent 3c5f43ecc2
commit 29a846c562
12 changed files with 2138 additions and 1828 deletions
+12
View File
@@ -28,6 +28,18 @@ export default defineConfig({
const normalized = id.replace(/\\/g, '/');
if (normalized.includes('/src/lib/i18n/locales/en.ts')) {
return 'i18n-en';
}
if (normalized.includes('/src/lib/i18n/locales/zh-CN.ts')) {
return 'i18n-zh-CN';
}
if (normalized.includes('/src/lib/i18n.ts')) {
return 'i18n-core';
}
if (
normalized.includes('/src/components/AuthViews.tsx') ||
normalized.includes('/src/components/PublicSendPage.tsx') ||