mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-07-31 04:12:10 +03:00
Adds scripts/i18n/run-translation.mjs — the new docs translation pipeline. Reads sources from CLAUDE.md, GEMINI.md, AGENTS.md, CONTRIBUTING.md, SECURITY.md, CODE_OF_CONDUCT.md, README.md at the repo root, plus all .md files under docs/<subfolder>/ (recursing one level). Writes targets to docs/i18n/<locale>/<source-path>. Behavior: - SHA-256 hash per source + per target stored in .i18n-state.json - Re-runs only retranslate sources whose hash changed (or whose target file is missing) - Excludes docs/i18n/, docs/screenshots/, docs/superpowers/, docs/diagrams/, docs/reports/ subtrees + I18N.md and README.md filenames - Backend reads OMNIROUTE_TRANSLATION_* env vars (URL, API key, model, timeout, concurrency); never logs the API key - Chunks markdown on top-level ## headings before sending to the LLM - Pre-formats translator output with Prettier so lint-staged commit hooks cannot mutate file content out from under the hash registry Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>