kaeris_add_language
Bootstrap a missing locale by translating the entire source file into the target language and writing the new file, adding full translation support for languages with no locale yet.
Instructions
Bootstrap a BRAND-NEW target locale by translating the entire source file into it and writing the result. Use this when kaeris_scan_repo/kaeris_status show a language with no locale file at all yet (in "missing_files").
This CALLS THE TRANSLATION API (same as kaeris_translate_file) — unlike kaeris_scan_repo/kaeris_status/kaeris_list_missing_keys, which are local-only and free. For an EXISTING locale that's just missing a few keys, prefer kaeris_translate_file(..., only_new=True) so you don't re-translate the whole file.
Args: source: path to the base-language locale file, e.g. "locales/en.json". lang: the new target language code to create, e.g. "de". out: output directory (default: source file's own directory). tone: "formal" or "casual" to steer register; "" (default) is neutral. icu: True if the source uses ICU MessageFormat (plurals/select), so the model preserves the syntax instead of translating it. keep: optional list of terms to NEVER translate (brand/product names). context: one line about what the app IS, e.g. "a mobile bank for teenagers" or "a wildlife documentary app". The model uses it to pick the right sense of ambiguous strings — "Bank" becomes Ufer in the second and Bank in the first. You are reading the repo, so you know this: pass it. Max 300 chars. api_key / openrouter_key: optional auth overrides (else free tier or env vars).
Returns: { "written": ["/.json"], "lang": "de", "languages": ["de"] }
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| icu | No | ||
| out | No | ||
| keep | No | ||
| lang | Yes | ||
| tone | No | ||
| source | Yes | ||
| api_key | No | ||
| context | No | ||
| openrouter_key | No |