KAERIS i18n

v0.2.18
io.github.kaeris-io/kaeris-mcp Checked 9 hours ago Published 1 month ago

Translate app language files into 46 languages and check placeholders, plurals and missing keys.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

kaeris_list_languages

List every target language KAERIS can translate into. Returns a mapping of language code → English name (e.g. {"es": "Spanish", ...}). Use the codes with kaeris_translate / kaeris_translate_file.

kaeris_scan_repo

Discover a repo's i18n setup: which locale files exist, what the base (source) language and target languages are, and which framework/convention is in use. Purely local — reads the filesystem, makes no API call. Use this FIRST when asked to "look at/audit/fix this repo's i18n" and you don't already know the source file — it tells you where to point kaeris_status / kaeris_list_missing_keys / kaeris_add_language. Supports i18next/react-i18next (locales/<lang>/*.json), next-intl (messages/<lang>.json), vue-i18n (src/locales/<lang>.json), Flutter ARB (lib/l10n…

ParameterTypeDescription
pathstring

kaeris_status

Completeness/health check for every target locale against a source file — the "i18n firewall". Works for EVERY supported format: JSON is checked fully offline; other formats (.arb/.strings/.po/.xml/.ftl/…) are parsed by the backend /api/parse endpoint (no translation, no cost). For each target language reports missing keys, extra/stale keys, placeholder mismatches (e.g. "Hello {name}" -> "Bonjour" loses {name}, or "{name}" -> "{nom}" which crashes str.format()/ICU at runtime), and the same quality detectors the CLI firewall gates a merge on: number drift ("…

ParameterTypeDescription
source *string
langsarray
outstring

kaeris_list_missing_keys

The exact keys missing or placeholder-broken in ONE target locale, with their source-language text, so an agent knows exactly what to translate/fix. Every supported format works (JSON offline; others via the backend /api/parse, no cost) — use kaeris_add_language or kaeris_translate to actually fill them in. The answer is PAGED: "missing_count" is always the exact total, while "missing" / "missing_values" carry one page of it (default 200 entries, and never more than about 15k tokens' worth). A whole locale file returned in one tool result is not a long answer, it…

ParameterTypeDescription
lang *string
source *string
limitinteger
offsetinteger
outstring

kaeris_add_language

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-lan…

ParameterTypeDescription
lang *string
source *string
api_keystring
contextstring
icuboolean
job_idstring
keeparray
openrouter_keystring
outstring
tonestring

kaeris_translate

Translate a set of UI strings into one or more languages. Format-aware and placeholder-safe: values like "Hello, {name}" keep their placeholders intact. Non-string values are passed through unchanged. Includes Translation QA so you can trust the output: it flags translations that dropped a placeholder or that grew long enough to risk overflowing the UI. With verify=True it also back-translates each result into back_lang so you can check the meaning is right even in a language you can't read. Args: strings: key → source-text pairs, e.g. {"greeting": "Hel…

ParameterTypeDescription
strings *object
target_languages *array
api_keystring
back_langstring
contextstring
icuboolean
job_idstring
keeparray
openrouter_keystring
reuseobject
tonestring
verifyboolean

kaeris_translate_file

Translate a strings file on disk and write the results next to it. Supports JSON, YAML, .strings, Xcode String Catalogs (.xcstrings), .po, ARB, Android XML, CSV, XLIFF 1.2, Java/Spring .properties, .NET RESX, Mozilla Fluent (.ftl) and Markdown/MDX — every format the API accepts. With only_new=True (JSON), translates just the keys missing from existing target files and merges. Args: file_path: path to the source file, e.g. "locales/en.json". target_languages: language codes, e.g. ["de", "uk", "zh"]. out_dir: where to write outputs (default: the so…

ParameterTypeDescription
file_path *string
target_languages *array
api_keystring
back_langstring
contextstring
icuboolean
job_idstring
keeparray
only_newboolean
openrouter_keystring
out_dirstring
reuseobject
tonestring
verifyboolean