sync-localeslisted
Install: claude install-skill zombico/mojulo
# /sync-locales
Bring `control/messages/<locale>.json` files in line with `control/messages/en.json`
using [control/scripts/locale-sync.mjs](control/scripts/locale-sync.mjs). The model's
only job is translating a flat list of unique strings; all file assembly, dedup,
resume bookkeeping, and validation are deterministic script code.
Why this shape: the previous skill fanned out parallel subagents that each held the
full ~100KB catalog in context and rewrote whole locale files — session limits blew
up sessions mid-write and corrupted locales. Here workers run **strictly one at a
time**, read only a todo slice, append line-by-line to a JSONL, and never touch
`messages/*.json`. A blown worker costs a retry of its remaining strings, nothing more.
## Invocation
`/sync-locales <code> [<code> ...] [--fresh]` — BCP-47 codes (`es`, `fr`, `pt-BR`, …).
No codes → **stop and ask** which locales. `--fresh` (or the user asking to
"regenerate") skips the translation memory and retranslates everything.
## Per-locale flow (strictly sequential across locales)
### 0. Sanity checks (once, before any locale)
- Reject codes not matching `^[a-z]{2,3}(-[A-Z]{2})?$`, and reject `en`.
- Every code must be in `localeNames` in [control/i18n/config.js](control/i18n/config.js).
If missing, ask the user for the autonym, add it, and add the code to `rtlLocales`
if the script is RTL.
- `cd control && node scripts/validate-locale.mjs en en` must print `en.json: ok`.
### 1. Extract
```
cd control &