fix(app-shell): i18n the "Switch Object" breadcrumb dropdown label#2783
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
The object switcher dropdown in the topbar breadcrumb hard-coded the English "Switch Object" label, so it stayed English under a zh UI. Route it through the existing topbar i18n namespace. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
问题
顶栏面包屑里的「对象切换」下拉,其标题标签硬编码为英文
Switch Object,在中文界面下不跟随本地化(见用户截图:zh UI 里仍显示英文 "Switch Object")。修复
packages/app-shell/src/layout/AppHeader.tsx:把硬编码字符串改为t('topbar.switchObject', { defaultValue: 'Switch Object' }),复用同文件既有的useObjectTranslation()与topbar.*命名空间(与紧邻的topbar.switchView写法一致)。packages/i18n/src/locales/en.ts:新增topbar.switchObject: 'Switch Object'。packages/i18n/src/locales/zh.ts:新增topbar.switchObject: '切换对象'。说明
只补 en/zh:其余语言(ar/de/es/fr/ja/ko/pt/ru)本就不带
topbar.switchView等键,靠 en 兜底;en 为as const源,其他语言允许部分覆盖,无"所有语言必须齐全"的类型约束——与既有约定一致。🤖 Generated with Claude Code