主题
20260910-0137-chinese-first-docs Make the documentation Chinese-first
- status: completed
- createdAt: 2026-09-10 01:37
- approvedAt: 2026-09-10 01:40
- relatedTask: 20260910-0137-chinese-first-docs
Context
The corpus is currently English-first: X.md is English, X.md is its Chinese mirror served under / via the rewrites rule, and .vitepress/links.mts exists solely to re-target relative links across that rewrite. Coverage is uneven:
| Group | Count | Words |
|---|---|---|
| English + Chinese mirror | 35 pairs | — |
Chinese only (.md, no English) | 15 | — |
| English only, needs translation | 82 | ~69,800 |
All 82 untranslated files live under bizplan/research/: 27 in vendors/, 39 in air-key-vendors/, 16 reports at the research root. docs/ is excluded by the user's decision.
Proposal
Target shape
bizplan/**/X.mdis Chinese and is the only version.bizplan/BUSINESS-PLAN.mdis Chinese;bizplan/BUSINESS-PLAN.en.mdis the English version, rewritten to/en/business-plan.- No
.mdfile survives.
Step 1 — promote existing Chinese (no translation)
- 34 pairs: delete
X.md,git mv X.md X.md. - BUSINESS-PLAN:
git mv BUSINESS-PLAN.md BUSINESS-PLAN.en.md, thengit mv BUSINESS-PLAN.md BUSINESS-PLAN.md. - 15 Chinese-only files:
git mv X.md X.md.
Step 2 — translate the 82 English-only files, in three batches
- 16 research reports (~43k words) — longest first.
- 27
vendors/files (~14k words). - 39
air-key-vendors/files (~13k words).
Translation rules, fixed before batch 1 starts:
- Company names, product names, model numbers, standards (IEC/ISO/ABYC), interface names (CAN FD, NMEA 2000, LIN) and units stay in their original form.
- Tables keep their structure; numbers, currencies and dates are copied, never recomputed.
- Code blocks, link targets and image paths are untouched.
- Each batch ends with
bun run docs:buildand a diff review before the next starts.
The English original is replaced in place, not kept alongside; history stays in git.
Step 3 — collapse the bilingual machinery
.vitepress/config.mts: droplocales, drop the.md->zh/rewritesrule, drop thesharedSearchIndexplugin (it only existed to merge the two locale search indexes), keep a single Chinese theme configuration, and add a rewrite forBUSINESS-PLAN.en.md->/en/business-plan.- Delete
.vitepress/links.mts. - Strip mirror links (
[zh](...), "Mirror" columns) from index pages and rewrite every remaining.mdreference to.md.
Risks
- Translation is irreversible in the working tree; the English text survives only in git history.
- Terminology drift across 82 files is the main quality risk; the fixed rules above plus a per-batch diff review are the control.
- Numbers and model codes inside long research tables are the highest-value thing to get wrong — they are copied verbatim, never re-derived.
- Volume: ~70k words of translation cannot land in one pass; the batches are the unit of delivery, and the site stays buildable between them.
Scope
- Renamed: 50 files (35 pairs promoted, 15 Chinese-only).
- Rewritten: 82 research files translated into Chinese.
- Modified:
.vitepress/config.mts, index pages carrying mirror links. - Deleted: 34 English originals with mirrors,
.vitepress/links.mts. - Untouched:
docs/**(PMA tracking stays English).
Alternatives
- Keep the English originals as
X.en.mdalongside the Chinese: rejected — the instruction is that only BUSINESS-PLAN keeps an English version. - Translate only the research reports and leave vendor catalogues in English: rejected by the user's answer ("translate everything").
Progress
- 2026-09-10: steps 1 and 3 are done. 35 pairs promoted, 15 Chinese-only files renamed,
BUSINESS-PLAN.en.mdsplit out, 473.zh.mdreferences and 4/zh/links rewritten, and the locale machinery removed (locales,rewrites, the shared search index plugin,links.mts).BUSINESS-PLAN.en.mdis served at/bizplan/BUSINESS-PLAN.enrather than a rewritten/en/business-plan: no rewrite means its relative links keep resolving without a link-rewriting plugin, which is exactly what was just deleted. - 2026-09-10: step 2 is done. 79 files were translated, not 82:
01-market-size,02-competitorsand03-certification-tech-trendswere already Chinese despite lacking a.zhsuffix. Batches: 13 research reports, 27 PDM vendor catalogues, 39 Air/Key vendor catalogues. Company names, model numbers, standards, interface names, units, prices, table structure and link targets were carried over verbatim.bizplan/now contains no English document exceptBUSINESS-PLAN.en.md.