56 lines
2.6 KiB
Markdown
56 lines
2.6 KiB
Markdown
# Changelog
|
||
|
||
All notable changes to this project will be documented in this file.
|
||
|
||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||
|
||
## [v1.1.0] - 2026-01-26
|
||
|
||
### Added
|
||
- 实现布局(Layout)国际化,包括:
|
||
- 侧边栏菜单标题翻译
|
||
- 顶部导航国际化(语言选择、退出登录、全屏、布局大小、主题、设置等)
|
||
- 标签页国际化(动态更新标签页标题)
|
||
- 实现认证模块(Auth)国际化,包括:
|
||
- 登录页国际化(表单验证规则、错误提示、按钮文本等)
|
||
- 注册页国际化(表单验证规则、成功提示、变量插值等)
|
||
- 实现全局公共文本国际化,包括:
|
||
- HTTP 错误处理国际化(401、403、404 等错误码)
|
||
- 错误码字典国际化(将错误码 Value 改为 Translation Key)
|
||
- 新增单元测试,包括:
|
||
- 中文翻译测试(zh-CN.test.ts)
|
||
- 英文翻译测试(en-US.test.ts)
|
||
|
||
### Changed
|
||
- `src/locales/zh-CN.ts` - 扩展中文翻译资源,添加 common、layout、login、register、error 等模块
|
||
- `src/locales/en-US.ts` - 扩展英文翻译资源,添加 common、layout、login、register、error 等模块
|
||
- `src/layout/components/Sidebar/SidebarItem.vue` - 添加侧边栏菜单标题翻译功能
|
||
- `src/layout/components/Navbar/index.vue` - 添加顶部导航国际化支持
|
||
- `src/layout/components/TagsView/index.vue` - 添加标签页动态更新功能
|
||
- `src/views/auth/login.vue` - 添加登录页国际化支持
|
||
- `src/views/auth/register.vue` - 添加注册页国际化支持
|
||
- `src/utils/request.ts` - 添加 HTTP 错误处理国际化支持
|
||
- `src/utils/errorCode.ts` - 将错误码 Value 改为 Translation Key
|
||
|
||
## [v1.0.0] - 2026-01-26
|
||
|
||
### Added
|
||
- 实现前端国际化基础架构,包括:
|
||
- 引入 vue-i18n@9 核心库,支持 Vue 3 Composition API
|
||
- 建立标准化的资源目录结构(src/locales/)
|
||
- 创建中文和英文翻译文件(zh-CN.ts、en-US.ts)
|
||
- 封装通用的语言切换组件(LangSelect)
|
||
- 配置网络拦截器自动注入 Accept-Language 请求头
|
||
- 集成 Element Plus 的国际化支持(ElConfigProvider)
|
||
|
||
### Changed
|
||
- `src/store/modules/app.ts` - 新增 language 状态字段和 setLanguage action
|
||
- `src/layout/components/Navbar/index.vue` - 集成 LangSelect 组件到导航栏
|
||
- `src/utils/request.ts` - 在请求拦截器中注入 Accept-Language 请求头
|
||
- `src/App.vue` - 集成 ElConfigProvider 组件,支持 Element Plus 国际化
|
||
- `src/main.ts` - 注册 i18n 插件
|
||
|
||
### Dependencies
|
||
- 新增 vue-i18n@9
|