fix(i18n): 八包补上 console.objectView 两个 key 的真译,systemViewReadonly 按 en 当前的 read-only 语义 (#3582) - #3627
Merged
Merged
Conversation
… 当前的 read-only 语义 (#3582) `console.objectView.systemViewReadonly` / `expandToPage` 在 ja/ko/de/fr/es/pt/ ru/ar 八个包里存的是英文;`systemViewReadonly` 存的还是 en 自己已经废弃的旧话 (`- duplicate to customize.`),把八种语言的用户指向一条产品已不提供的操作路径。 八包按 en 当前语义重译,en / zh 一字节不动,不增删任何 key。 译文取自各包自己的既有措辞而非自创:`view.readonlyTooltip` 供「系统视图」、 `console.objectView.cannotEditMetaView`(#3583 落的)供「由代码定义」; `expandToPage` 对齐同包 `detail.openAsFullPage` —— 那是隔壁命名空间里 一模一样的英文句子,十包早已译好,en/zh 两个 key 本就逐字节相同。 新增 objectView-value-language-3582.test.ts:钉住 en 字面量(下次改 en 文案 即红,逼九个译文包同批跟改)、断言除 en 外无包等于新旧任一句英文、要求 zh/ja/ko/ru/ar 的值含本文字系统字符。all-locales-key-parity 修前修后都绿 —— 它比的是键集合与占位符形状,这正是它看不见本缺陷的原因。 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GTRjn8xBqp75dk7kFupVRt
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
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.
Fixes #3582
console.objectView.systemViewReadonly/expandToPage在 ja/ko/de/fr/es/pt/ru/ar 八个包里存的是英文。systemViewReadonly还多一层:八包存的不是en的当前文案,而是en自己已经废弃的旧话 —— 把八种语言的用户指向「复制一份来自定义」这条产品已不提供的操作路径。en/zh一字节未动,不增删任何 key(diff 是 8 个文件各 2 行、+2/-2 严格对称)。译文对照表
console.objectView.systemViewReadonly按
en当前的 read-only 语义译,⛔ 未照抄包里那句过期英文。System view defined in code — read-only.系统视图由代码定义,只读。System view defined in code - duplicate to customize.システムビューはコードで定義されており、読み取り専用です。시스템 보기는 코드에 정의되어 있어 읽기 전용입니다.Systemansicht — im Code definiert, schreibgeschützt.Vue système définie dans le code — en lecture seule.Vista del sistema definida en el código: solo lectura.Exibição do sistema definida no código — somente leitura.Системное представление определено в коде — только для чтения.عرض النظام معرَّف في الكود — للقراءة فقط.console.objectView.expandToPageOpen as full page以完整页面打开Open as full pageフルページで開くOpen as full page전체 페이지로 열기Open as full pageAls ganze Seite öffnenOpen as full pageOuvrir en pleine pageOpen as full pageAbrir como página completaOpen as full pageAbrir como página inteiraOpen as full pageОткрыть на всю страницуOpen as full pageفتح كصفحة كاملة译文来源:各包自己的既有措辞,没有一句是自创的
先读邻域再动笔,每个词都能指回同包已有的 key:
view.readonlyTooltip的前半句console.objectView.cannotEditMetaView(#3583 刚落的邻键)view.readOnly/view.readonlyAriaLabelexpandToPage整句detail.openAsFullPagedetail.openAsFullPage这条值得单说:它是隔壁命名空间里一模一样的英文句子(Open as full page),十个包早就译好了,而en和zh的这两个 key 本来就逐字节相同。所以八包对齐它不是偷懒,而是照抄仓库自己已经立好的惯例;测试里也把这条钉住了,免得同一个动作在一个语言里出现两种说法。旁证:
packages/components/.../navigation-overlay-chrome-i18n.test.tsx:117早就独立断言了 ja 的这句是フルページで開く。标点与正式度也随邻域,不自创:es 用
:(同命名空间的cannotEditMetaView/filterOrNotSavable都用冒号,不是破折号),其余包用—;es 的祈使语气邻域现状是 usted(Verifique/Use/Introduzca),本句是陈述句,不涉及。反照抄验证输出
离线复现脚本(issue 正文那段的扩展版,十包 + 两个 key + 三条判据)。
修前:
修后 —— 三类标记全部清空,两个 key 都是 10/10 互不相同:
判据三条,均已写进
objectView-value-language-3582.test.ts:除en外无包等于新旧任一句英文;zh/ja/ko/ru/ar 的值必须含本文字系统字符;十包两两互不相同。反向验证(先预测,后运行)
预测:回退 8 个包的值后 —— 新测试红 9 条(2 条等值 + 1 条 duplicate 语义 + 4 条文字系统(zh 应保持绿,它本来就没坏)+ 1 条互异 + 1 条
detail.openAsFullPage对齐),en钉子与非空断言保持绿;all-locales-key-parity保持绿。实测完全吻合:
all-locales-key-parity修前修后都绿是本 PR 的预期结论,不是缺陷 —— 它比的是键集合与占位符形状,而本缺陷不动键集合、两个 key 也都不带占位符。这正是它看不见这一类缺陷的原因,不该试图让它变红。测试
顺带发现,未在本 PR 修改(越界)
#3625 ——
view.readonlyTooltip在同样八个包里携带同一句已废弃语义(duplicate to customize),但它是地道译文而非英文原文。因此本 PR 的等值判据看不见它,issue #3582「建议 2」设想的那道非拉丁包 ASCII 抽查门禁也看不见它(ja 是日文、ru 是俄文、ar 是阿拉伯文,全绿)。这一点建议在裁定要不要做那道门禁时一并考虑 —— 真正缺的不变量可能是「en改文案时九个译文包必须同批跟改」。本 PR 的新测试特意把duplicate to customize的扫描面限定在这两个 key,以免误红 #3625。按派发口径,issue #3582 的「建议 2」(非拉丁包 ASCII 抽查门禁)本单不做,另行分诊。
范围
@object-ui/i18n)en.ts/zh.ts、scripts/i18n-call-site-key-baseline.json(这两个 key 从不在棘轮里)、任何组件代码🤖 Generated with Claude Code
https://claude.ai/code/session_01GTRjn8xBqp75dk7kFupVRt
Generated by Claude Code