shipi18n

v2.3.2
io.github.Shipi18n/shipi18n Checked 4 days ago Published 1 month ago

Check locale files for broken placeholders, plurals and missing keys.

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

check_locales Check locale files

Validate translated locale files against the source language: missing/orphaned keys, dropped or invented placeholders, collapsed plurals, empty values, untranslated copy. Reads JSON, YAML (incl. Rails), Flutter ARB, Apple .xcstrings, Android strings.xml, gettext .po and XLIFF. Deterministic — no API key and no model call required.

ParameterTypeDescription
path *stringPath to a locale folder or file: JSON (flat or nested, i18next/vue-i18n/next-intl), YAML incl. Rails config/locales, a Flutter .arb folder, an Apple .xcstrings file, an Android res/ folder, gettext .p…
glossaryPathstringPath to a glossary JSON file
ignoreKeysstringComma-separated '*' globs of keys to silence
sourcestringSource language code

check_glossary Check glossary compliance

Enforce do-not-translate terms and locked per-language translations across a locale tree. Deterministic string matching — no API key and no model call required.

ParameterTypeDescription
glossaryPath *stringPath to a glossary JSON file
path *stringPath to a locale folder or file: JSON (flat or nested, i18next/vue-i18n/next-intl), YAML incl. Rails config/locales, a Flutter .arb folder, an Apple .xcstrings file, an Android res/ folder, gettext .p…
sourcestringSource language code

diff_locales Diff locales against the source

Answer "what needs translating?": per language, the keys missing from the translation and the keys present that no longer exist in the source. No API key required.

ParameterTypeDescription
path *stringPath to a locale folder or file: JSON (flat or nested, i18next/vue-i18n/next-intl), YAML incl. Rails config/locales, a Flutter .arb folder, an Apple .xcstrings file, an Android res/ folder, gettext .p…
langstringLimit to one language
sourcestringSource language code

review_locales Get translation pairs for semantic review

Return source/translation pairs plus review criteria so YOU can judge translation quality with your own reasoning. The server performs no model call and needs no API key. Structurally broken keys are excluded — run check_locales for those.

ParameterTypeDescription
lang *stringLanguage to review
path *stringPath to a locale folder or file: JSON (flat or nested, i18next/vue-i18n/next-intl), YAML incl. Rails config/locales, a Flutter .arb folder, an Apple .xcstrings file, an Android res/ folder, gettext .p…
limitintegerMaximum pairs to return
sourcestringSource language code

list_languages List Languages

List the language codes and names Shipi18n recognizes (any BCP-47 code works; these have friendly names).

check_placeholders Check Placeholders

Verify a translated string preserves all placeholders from the source (no LLM call).

ParameterTypeDescription
source *stringThe source string
translation *stringThe translated string to check

translate_json Translate JSON

Translate an i18n locale JSON object to one or more target languages, preserving structure and placeholders. Requires your own LLM key (ANTHROPIC_API_KEY/OPENAI_API_KEY). For key-free work use the validation tools. Legacy: the MCP client's model via sampling.

ParameterTypeDescription
content *stringThe source locale as a JSON string, e.g. {"greeting":"Hello {{name}}"}
to *stringTarget language code(s), comma-separated, e.g. "es,fr,de"
fromstringSource language code (default: en)
modelstringOverride the provider default model
providerstringForce a provider: anthropic or openai. Omit to auto-detect from the environment.

translate_file Translate File

Read a JSON locale file from disk, translate it into one or more languages, and write <lang>.json files. Set incremental=true to reuse existing output files and only translate new/missing keys.

ParameterTypeDescription
path *stringPath to the source locale JSON file, e.g. locales/en.json
to *stringTarget language code(s), comma-separated, e.g. "es,fr,de"
fromstringSource language code (default: en)
incrementalbooleanReuse existing <lang>.json and only translate new keys
modelstring
outDirstringOutput directory (default: same directory as the source file)
providerstring