This document defines plural forms handling for TODOS.phase-72.72.11.1.6. The
implementation covers English, Russian, and Arabic because they exercise the
launch-critical plural category shapes:
- English:
one,other - Russian:
one,few,many - Arabic:
zero,one,two,few,many,other
Data Files#
Plural rules live in V2/ue/Content/Localization/V2/Plural/PluralRules_V2.json.
Pluralized string forms live in
V2/ue/Content/Localization/V2/Plural/PluralStrings_V2.json.
The sample string is loc.system.inventory.item_count.body, which uses the
named count variable {count}. Every locale form must include {count} so the
runtime formatter can substitute the evaluated number consistently.
Evaluation#
V2/ue/Tools/evaluate-v2-plural-forms.py evaluates every configured locale
against the tracked counts and writes
V2/ue/Content/Localization/V2/Plural/PluralFormsEvaluation_V2.json.
The evaluator uses the following rules:
- English:
1isone; everything else isother. - Russian: integer counts ending in
1but not11areone; endings2to4outside12to14arefew; all other tracked integers aremany. - Arabic:
0iszero,1isone,2istwo,3to10arefew,11to99aremany, and the remaining tracked counts areother.
Verification#
Run this gate after changing rules, plural strings, evaluator logic, generated evaluation output, docs, or CI wiring:
python3 V2/ue/Tools/check-v2-plural-forms.py
Required release gates:
localization-plural-forms-contractlocalization-plural-forms-english-twolocalization-plural-forms-russian-threelocalization-plural-forms-arabic-sixlocalization-plural-forms-deterministic-outputlocalization-plural-forms-ci-wired