feat(spec): translatable page component copy — pages.<name>.components.<id> - #6466
Merged
qq9340100 merged 3 commits intoAug 8, 2026
Merged
Conversation
…s.<id> (#6080) A page's cards, KPI blocks, pickers and forms had no translation key at all, while the near-identically-shaped dashboards.<name>.widgets.<id> has carried title/description all along. Page components have stable ids exactly like a widget does, so the bundle had nowhere to put their copy and .strict() (correctly) refused whatever key a translator invented. Declared and resolved together: translatePage overlays the entry onto the component's properties, so the face is not a declaration waiting for a reader, and the CLI extractor writes the same keys into the skeleton bundle so a translator can discover them. One exported key list (PAGE_COMPONENT_COPY_KEYS) drives schema, resolver and extractor, pinned by a test — two hand-maintained copies would drift into offering a slot nothing reads. The key face is measured against ComponentPropsMap rather than mirrored from the issue's sketch: `help` is NOT declared (no component has it — it would parse clean and translate nothing, ADR-0078) and `subtitle` is NOT declared (page:header is its only declarer and is addressed by page name, so a second route would give one string two spellings). Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G3U9PJm1hEJitS9LtZz8TC
…nslation-pages-components-facet
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
qq9340100
enabled auto-merge
August 7, 2026 23:31
Contributor
📓 Docs Drift CheckThis PR changes 2 package(s): 117 hand-written doc(s) reference the affected code and may need an implementation-accuracy re-verification:
|
…or zh-CN pages.<name>.components made page component copy declared surface, so check-i18n-coverage's frozen ratchet saw app-showcase grow 451 → 462 untranslated strings. Translate the 11 new keys at birth (contact-form fields + submit, page-variables project picker); the pages' own label/title/subtitle predate the ratchet and stay in the frozen baseline. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011M7UwH25Unfi73UHim7ajY
qq9340100
deleted the
claude/issue-6080-translation-pages-components-facet
branch
August 8, 2026 00:32
This was referenced Aug 8, 2026
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 #6080
变更
翻译契约给
pages补组件文案面,对齐dashboards.widgets既有形状:pages.<name>新增可选components?: Record<id, {…}>;纯增量,.strict()不变 —— 既有合法语言包全部照收,既有非法键照旧拒绝。ComponentPropsMap实测圈定(title/description/label/placeholder/emptyText/submitLabel),不照抄 issue 草图;两处刻意不收:help(无组件声明,收了即 ADR-0078 的 parses-clean-changes-nothing)、subtitle(page:header独有且按页名寻址,再开 per-component 臂就是一串两写)。translatePage(system/i18n-resolver.ts)把条目叠加到组件properties,不留「等读者」的空面。已测规则:label落点跟随作者书写位(组件顶层label或properties.label);语言链按键独立回退(zh半翻的条目其余键仍回en);id 寻址在两路都可达时压过页名寻址。i18n-extract同步抽取页面组件文案键位。gen:docs参考文档随动;changeset(minor)。下游实测面(hotcrm
sales_home_page等 8 页 12 串英文卡死)见 issue 与 changeset 正文。交付通道注记
wave-6 工头 dev 会话(
session_01G3U9PJm1hEJitS9LtZz8TC,串行卡 3)无 GitHub 工具,走交付降级通道:dev 实现并 push 分支,PM(session_011M7UwH25Unfi73UHim7ajY)代开本 PR 并跟进 CI 至合并。Generated by Claude Code