To review machine translation before release in a Flutter app, keep a snapshot of every string a human has approved, diff each app_<locale>.arb against it on every build, and fail CI when a translated string changed (or its English source changed) and nobody signed it off. Reviewers never touch Git: they get a CSV of exactly what changed, and a tech lead records their approval with one command. This post gives you the Dart script, the CI step, and a plural and placeholder checklist for German, Polish and French.
Why AI-translated ARB files ship unreviewed
DeepL or an LLM fills app_de.arb, app_pl.arb and app_fr.arb in seconds, flutter gen-l10n compiles them, and the app builds. Nothing in the Flutter toolchain knows whether a person ever read those strings. The usual missing-translation check (see fail CI on missing translations) only proves a key exists, and a machine translation always exists.
So the gap is a review state. Git history cannot give you one, because "the file changed in a commit" says nothing about who checked the German.
Who checks what
On a 2 to 20 person team, split the work by what each person can actually judge.
| Role | Checks | Does not need |
|---|---|---|
| Developer | Placeholders survive, ICU syntax compiles, key naming | Language skills |
| Native reviewer or agency | Meaning, tone, du/Sie or tu/vous, plural wording, text length on screen | Git, ARB syntax |
| Tech lead | Records the sign-off, unblocks the build | To read Polish |
The script below automates the developer column, so humans only spend time on meaning.
The reviewed snapshot
Commit one JSON file per language next to your ARB files. Each entry stores the English source and the translation a reviewer approved, so a change on either side reopens the string.
- lib/
- l10n/
- app_en.arbtemplate
- app_de.arbAI translated
- app_fr.arb
- app_pl.arb
- l10n_reviewed/
- app_de.jsonwhat a human approved
- app_fr.json
- app_pl.json
- tool/
- check_reviewed.dart
- l10n.yaml
The Dart script
Save this as tool/check_reviewed.dart. It has no dependencies, so dart run works in any Flutter project.
import 'dart:convert';
import 'dart:io';
const l10nDir = 'lib/l10n';
const reviewedDir = 'l10n_reviewed';
const reportDir = 'build/l10n_review';
const templateLocale = 'en';
// CLDR plural categories a translated plural must spell out.
const pluralForms = {
'de': ['one', 'other'],
'fr': ['one', 'other'],
'pl': ['one', 'few', 'many', 'other'],
};
final arbName = RegExp(r'^app_(.+)\.arb$');
final placeholder = RegExp(r'(?<![\w=])\{(\w+)[,}]');
Map<String, String> messages(File file) {
final json = jsonDecode(file.readAsStringSync()) as Map<String, dynamic>;
return {
for (final e in json.entries)
if (!e.key.startsWith('@')) e.key: e.value as String,
};
}
Set<String> placeholders(String s) =>
placeholder.allMatches(s).map((m) => m.group(1)!).toSet();
String csv(String? s) => '"${(s ?? '').replaceAll('"', '""')}"';
void main(List<String> args) {
final approving = args.isNotEmpty && args.first == 'approve';
final approveOnly = args.skip(1).toSet();
final source = messages(File('$l10nDir/app_$templateLocale.arb'));
var failures = 0;
final files = Directory(l10nDir).listSync().whereType<File>().toList()
..sort((a, b) => a.path.compareTo(b.path));
for (final file in files) {
final locale = arbName.firstMatch(file.uri.pathSegments.last)?.group(1);
if (locale == null || locale == templateLocale) continue;
final current = messages(file);
final snapshotFile = File('$reviewedDir/app_$locale.json');
if (approving) {
if (approveOnly.isNotEmpty && !approveOnly.contains(locale)) continue;
snapshotFile.parent.createSync(recursive: true);
snapshotFile.writeAsStringSync(const JsonEncoder.withIndent(' ').convert({
for (final key in current.keys)
key: {'source': source[key], 'target': current[key]},
}));
print('Marked $locale as reviewed (${current.length} strings).');
continue;
}
final reviewed = snapshotFile.existsSync()
? jsonDecode(snapshotFile.readAsStringSync()) as Map<String, dynamic>
: <String, dynamic>{};
final rows = <String>[];
final problems = <String>[];
for (final key in current.keys) {
final target = current[key]!;
final english = source[key] ?? '';
final last = reviewed[key] as Map<String, dynamic>?;
final lastTarget = last?['target'] as String?;
if (last == null || lastTarget != target) {
rows.add(<String?>[key, english, lastTarget, target, 'changed translation']
.map(csv).join(','));
} else if (last['source'] != english) {
rows.add(<String?>[key, english, lastTarget, target, 'English changed']
.map(csv).join(','));
}
final missing = placeholders(english).difference(placeholders(target));
if (missing.isNotEmpty) problems.add('$key: missing {${missing.join('}, {')}}');
if (english.contains(', plural,')) {
for (final form in pluralForms[locale] ?? const <String>[]) {
if (!RegExp('\\b$form\\s*\\{').hasMatch(target)) {
problems.add('$key: plural has no "$form" form');
}
}
}
}
if (rows.isNotEmpty) {
Directory(reportDir).createSync(recursive: true);
File('$reportDir/app_$locale.csv').writeAsStringSync(
'key,english,last_reviewed,current,reason\n${rows.join('\n')}\n');
print('$locale: ${rows.length} unreviewed, see $reportDir/app_$locale.csv');
}
for (final p in problems) {
print('$locale: $p');
}
failures += rows.length + problems.length;
}
if (!approving && failures > 0) {
stderr.writeln('Translation review failed: $failures issue(s).');
exit(1);
}
}
What it does on a normal run:
- For every
app_<locale>.arbexcept the template, it compares each string withl10n_reviewed/app_<locale>.json. - A string is unreviewed when the translation differs from the approved one, or the English changed since approval.
- It writes
build/l10n_review/app_<locale>.csvwith the key, English, last approved text and current text. That file opens in Excel or Google Sheets, which is what your reviewer or agency gets. - It flags placeholders that the translation dropped or renamed (
{name}becoming{imie}is a classic AI mistake) and plurals that miss a form the language needs. - It exits with code 1 if anything is open.
After the reviewer has gone through the CSV and corrected anything in the ARB file, the lead marks the language as reviewed:
dart run tool/check_reviewed.dart approve de
git add l10n_reviewed/app_de.json
git commit -m "German strings reviewed"
approve with no locale approves every language, so use it with care.
Stop the build in CI
Run the check before the build in your release workflow. In GitHub Actions:
- name: Translation review gate
run: dart run tool/check_reviewed.dart
- name: Upload review sheets
if: failure()
uses: actions/upload-artifact@v4
with:
name: l10n-review
path: build/l10n_review/
When the gate fails, the CSVs are attached to the run, ready to forward to the reviewer. If you only want to block releases, put the step in the release job and leave feature branches free to merge AI drafts.
Plural and placeholder checklist per language
The script catches missing forms. A human still has to check that each form reads correctly. These are the CLDR plural categories intl uses.
| Language | Forms to fill | What reviewers check |
|---|---|---|
| German (de) | one, other | one is exactly 1; 0 uses other ("0 Dateien"). Consistent Sie or du across the app. |
| French (fr) | one, other (many optional) | 0 and 1 are both singular ("0 fichier"). CLDR also has many for exact millions; without it, intl falls back to other. Space before : ? !. |
| Polish (pl) | one, few, many, other | few is 2 to 4, 22 to 24 (not 12 to 14), many is 0, 5 to 21, 25 and up; other is fractions. AI often writes only one and other. |
- Every {placeholder} from English is still there, same name
- Plural has every form the language needs, not just one/other
- =0 branch reads naturally if the English has one
- Formal or informal address matches the rest of the app
- Text fits the button or label (German runs long)
- Brand and product names untranslated
A Polish plural that passes:
"files": "{count, plural, one{{count} plik} few{{count} pliki} many{{count} plików} other{{count} pliku}}"
ARB by email versus review states in a dashboard
The script works, and it is free. The time goes into the loop around it: exporting CSVs, emailing them, merging corrections from a spreadsheet back into ARB, and asking "did Marta finish French?" in chat. The agency handoff guide covers that loop in detail.
ARB and CSV by email
- Lead exports a CSV per language and emails it
- Reviewer edits a spreadsheet, lead copies fixes into ARB by hand
- Approval is a reply in an email thread
- Lead runs approve and commits the snapshot
- Status of each language lives in someone's head
Review states in a dashboard
- Reviewer logs in and edits the string in place, no Git
- Each translation is Machine, Draft, Needs review or Checked
- Changing the English moves a translation back to Needs review
- Comments sit on the string, not in an inbox
- Git sync commits the reviewed ARB files back to the repo
In FlutterLocalisation, AI translation fills every language with placeholders and ICU plurals kept, and each result starts as Machine. Reviewers you invite by email (with read or write access per project) see every language side by side, use the plural editor that offers the CLDR forms for Polish, and mark strings Checked. Git sync with GitHub, GitLab or Bitbucket commits the edits to your repo, so the CI gate above can keep running on the ARB files as a second line of defence. Plans are on the pricing section; adding languages costs nothing extra.
To spot what changed between two ARB versions without any setup, the free ARB Diff tool compares two files in the browser.
Try FlutterLocalisation free
Import your ARB files, let AI draft German, Polish and French, and have your translators review in the dashboard instead of in an email thread. Create a free account: 2 projects, 3 members and 500 keys, no card.