Files
aiops/frontend/src/main.tsx
T
attacker 2e179ef7f4 feat(i18n): U3 国际化 — react-i18next 双语框架 + 侧边栏/Header/Login 全量翻译 + 语言切换器
- 安装 i18next + react-i18next,创建 src/i18n/ 配置实例
- 创建 zh-CN.json (120+ 键) + en-US.json 全量英文翻译
- 侧边栏 42+ 菜单项全量 labelKey 国际化
- Header 通知/主题/用户菜单全量翻译
- Login 页面表单/按钮/主题+语言切换器
- zustand useLanguageStore 持久化语言选择
- HTML lang 属性自动同步
- tsc -b=0, npm build=✅, 17/17 测试通过
2026-06-27 16:54:07 +08:00

13 lines
313 B
TypeScript

import { StrictMode } from 'react'
import { createRoot } from 'react-dom/client'
import './index.css'
// U3: i18n — 必须在 App 之前导入以初始化翻译实例
import './i18n'
import App from './App.tsx'
createRoot(document.getElementById('root')!).render(
<StrictMode>
<App />
</StrictMode>,
)