Flutter ARB — ICU plurals and typed placeholders (Welsh)
A Welsh ARB whose plural messages carry an ICU branch for each of the 6 categories cy selects, plus a select message and a summary line with typed placeholders — int with compactLong, and a DateTime with a yMMMd format — which is what makes gen_l10n emit a typed Dart method rather than a plain string.
{
"@@locale": "cy",
"@@last_modified": "2026-01-01T00:00:00Z",
"files": "{count, plural, zero{{count} ffeil} one{{count} ffeil} two{{count} ffeil} few{{count} ffeil} many{{count} ffeil} other{{count} ffeil}}",
"@files": {
"description": "Item count in the status bar",
"placeholders": {
"count": {
"type": "int",
"format": "decimalPattern"
}
}
},
"folders_selected": "{count, plural, zero{Dewiswyd {count} ffolder} one{Dewiswyd {count} ffolder} two{Dewiswyd {count} ffolder} few{Dewiswyd {count} ffolder} many{Dewiswyd {count} ffolder} other{Dewiswyd {count} ffolder}}",
"@folders_selected": {
"description": "Selection summary",
"placeholders": {
"count": {
"type": "int",
"format": "decimalPattern"
}
}
},
"deleted_items": "{count, plural, zero{Dilewyd {count} eitem} one{Dilewyd {count} eitem} two{Dilewyd {count} eitem} few{Dilewyd {count} eitem} many{Dilewyd {count} eitem} other{Dilewyd {count} eitem}}",
"@deleted_items": {
"description": "Undo toast after a delete",
"placeholders": {
"count": {
"type": "int",
"format": "decimalPattern"
}
}
},
"cats": "{count, plural, zero{{count} cath} one{{count} gath} two{{count} gath} few{{count} cath} many{{count} chath} other{{count} cath}}",
"@cats": {
"description": "Demo string chosen to show Welsh consonant mutation",
"placeholders": {
"count": {
"type": "int",
"format": "decimalPattern"
}
}
},
"shared_by": "{sharerGender, select, female{{name} shared this} male{{name} shared this} other{{name} shared this}}",
"@shared_by": {
"description": "Gender-aware attribution line",
"placeholders": {
"sharerGender": {
"type": "String"
},Specifications
- Format
- Flutter Application Resource Bundle (JSON)
- Locale
- cy
- Plural Messages
- 4
- Select Messages
- 1
- Categories
- zero, one, two, few, many, other
- Placeholder Types
- int (decimalPattern, compactLong), String, DateTime
- Metadata
- @key blocks
- Seed
- 20260807
- Wave
- p7
- Line Endings
- LF
Testing contract
Expected to pass- Scenario
- Run flutter gen-l10n over this bundle (or parse the JSON) and format each plural message across every category boundary.
- Expected result
- gen_l10n produces one method per key with the declared argument types, and the formatted output matches the 6-way branch for cy; a bundle missing a category the locale needs falls back to 'other' silently.
What is a .arb file?
An ARB file (.arb, Application Resource Bundle) is a JSON-based localization format used by Flutter and Google tools. Alongside each key's translated string it stores metadata in a matching @key object — a description and typed placeholders — and uses ICU message syntax with {name} placeholders and plural/select rules.
How to use this file
Use an example .arb file to test Flutter's gen-l10n pipeline, ARB editors and converters, and ICU message-syntax parsers, or to exercise placeholder and plural handling.
How to use this file for testing
“Flutter ARB — ICU plurals and typed placeholders (Welsh)” is a deterministic Novus Examples fixture for Internationalization, Localization catalogs, JSON parsing. Parallel text and accented, multi-script content — for testing translation pipelines, Unicode handling, and localization tooling.
Documented properties for this file: seed 20260807 · LF · Flutter Application Resource Bundle (JSON). Compare results against paired or grouped companions on this page when present (clean↔damaged, searchable↔scanned, or format twins) so scores stay reproducible across runs.
Download the file once, keep the path stable in CI or local scripts, and treat the spec table as the contract: dimensions, seeds, field lists, and roles are intentional. Corrupt or invalid samples are labelled as such — expect parsers to fail loudly rather than silently accept them.
Translation-catalog fixtures carry the same message set across formats, each with its native placeholder syntax. Test your i18n loader, catalog converter, or translation-memory tool, and use the RTL and CJK variants to check bidirectional text and Unicode handling.
Load the catalog with your i18n framework and verify placeholder interpolation and plural handling; the RTL and CJK variants exercise bidirectional text and font fallback.
Code examples
import json
data = json.load(open("app_cy.arb", encoding="utf-8"))
msgs = {k: v for k, v in data.items() if not k.startswith("@")}
print(len(msgs), "messages")Related files
- jsonBidi Isolates — UI templates for user-supplied namesThree notification templates in English, Arabic and Hebrew, each given raw and with every interpolation slot wrapped in FSI…PDI, plus four argument sets covering an LTR name in an RTL sentence, an RTL name in an LTR sentence and a name beginning with a neutral character. This is the fixture for the bug where a display name reorders the sentence around it.

- jsonCLDR Plural Rules — Arabic (6 categories)Arabic CLDR cardinal and ordinal plural rules with the exact integer samples that select each category, the equivalent gettext Plural-Forms expression, and a note on the trap the language exposes: a catalog written with only one/other silently renders 'many' counts (11-99) with the singular noun form.

- jsonCLDR Plural Rules — English (2 categories)English CLDR cardinal and ordinal plural rules with the exact integer samples that select each category, the equivalent gettext Plural-Forms expression, and a note on the trap the language exposes: '1.

- jsonCLDR Plural Rules — Japanese (1 category)Japanese CLDR cardinal and ordinal plural rules with the exact integer samples that select each category, the equivalent gettext Plural-Forms expression, and a note on the trap the language exposes: japanese needs exactly one form; a pipeline that requires a 'one' key produces a catalog no japanese translator can fill in meaningfully.

- jsonCLDR Plural Rules — Polish (4 categories)Polish CLDR cardinal and ordinal plural rules with the exact integer samples that select each category, the equivalent gettext Plural-Forms expression, and a note on the trap the language exposes: cldr gives polish four categories but the traditional gettext header gives it three — gettext folds cldr 'many' and 'other' together because its rule takes an integer n and never sees v.

- jsonCLDR Plural Rules — Russian (4 categories)Russian CLDR cardinal and ordinal plural rules with the exact integer samples that select each category, the equivalent gettext Plural-Forms expression, and a note on the trap the language exposes: 1 and 21 take the same form but 11 does not; a naive n==1 check gets 21 wrong.

Generated by generation/localization_p7.py. Free for any use, no attribution required — license.