feat(i18n): key translation pairing records by heading section (#5036)

* feat(i18n): key translation pairing records by heading section

Replace the whole-file blob hashes in *.i18n.yaml with one entry per
heading section that still holds language-specific content, keyed by the
English heading-slug path. Blocks identical across the pair (generated
table rows, code blocks, shared regions) stay out of the hash, so edits to
different sections and identical regenerations merge with Git's default
text merge, including on GitHub.

Remove the dsh-translation-pairing merge driver, its resolver command and
installer wiring; gen-translation-brief recovers last-confirmed text from
commit history. Migrate all active records, archive the superseded Agent
Note, and record the replayed conflict reduction in the new one.

* test(i18n): refresh translation prompt snapshot for the terminology note

* feat(i18n): exclude only code blocks and generated regions from pairing records

Replace byte-equality masking with an explicit rule: a record hash skips
fenced code blocks and BEGIN/END GENERATED regions, the two kinds of
content the pairing gate already requires to be identical on both sides.

Move generated data into regions written into both pages:
gen-config-catalog renders both languages and the record with per-package
regions labelled by code identifiers; gen-module-graph keeps its table in a
region; gen-doc-graphs splices the event matrix regions into the Chinese
page. Add a generic region splice beside the region grammar.
This commit is contained in:
Turtle authored and GitHub committed 2026-09-23 22:32:06 +08:00
1 parent d9ff18ec2a
commit e7def469e1
1154 files changed
+48932 -8951

No files matched your search

+27 -5
View File
@@ -1,6 +1,28 @@
# Bilingual-pair consistency record (docs/i18n/README.md): the git blob hash of each
# side as of the last confirmed-consistent state. Both languages carry equal authority;
# after editing either side, bring the other along and re-record with:
# Bilingual-pair consistency record for config.md (docs/i18n/README.md): per heading
# section, a hash of its English and Chinese blocks outside code blocks and generated regions.
# After editing either side, bring the other along and re-record with:
# pnpm run verify-translation-pairing --write docs/user/develop/basic/config.md
config.md: d935fc3f3b5b42c5b3fbd8d3b0d398a2608aead3
config.zh.md: 642a413950e2d8deb8591bc688968607604c050d
/plugin-configuration:
en: f605e6e8021b82ba
zh: 3f33c4b0afb3f249
/plugin-configuration/define-the-config-type:
en: a351a086d890f148
zh: 385803dd9d671391
/plugin-configuration/schema-validation:
en: 6a20f3351a1c3e47
zh: b5ae56917fcbca2c
/plugin-configuration/design-principles:
en: 79717ddc9d714ad9
zh: 67240f8382bbe783
/plugin-configuration/design-principles/do-not-hardcode-tunable-values:
en: da67063750a52b55
zh: bd2c5978e10b6f79
/plugin-configuration/design-principles/fail-loudly-on-invalid-configuration:
en: 98a4ff7d959783bd
zh: cb1410360b03b7a7
/plugin-configuration/work-with-hmr:
en: 939f750af6fefbd5
zh: 94fbb3a0d761f098
/plugin-configuration/next-steps:
en: 1151bb8b59577519
zh: 47a95340df47d273
+36 -5
View File
@@ -1,6 +1,37 @@
# Bilingual-pair consistency record (docs/i18n/README.md): the git blob hash of each
# side as of the last confirmed-consistent state. Both languages carry equal authority;
# after editing either side, bring the other along and re-record with:
# Bilingual-pair consistency record for index.md (docs/i18n/README.md): per heading
# section, a hash of its English and Chinese blocks outside code blocks and generated regions.
# After editing either side, bring the other along and re-record with:
# pnpm run verify-translation-pairing --write docs/user/develop/basic/index.md
index.md: 08199624e638aaf4a36b04446c39c228b2af6025
index.zh.md: 2ea894079ffb3c5b8c4563fd535fe6e654861b1b
/your-first-plugin:
en: 66684c875e13acbb
zh: 48b5444386cf714c
/your-first-plugin/create-a-local-project:
en: 2a9ff85da3a6ea8b
zh: 9ac5daf1dd3e3b95
/your-first-plugin/what-is-a-plugin:
en: 0bca3ea987fecb61
zh: b4d398b887da6648
/your-first-plugin/create-the-plugin-file:
en: 80e4e9f139d4773e
zh: c045d63ec04a2f3d
/your-first-plugin/register-it-in-cordis-yml:
en: 216e79287d237f2a
zh: 16e5e8ad2b1b9263
/your-first-plugin/automatic-cleanup:
en: 0a1486714b9d67d7
zh: 544df97baa7a8c59
/your-first-plugin/declare-dependencies:
en: da59e4c09e258f94
zh: 1b3ef70741eccb31
/your-first-plugin/three-plugin-forms:
en: 155369321743b317
zh: e2e98be100be297b
/your-first-plugin/three-plugin-forms/object-form:
en: d674c416f5b0fd14
zh: a2224f5fe6ceae73
/your-first-plugin/three-plugin-forms/class-form:
en: 130f504f9ebacebd
zh: 4e91d3fa2555390d
/your-first-plugin/next-steps:
en: 9836e246d8279c8b
zh: 681475e2251ba006
+30 -5
View File
@@ -1,6 +1,31 @@
# Bilingual-pair consistency record (docs/i18n/README.md): the git blob hash of each
# side as of the last confirmed-consistent state. Both languages carry equal authority;
# after editing either side, bring the other along and re-record with:
# Bilingual-pair consistency record for publish.md (docs/i18n/README.md): per heading
# section, a hash of its English and Chinese blocks outside code blocks and generated regions.
# After editing either side, bring the other along and re-record with:
# pnpm run verify-translation-pairing --write docs/user/develop/basic/publish.md
publish.md: b317943954972e63d0e4b741fb16d2fc19091f58
publish.zh.md: b7864f7e7596681f48fc87590772841294d2a039
/package-and-install-a-plugin:
en: 0958da34d1ea9b49
zh: 66a024ba2f2faba2
/package-and-install-a-plugin/two-concepts-two-manifests:
en: 341c334cee646f58
zh: 1ac8f40609a71123
/package-and-install-a-plugin/two-concepts-two-manifests/the-bundle-manifest:
en: 1c59ba70e2d643ea
zh: 403667f567bcc77c
/package-and-install-a-plugin/two-concepts-two-manifests/the-profile-manifest:
en: e2bd00d8de99da67
zh: e70b17787bdb53a5
/package-and-install-a-plugin/install-into-a-profile:
en: 78baf6471bd6e82b
zh: 0453a7d35fd57399
/package-and-install-a-plugin/the-loading-order:
en: 41ea3455ac8c7635
zh: 7fabf467485898a5
/package-and-install-a-plugin/give-a-surface-bundle-its-own-command-line:
en: cda660c66cef28a6
zh: 0dcad683c4521f50
/package-and-install-a-plugin/installing-from-github-the-build-script-catch:
en: 974a37cd652bdfc0
zh: db9dd766c8ad7182
/package-and-install-a-plugin/next-steps:
en: 1914c4c5eeb1d913
zh: 6f20168ebc196239
+15 -5
View File
@@ -1,6 +1,16 @@
# Bilingual-pair consistency record (docs/i18n/README.md): the git blob hash of each
# side as of the last confirmed-consistent state. Both languages carry equal authority;
# after editing either side, bring the other along and re-record with:
# Bilingual-pair consistency record for tool.md (docs/i18n/README.md): per heading
# section, a hash of its English and Chinese blocks outside code blocks and generated regions.
# After editing either side, bring the other along and re-record with:
# pnpm run verify-translation-pairing --write docs/user/develop/basic/tool.md
tool.md: aeed5cf0e742cdde33bdcb86bfac4de471ae2597
tool.zh.md: 25538e42b7777fe3b05b361379a8bce70d6ec5f5
/build-a-tool:
en: 7cc993f14da8bb11
zh: 32cc4de7310ace97
/build-a-tool/create-the-tool-plugin:
en: ee66fee86af58d93
zh: ee7d157e69d01ae4
/build-a-tool/run-and-call-the-tool:
en: 3bdae6640d729bfc
zh: d1e945ac53cbb467
/build-a-tool/next-steps:
en: aba2c55a0ba557f9
zh: d4615e9e57c540bd