Skip to content

feat: add i18n developer experience tooling#384

Merged
ppeeou merged 9 commits into
marpple:mainfrom
hg-pyun:feat/i18n-dx-tooling
Mar 27, 2026
Merged

feat: add i18n developer experience tooling#384
ppeeou merged 9 commits into
marpple:mainfrom
hg-pyun:feat/i18n-dx-tooling

Conversation

@hg-pyun
Copy link
Copy Markdown
Collaborator

@hg-pyun hg-pyun commented Mar 25, 2026

Summary

Add a complete i18n synchronization system that automatically detects missing/outdated translations across all supported locales (ja, ko, zh), generates English-content stubs, and creates GitHub Issues for community contributors — eliminating the risk of silently shipping incomplete translations when new APIs are added.

Architecture Overview

make i18n-sync          → Generates stubs, removes orphans, tracks status
make i18n-check         → CI dry-run validation (exits 1 on missing files)
CI (i18n-check.yml)     → Blocks PRs missing translation stubs + posts bot comment
CI (i18n-issues.yml)    → Auto-creates per-language GitHub Issues on merge
VitePress Banner        → Shows warning on untranslated pages with contribute link

Banner

SCR-20260325-uaye

Translation Status Tracking

3-stage status:  missing → stub → translated
                              ↗ outdated (source hash changed)

Stub file format:
  ---
  id: throttle
  translated: false
  sourceHash: "3dee719216b52c51"
  ---
  (English content copied as-is)

How It Works for Contributors

  1. Add new APImake all generates English docs
  2. Run make i18n-sync → stubs auto-generated for all locales
  3. Open PR → CI checks pass (stubs exist), bot stays silent
  4. Merge → GitHub Issues auto-created per language for community translators
  5. Translator picks up issue → edits stub, sets translated: true, submits PR

@hg-pyun hg-pyun self-assigned this Mar 25, 2026
hg-pyun added 4 commits March 25, 2026 23:24
Add TypeScript-based i18n scripts under website/i18n/ that detect
missing, stub, and outdated translations by comparing English source
docs against locale directories (ja, ko, zh).

- `make i18n-sync`: generates stubs, removes orphans, updates status
- `make i18n-check`: CI-friendly dry-run that exits 1 on missing files
Run translation check on every pull request. When missing translation
files are detected, the workflow posts a bot comment with a table of
missing files and instructions to run `make i18n-sync`.
When a PR is merged, scan translation-status.json for stub/outdated
entries and create per-language GitHub Issues with rich templates,
labels (translation, good first issue, lang:xx), and contribution
guide links.
Show a warning banner at the top of doc pages when `translated: false`
is set in frontmatter. The banner displays a localized message and a
link to contribute translations.
@hg-pyun hg-pyun requested a review from ppeeou March 25, 2026 14:24
hg-pyun added 3 commits March 25, 2026 23:24
Run `make i18n-sync` to generate stub files for the missing
throttle.md in ja/ko/zh locales, and create the initial
translation-status.json tracking all 128 doc files across 3 languages.
Remove orphan toSorted.md files and update translation-status.json
to reflect upstream translations for throttle.md.
@hg-pyun hg-pyun force-pushed the feat/i18n-dx-tooling branch from 796359c to 29650db Compare March 25, 2026 14:26
hg-pyun added 2 commits March 25, 2026 23:29
The root prettier config uses @ianvs/prettier-plugin-sort-imports
which requires @vue/compiler-sfc for .vue files. Since this dependency
only exists in the website workspace, exclude .vitepress directory
from the root prettier check to fix CI.
Copy link
Copy Markdown
Member

@ppeeou ppeeou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good!

@ppeeou ppeeou merged commit 6519b2b into marpple:main Mar 27, 2026
2 checks passed
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.

2 participants