Commit Graph

3 Commits

Author SHA1 Message Date
8ed857c31c merge: 合并 main 分支的 i18n 重构到 login-page 功能分支
解决冲突:
- i18n.tsx: 采用 main 的独立文件架构(en.ts/zh.ts),新增 OAuth/branding 翻译 key
- Login.tsx: 保留左右分栏布局,合入 main 的验证消息 i18n 化
- Register.tsx: 同上,合入 main 的 placeholder i18n 化

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 13:31:41 +08:00
9b41878ae7 refactor: 优化 i18n 类型安全与渲染性能
- 导出 TranslationKey 类型,翻译 key 拼写错误编译期即报错
- zh.ts 使用 TranslationKey 约束,确保中英文 key 同步
- useMemo 包装 context value,避免不必要的全局重渲染
- ConfirmDialog confirmText 默认值改用 t() 而非硬编码英文
- SchemaProperties 递归组件改为 prop 传递 t,减少 useContext 调用

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-03 13:26:57 +08:00
67295c22d1 feat: 全面支持中英文多语言切换
将翻译文件拆分为独立的 en.ts/zh.ts,为 t() 函数添加插值支持,
国际化 Dashboard 全部页面和组件(登录、注册、项目管理、设置、
MCP 集成等),修复 ThemeToggle 仅中文标签的 bug,
在 Dashboard header 中添加 LanguageToggle 组件。

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-03 13:10:09 +08:00