Files
craft-i18n/tools/plural_forms.tsv
T
Martin BallandClaude Opus 5.5 4bafe3edb7 PhotoCraft cutover sync: photocraft@848fa30 into locales/
tools/sync_app.py ../photocraft 8d2e615 --ref 848fa306 --app photocraft:
round trip 141,125 rows reproduced, 0 not. 12 new PhotoCraft locales
(ar, az, da, fi, he, hi, nb, ro, sv, ta, th, ur; az new to craft-i18n,
its language.name from PhotoCraft's LANGUAGES). Hebrew: 35 @plural rows
listed one|other; CLDR he has one|two|other, so the other form is
repeated (PhotoCraft clamps the index today, so n=2 already shows it).
tools/plural_forms.tsv gains az.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 14:56:57 +00:00

1.9 KiB

1# Each locale's gettext Plural-Forms, for the PO files tools/weblate_bridge.py writes for Weblate.
2# Columns, separated by a TAB: locale <TAB> nplurals <TAB> plural expression (C syntax, in n)
3# The expression's index is the form's position in the catalog's `@plural` row: CLDR order, over the
4# categories whole numbers 0..=1000 reach (docs/catalog-format.md, Plurals). The test
5# `plural_forms_table_matches_the_runtime_crate` checks every row against craft-libs' runtime crate.
6ar6n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 ? 4 : 5
7az2n != 1
8bg2n != 1
9bn2n > 1
10bs3n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : 2
11ca2n != 1
12ckb2n != 1
13cs3n==1 ? 0 : n>=2 && n<=4 ? 1 : 2
14da2n != 1
15de2n != 1
16dv2n != 1
17el2n != 1
18es2n != 1
19et2n != 1
20fa2n > 1
21fi2n != 1
22fr2n > 1
23gl2n != 1
24he3n==1 ? 0 : n==2 ? 1 : 2
25hi2n > 1
26hr3n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : 2
27hu2n != 1
28id10
29it2n != 1
30ja10
31ka2n != 1
32kk2n != 1
33ko10
34lo10
35lt3n%10==1 && (n%100<11 || n%100>19) ? 0 : n%10>=2 && (n%100<11 || n%100>19) ? 1 : 2
36lv3n%10==0 || (n%100>=11 && n%100<=19) ? 0 : n%10==1 && n%100!=11 ? 1 : 2
37nb2n != 1
38nl2n != 1
39pl3n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : 2
40pt-br2n > 1
41ro3n==1 ? 0 : n==0 || (n%100>=1 && n%100<=19) ? 1 : 2
42ru3n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : 2
43sk3n==1 ? 0 : n>=2 && n<=4 ? 1 : 2
44sl4n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3
45sq2n != 1
46sr3n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : 2
47sr-latn3n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : 2
48sv2n != 1
49ta2n != 1
50te2n != 1
51th10
52tr2n != 1
53uk3n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : 2
54ur2n != 1
55vi10
56zh-hans10
57zh-hant10