Skip to content

feat(i18n): translate Introduction + Quickstart to all 7 locales (T6-2) - #48

Merged
ety001 merged 3 commits into
masterfrom
feat/t6-2-intro-quickstart-i18n
Nov 2, 2026
Merged

ety001 merged 3 commits into
masterfrom
feat/t6-2-intro-quickstart-i18n

Conversation

@ety001

@ety001 ety001 commented Nov 2, 2026

Copy link
Copy Markdown
Member

T6-2 — Introduction + Quickstart i18n (7 locales)

Translates the two handbook pages to zh / ru / fr / de / it / es / ko (14 new pages) and wires them into every locale sidebar.

Quickstart (generator-driven)

  • New data/translations/<lc>/quickstart.yml ×7: every prose fragment of the page (frontmatter title/description, page intro, both section headings, library-table lead + column headers, library note, node-table lead + websocket note + column headers, community-list freshness note, curl-section heading + lead, closing paragraph). A missing fragment is a hard generator error — no silent English fallback.
  • scripts/gen-nodes.mjs gains a --locale <lc> mode that builds docs/<lc>/quickstart/index.md through the same buildPage() template as the en page; the en prose moved into an embedded EN_STRINGS table so en and locales share one template. pnpm gen:nodes now regenerates en + all 7 locales (same loop shape as docs:gen).
  • Single-source rule preserved: library-table rows, node-table rows, the curl example and link targets are byte-identical to the en page in every locale (only column headers translated). EXPECTED_NODE_COUNT / EXPECTED_UPDATED and guards G1–G7 are unchanged and now enforced for every generated page.
  • Regression gate: en docs/quickstart/index.md verified byte-identical after the refactor (diff against a pre-change copy); gen is idempotent (re-run produces identical bytes; re-running all 8 pages leaves the tree clean).

Introduction (handwritten)

  • docs/<lc>/introduction/index.md ×7, full translation including frontmatter titles. All link targets are byte-identical to the en page (verified programmatically); only link text is localized. Internal file pages keep the .html form (services subpages), index pages the directory form — same as en.
  • Terminology follows the frozen docs/.vitepress/<lc>-glossary.json baselines; corpus reference: data/translations/<lc>/purposes.yml. Code identifiers (STEEM, JSON-RPC, steemd, steem-js, steemgosdk, steem-python, condenser_api, appbase…) stay English; translatable glossary terms (e.g. dynamic global properties) are annotated 译法 (English)-style at first occurrence.
  • One conscious content adaptation, flagged for review: the en sentence "The Guides section is English-only for now" would be self-contradictory on the very pages this PR adds, so each locale copy now states that only Introduction and Quickstart are available in that language so far (rest still English). The en page itself is untouched.

Sidebar (config.mts)

Each locale sidebar gains a Guides group — 指南 / Руководства / Guides / Anleitung / Guide / Guías / 가이드 — with translated Introduction + Quickstart entries pointing at /<lc>/introduction/ and /<lc>/quickstart/. Deliberately no Glossary entry here to keep the conflict surface minimal.

Validation

  • pnpm gen:nodes: 8 pages, idempotent; en output byte-identical.
  • NODE_OPTIONS=--max-old-space-size=8192 pnpm build → exit 0 (239 s); all 14 new pages render to HTML.
  • pnpm validate:data → OK, 2 warnings (unchanged baseline).

@ety001
ety001 force-pushed the feat/t6-2-intro-quickstart-i18n branch from 9fcb68f to db07d4f Compare November 2, 2026 16:07
- Introduction: handwritten docs/<lc>/introduction/index.md for
  zh/ru/fr/de/it/es/ko (frontmatter titles translated; link targets
  byte-identical to the en page, only link text localized).
- Quickstart: generator-driven. New data/translations/<lc>/quickstart.yml
  carry every prose fragment (missing fragment = hard gen error, no
  silent English fallback); gen-nodes.mjs gains a --locale mode that
  builds docs/<lc>/quickstart/index.md through the same buildPage()
  template as the en page, whose prose moved into an embedded
  EN_STRINGS table. Node/library table rows, curl example and link
  targets stay single-sourced from the en data (only column headers
  translated); EXPECTED_NODE_COUNT/EXPECTED_UPDATED and guards G1-G7
  unchanged and now enforced per generated page.
- pnpm gen:nodes now regenerates en + all 7 locales (same loop shape as
  docs:gen); en output verified byte-identical after the refactor.
- config.mts: each locale sidebar gains a Guides group (指南 /
  Руководства / Guides / Anleitung / Guide / Guías / 가이드) with the
  translated Introduction + Quickstart entries.
- Terminology follows the frozen <lc>-glossary.json baselines; code
  identifiers (STEEM, JSON-RPC, steemd, steem-js, steemgosdk,
  steem-python) stay English; first occurrences annotated
  '译法 (English)' style per locale conventions.

Validation: gen idempotent (8 pages, en byte-identical), en
introduction/quickstart untouched, 14 locale pages built to HTML,
pnpm validate:data 2 warnings (unchanged), NODE_OPTIONS=--max-old-
space-size=8192 pnpm build exit 0.
@ety001
ety001 merged commit 8385ffe into master Nov 2, 2026
1 check passed
@ety001
ety001 deleted the feat/t6-2-intro-quickstart-i18n branch November 2, 2026 16:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant