Uh oh!
There was an error while loading. Please reload this page.
fix(i18n): 八包按 en 当前的 read-only 语义重译 view.readonlyTooltip (#3625) - #3642
Merged
Conversation
…'s current read-only meaning (#3625) The eight packs (ja/ko/de/fr/es/pt/ru/ar) described the retired "duplicate to customize" workflow. Unlike #3582 one namespace over, these values were idiomatic translations, so no equality-with-en or ASCII heuristic could see them: only their meaning was wrong. en and zh unchanged byte for byte; no key added or removed. New test asserts semantics in both directions (no duplicate/copy stem in each pack's own language, plus all three positive anchors) and pins the en literal so the next rewording fails loudly. 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
|
yinlianghui
marked this pull request as ready for review
August 7, 2026 17:02
This was referenced Aug 7, 2026
Closed
Uh oh!
There was an error while loading. Please reload this page.
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 freeto 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#3625
view.readonlyTooltip(视图页签只读锁的 tooltip,消费点唯一:packages/plugin-view/src/ViewTabBar.tsx:489)在 ja/ko/de/fr/es/pt/ru/ar 八个包里描述的是产品已不提供的「复制一份来自定义」路径。按en当前的 read-only 语义整句重译八包。en/zh一字节未动,不增删任何 key(八个包各 1 行,+8/-8 严格对称),未碰ViewTabBar.tsx、棘轮基线,未改动#3627 落地测试的任何既有断言。前置测量:en/zh 现状(硬约束 1)
动笔前先证伪 issue 的前提。
en与zh都已经是 read-only 口径,因此本单只动八包:System view — defined in code, read-only.系统视图 — 由代码定义,只读。为什么 #3627 的判据看不见这一条(这才是本单的重点)
#3582 是同一句废弃语义在隔壁命名空间,八包存的是英文原文,所以两条便宜判据都能抓:值等于
en、非拉丁包里出现纯 ASCII。这个 key 两条都抓不到 —— 八个值是地道译文(ja 是日文、ru 是西里尔、ar 是阿拉伯文),只是译了一句en自己已经废弃的话。形态全对,语义全错。实测:修前八包 10/10 互不相同、五个非拉丁包全部通过本文字系统判据、键集合完整。也就是说
all-locales-key-parity、调用点 key 守卫及其棘轮、#3582「建议 2」设想的那道 ASCII 门禁,修前修后全绿。因此本单的断言按语义而非等值/形态设计,且两个方向同时钉。
八包新旧对照表
システムビュー — 複製してカスタマイズしてください。システムビュー — コードで定義され、読み取り専用です。시스템 보기 — 사용자 지정하려면 복제하세요.시스템 보기 — 코드에 정의되어 있으며 읽기 전용입니다.Systemansicht — zum Anpassen duplizieren.Systemansicht — im Code definiert, schreibgeschützt.Vue système — dupliquer pour personnaliser.Vue système — définie dans le code, en lecture seule.Vista del sistema — duplique para personalizar.Vista del sistema — definida en el código, solo lectura.Exibição do sistema — duplique para personalizar.Exibição do sistema — definida no código, somente leitura.Системное представление — скопируйте для настройки.Системное представление — определено в коде, только для чтения.عرض النظام — انسخ للتخصيص.عرض النظام — معرَّف في الكود، للقراءة فقط.译文溯源:每个词都指回同包既有 key,没有一句自创
照抄 #3627 的邻键溯源纪律。
en的句子是三段式(System view+defined in code+read-only),逐段取词:console.objectView.systemViewReadonly(#3627 刚落)console.objectView.systemViewReadonly/console.objectView.cannotEditMetaView(#3583 落的)view.readOnly/view.readonlyAriaLabel(与本 key 同命名空间、同一屏)标点与正式度随各包邻域,不自创:
—(含 en/zh),沿用。es 这里用—而非:—— fix(i18n): 八包补上 console.objectView 两个 key 的真译,systemViewReadonly 按 en 当前的 read-only 语义 (#3582) #3627 的冒号选择是console.objectView命名空间局部的(该命名空间cannotEditMetaView/filterOrNotSavable用冒号);而在view命名空间里,es 的同类 tooltipview.subscribedTooltip(Suscrito — clic para cancelar suscripción)和本 key 自己修前的值都用破折号。、,zh 用,,ar 用،(该包 60 处在用),其余 ASCII,。systemViewReadonly保持同一选择:frVue阴性 →définie;ptExibição阴性 →definida;esVista阴性 →definida;ruпредставление中性 →определено;arعرض阳性 →معرَّف。de 的两处落到同一句,是有意接受的,不是疏漏
en区分这两个 key 靠的只是破折号落点(System view — defined in code, read-only.对System view defined in code — read-only.),这个区分多数语言承载不了。#3627 为 de 的systemViewReadonly选的正是本 key 的破折号结构,于是德文两处重合。不为造差异而改写译文 —— #3627 自己把console.objectView.expandToPage与detail.openAsFullPage在十个包里逐字节对齐,已经立下「同义即可同文」的先例。测试把「只有 de 重合」这个事实钉住,将来哪个包重合状况变了会浮出来给人看。测试:与 #3627 的分工(硬约束 4)
新开文件
packages/i18n/src/__tests__/viewReadonlyTooltip-semantics-3625.test.ts,不改objectView-value-language-3582.test.ts一行。理由三条:objectViewOf/readonlyOf/EN_CURRENT)整体锚定在console.objectView一个命名空间上,塞进第二个命名空间会让它自己的作用域声明失真;duplicate to customize扫描面特意限定在那两个 key,并在注释里点名 view.readonlyTooltip 在 8 个语言包里译的是「duplicate to customize」这句已废弃语义 —— 因为它是真译文,任何「值是英文」判据都看不见它 #3625 是另一单 —— 分文件放,这句注释保持为真;扫描面同样必须窄(与 #3627 同理,但踩点不同)
废弃语义扫描只限本 key。同命名空间的
view.duplicateView(es 是Duplicar vista)是合法的「复制视图」动作,含duplic词干 —— 包级词干扫描会误红它。这条不变量天生是 per-key 的,推不成仓级门禁。禁用词干表按包内实际旧值测量修正
派发口径给的表里 es/pt 是
duplic,实测旧值是duplique,duplic并不是它的子串(dupliqu才是),照抄会漏。实际落地的词干:複製/コピーシステムビュー+コード+読み取り専用복제/복사시스템 보기+코드+읽기 전용duplizier/kopierSystemansicht+Code+schreibgeschütztdupliqu/duplic/copiVue système+code+lecture seuledupliqu/duplic/copiVista del sistema+código+solo lecturadupliqu/duplic/copiExibição do sistema+código+somente leituraкопир/скопирСистемное представление+код+чтениنسخ/انسخعرض النظام+كود+قراءة正向锚点是防空绿的那一半:只有负向断言的话,把值删空也能全绿。
另外钉了
en字面量 ——en下次改文案时,在改文案的那个 PR 里就红,而不是再放九个包漂一个版本。这才是这一族缺陷真正缺的那道不变量。逆向验证(先预测,后运行)
预测:回退八包值 →
no pack names the retired…1 条(八包全命中词干)+ 正向锚点 8 条(ja/ko/de/fr/es/pt/ru/ar,en/zh 保持绿);de is the only pack…—— 回退让 de 不再与systemViewReadonly重合,断言是从['de']掉成[],与上面九条的红法相反;en钉子、英文字面量断言、非空断言 —— 因为八个废弃值本来就是互异的地道译文;objectView-value-language-3582.test.ts全绿、all-locales-key-parity全绿。合计预测 10 红。实测完全吻合:
两个 passed 文件正是
objectView-value-language-3582.test.ts与all-locales-key-parity.test.ts。all-locales-key-parity修前修后都绿是本 PR 的预期结论,不是缺陷 —— 它比的是键集合与占位符形状,本缺陷不动键集合、本 key 不带占位符。互异与文字系统判据同样不翻转,原因已在上面写明;它们保留是为了防「把一种语言粘进另一种」,不是本单的证据。这一点如实写出来,而不是把它们包装成红。测试
消费半径清扫:全仓 grep
readonlyTooltip与八句废弃文案字面量,除本 PR 改的八个包外,只有ViewTabBar.tsx:489(唯一消费点,本 PR 不碰)与 #3627 测试里指向本单的那句注释、其 changeset 里的一处引用 —— 没有任何 fixture 或组件测试断言这八个旧值,故无需改动包外测试。范围
@object-ui/i18n,用户可见:八语言视图页签 tooltip 语义修正)en.ts/zh.ts、packages/plugin-view/src/ViewTabBar.tsx、objectView-value-language-3582.test.ts、棘轮基线、任何组件代码🤖 Generated with Claude Code
https://claude.ai/code/session_01GTRjn8xBqp75dk7kFupVRt
Generated by Claude Code