{{command_prefix}}locale
Closes the English-only CLI gap: GDD's README is multilingual, but --help, errors, and skill prompt
headers spoke English until now. This skill inspects or sets the project's locale. Contract:
../../reference/cli-localization.md.
Invocation
| Command | Behavior |
|---|---|
{{command_prefix}}locale | Report the resolved locale, the fallback chain, and per-locale coverage. |
{{command_prefix}}locale <code> | Set .design/config.json#locale to <code> (en/ru/uk/de/fr/zh/ja), after preview. |
Steps
-
Resolve current. Read
.design/config.json#locale(if any) and the environment, then call the resolver to report the active locale + chain:bashnode -e ' const i = require("./scripts/lib/i18n/index.cjs"); let cfg = {}; try { cfg = JSON.parse(require("fs").readFileSync(".design/config.json","utf8")); } catch {} const loc = i.resolveLocale({ env: process.env, configLocale: cfg.locale }); const cov = i.KNOWN_LOCALES.map((l) => `${l}:${(i.loadTable(l)._meta||{}).coverage||"?"}`).join(" "); console.log(JSON.stringify({ resolved: loc, chain: i.fallbackChain(loc), coverage: cov })); ' -
No argument → print the resolved locale, the fallback chain, and the coverage line (which tables are
completevsplaceholder). Stop. -
<code>argument → validate it is inKNOWN_LOCALES(en/ru/uk/de/fr/zh/ja). Unknown → print theerror.invalid_localemessage + the known list, change nothing. -
Preview + set. Show
locale: <old> -> <code>, then writelocaleinto.design/config.json(create the file if absent, preserving any existing keys). Confirm, and note that missing keys in a placeholder locale fall back to English.
Output
End with:
## LOCALE COMPLETE


