Repository navigation
fix: 修复切换账号后导航语言未同步更新 - #1422
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
切换账号后,新账号语言已生效,但导航仍使用路由初始化时保存的旧语言标题,导致页面中英文混用。将静态及动态路由标题改为翻译键,在菜单渲染时按当前语言解析;覆盖普通导航、设置子菜单和管理员菜单,并保留扩展路由直接提供
meta.title的兼容。新增独立浏览器回归夹具,并更新菜单标题约定和测试运行说明。
Evidence
099e855a上,英语账号退出后登录繁体中文账号,页面标题为“智慧問數”,导航仍为Data Q&A / Dashboard / Data Sources / Assistant App / Settings;“切换账号后普通导航和设置子菜单跟随 zh-TW”用例因导航中找不到“智慧問數”而失败。After:
npm --prefix tests/browser test -- --config=menu-language.config.mjs:11 passed,覆盖五种语言、切回英语、管理员菜单即时切换、普通成员菜单过滤和扩展直接标题兼容。cd frontend && npm run build:通过(vue-tsc + Vite);构建有产物体积提示。about、韩语prompt.default_password的既有键名差异,相关 JSON 未修改。router/index.ts的未使用Layout导入;对基线原文件执行相同检查得到相同错误。a85a15a6;使用 Node.js 24.14.1、本机 Chrome 和既有前端依赖。浏览器测试加载真实菜单、路由、用户 Store 和 i18n,模拟账号 API、缓存与导航守卫;未覆盖 QA 环境完整登录、真实后端鉴权、xpack 集成或镜像部署。Merge Danger
Door: two-way
仅前端标题解析及回归测试变更,可通过回滚提交撤销,无数据迁移。
Blast Radius: navigation
影响普通与管理员菜单及布局页面标题;扩展路由的直接标题有兼容用例,真实 xpack 路由仍需集成验证。