Translate

Translate Flutter ARB files and check the result

app_de.arb drifts behind app_en.arb: a key is missing, an ICU branch was dropped. gen-l10n falls back to the template for a missing key, so the gap ships. Below, one command finds it and another fills it.

The example project

A small Flutter ARB project: the English source and a German file that fell behind. The commands below ran on exactly these files.

Sourcelib/l10n/app_en.arb
{
  "@@locale": "en",
  "greeting": "Hi, {name}!",
  "@greeting": {
    "placeholders": { "name": { "type": "String" } }
  },
  "unreadCount": "{count, plural, =0{No new messages} =1{1 new message} other{{count} new messages}}",
  "@unreadCount": {
    "placeholders": { "count": { "type": "int" } }
  },
  "signOut": "Sign out",
  "lastSeen": "Last seen {date}",
  "@lastSeen": {
    "placeholders": { "date": { "type": "DateTime", "format": "yMMMd" } }
  }
}
German, beforelib/l10n/app_de.arb
{
  "@@locale": "de",
  "greeting": "Hallo, {name}!",
  "unreadCount": "{count, plural, =0{Keine neuen Nachrichten} other{Neue Nachrichten}}",
  "signOut": "Abmelden"
}

1. Find what is missing

kaeris check compares each translation with the source file. It runs offline with no key or account, and exits with code 1 when it finds a problem, so a CI job can stop on it.

Terminalexit code 1
$ npx kaeris check --source lib/l10n/app_en.arb --langs de
✗ de: 1 missing key(s): lastSeen
✗ de: 2 translation fault(s):
    unreadCount: number 1 from the source is missing or changed in the translation
    unreadCount: ICU exact-match branch =1 {…} was dropped in the translation
✗ 1 missing key, 2 translation faults

2. Translate only the missing keys

--only-new sends only the keys the German file lacks and merges them in. Lines already in the file stay as they are, broken ones included. The command is in the Python package: pip install kaeris.

Terminalexit code 0
$ kaeris translate lib/l10n/app_en.arb --langs de --only-new
→ no key: free demo limits 10,000 chars per file, 8 languages per run, get a key: kaeris.dev/developer
→ de: 1 new key(s) to translate
→ Run: openai/gpt-6-luna · Free · 1/1 languages · 1 strings · 3.5s
     16 charged
✓ Translation QA: no placeholder loss, no overflow risks
→ Project memory: +1 · 1 strings, 1 translations in kaeris-tm.json
✓ de: merged 1 key(s) → lib/l10n/app_de.arb
→ 3 key(s) already exist in de but nothing in kaeris.lock vouches for them, so they were left alone AND left unlocked. If the source changed after those files were made, those edits are NOT translated. Re-run once with --no-only-new to rebuild them, or with --assume-current if the files are known to match.
German, afterlib/l10n/app_de.arb
{
  "@@locale": "de",
  "greeting": "Hallo, {name}!",
  "unreadCount": "{count, plural, =0{Keine neuen Nachrichten} other{Neue Nachrichten}}",
  "signOut": "Abmelden",
  "lastSeen": "Zuletzt gesehen {date}"
}

3. Check again

The missing keys are filled. What is left was broken before this run: fix those lines by hand, or translate the whole file again with --no-only-new.

Terminalexit code 1
$ npx kaeris check --source lib/l10n/app_en.arb --langs de
✗ de: 2 translation fault(s):
    unreadCount: number 1 from the source is missing or changed in the translation
    unreadCount: ICU exact-match branch =1 {…} was dropped in the translation
✗ 2 translation faults

Run on 2 November 2026 on the free tier, without a key: npx kaeris 0.2.42 for the check, kaeris 0.2.42 from PyPI for the translation. Output as printed, except that progress lines and the local folder path are left out.

What kaeris check catches in Flutter ARB

What it costs

Questions

Are the @metadata entries needed in app_de.arb?

No. Placeholders are described once, in app_en.arb. The check does not ask for @key entries in a translation, and the run above added none.

Does it work with gen-l10n?

Yes. Files keep the app_<lang>.arb names that flutter gen-l10n reads from lib/l10n. See also ARB files.

Can it run in CI?

Yes. npx kaeris check exits with code 1 when it finds a problem. Recipes: GitHub Actions, GitLab CI, pre-commit.

Keep going

Check reference · CLI reference · Free check in the browser · Translate in the browser

Other stacks: react-i18next · next-intl · vue-i18n · iOS · Android