-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathplural_forms.json
More file actions
77 lines (76 loc) · 4.71 KB
/
Copy pathplural_forms.json
File metadata and controls
77 lines (76 loc) · 4.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
{
"_meta": {
"purpose": "The one gettext Plural-Forms rule per ISO-639 code. Every tool that writes or validates a catalogue header reads this file; do not copy a rule into another script.",
"shipped_are_authoritative": "Rules for codes we already ship were taken from those catalogues, so the integrity check passes by construction. Rules for the rest come from the GNU gettext manual's plural-forms table.",
"adding_a_code": "Look the rule up in the GNU gettext manual before adding it. Callers fail loudly on an unknown code rather than defaulting to two forms, because a silent 'nplurals=2' is wrong for every 3-, 4-, 5- and 6-form language.",
"comparison": "Compare rules by evaluating them over n=0..200, not by string equality. Russian and Ukrainian ship two different spellings of the same rule ('n%100<12 || n%100>14' vs 'n%100<10 || n%100>=20') and both are correct.",
"do_not_normalize": "zh, id and ms-family catalogues that ship nplurals=2 are not defects. Both forms render the same text, gettext accepts it, and lowering them to 1 would rewrite every plural entry for no user-visible gain."
},
"rules": {
"ar": "nplurals=6; plural=(n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 ? 4 : 5);",
"bg": "nplurals=2; plural=(n != 1);",
"bs": "nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : 2);",
"cs": "nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;",
"da": "nplurals=2; plural=(n != 1);",
"de": "nplurals=2; plural=(n != 1);",
"el": "nplurals=2; plural=(n != 1);",
"en": "nplurals=2; plural=(n != 1);",
"es": "nplurals=2; plural=(n != 1);",
"et": "nplurals=2; plural=(n != 1);",
"fa": "nplurals=2; plural=(n > 1);",
"fi": "nplurals=2; plural=(n != 1);",
"fr": "nplurals=2; plural=(n != 1);",
"ga": "nplurals=5; plural=(n==1 ? 0 : n==2 ? 1 : n<7 ? 2 : n<11 ? 3 : 4);",
"he": "nplurals=2; plural=(n != 1);",
"hi": "nplurals=2; plural=(n != 1);",
"hr": "nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : 2);",
"hu": "nplurals=2; plural=(n != 1);",
"id": "nplurals=2; plural=(n != 1);",
"it": "nplurals=2; plural=(n != 1);",
"ja": "nplurals=1; plural=0;",
"ko": "nplurals=1; plural=0;",
"lt": "nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && (n%100<10 || n%100>=20) ? 1 : 2);",
"lv": "nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n != 0 ? 1 : 2);",
"ms": "nplurals=1; plural=0;",
"nb": "nplurals=2; plural=(n != 1);",
"nl": "nplurals=2; plural=(n != 1);",
"pl": "nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);",
"pt": "nplurals=2; plural=(n != 1);",
"ro": "nplurals=3; plural=(n==1 ? 0 : (n==0 || (n%100>=1 && n%100<=19)) ? 1 : 2);",
"ru": "nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : 2);",
"sk": "nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;",
"sl": "nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3);",
"sq": "nplurals=2; plural=(n != 1);",
"sr": "nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : 2);",
"sv": "nplurals=2; plural=(n != 1);",
"th": "nplurals=1; plural=0;",
"tr": "nplurals=2; plural=(n != 1);",
"uk": "nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);",
"vi": "nplurals=1; plural=0;",
"zh": "nplurals=2; plural=(n != 1);",
"af": "nplurals=2; plural=(n != 1);",
"az": "nplurals=2; plural=(n != 1);",
"be": "nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : 2);",
"ca": "nplurals=2; plural=(n != 1);",
"cy": "nplurals=4; plural=(n==1) ? 0 : (n==2) ? 1 : (n != 8 && n != 11) ? 2 : 3;",
"eo": "nplurals=2; plural=(n != 1);",
"eu": "nplurals=2; plural=(n != 1);",
"gl": "nplurals=2; plural=(n != 1);",
"hy": "nplurals=2; plural=(n > 1);",
"is": "nplurals=2; plural=(n%10!=1 || n%100==11);",
"ka": "nplurals=2; plural=(n != 1);",
"kk": "nplurals=2; plural=(n != 1);",
"km": "nplurals=1; plural=0;",
"lo": "nplurals=1; plural=0;",
"mk": "nplurals=2; plural=(n==1 || n%10==1 ? 0 : 1);",
"mn": "nplurals=2; plural=(n != 1);",
"mt": "nplurals=4; plural=(n==1 ? 0 : (n==0 || (n%100>1 && n%100<11)) ? 1 : (n%100>10 && n%100<20) ? 2 : 3);",
"my": "nplurals=1; plural=0;",
"ne": "nplurals=2; plural=(n != 1);",
"si": "nplurals=2; plural=(n != 1);",
"sw": "nplurals=2; plural=(n != 1);",
"tl": "nplurals=2; plural=(n > 1);",
"ur": "nplurals=2; plural=(n != 1);",
"yo": "nplurals=1; plural=0;"
}
}