Index: trunk/extensions/Translate/data/plural.py |
— | — | @@ -1,155 +0,0 @@ |
2 | | -# -*- coding: utf-8 -*- |
3 | | -# |
4 | | -# (C) xqt, 2011 |
5 | | -# (C) Pywikipedia bot team, 2011 |
6 | | -# |
7 | | -# Distributed under the terms of the MIT license. |
8 | | -# |
9 | | -__version__ = '$Id$' |
10 | | -# |
11 | | - |
12 | | -plural_rules = { |
13 | | - '_default': {'nplurals': 2, 'plural': lambda n: lambda n: (n != 1)}, |
14 | | - 'ach':{'nplurals': 2, 'plural': lambda n: (n > 1)}, |
15 | | - 'ak': {'nplurals': 2, 'plural': lambda n: (n > 1)}, |
16 | | - 'am': {'nplurals': 2, 'plural': lambda n: (n > 1)}, |
17 | | - 'ar': {'nplurals': 6, 'plural': lambda n: |
18 | | - 0 if (n == 0) else |
19 | | - 1 if (n == 1) else |
20 | | - 2 if (n == 2) else |
21 | | - 3 if (n%100 >= 3 and n%100 <= 10) else |
22 | | - 4 if (n%100 >= 11 and n%100 <= 99) else |
23 | | - 5 }, |
24 | | - 'arn':{'nplurals': 2, 'plural': lambda n: (n > 1)}, |
25 | | - 'ay': {'nplurals': 1, 'plural': 0}, |
26 | | - 'be': {'nplurals': 3, 'plural': lambda n: |
27 | | - 0 if (n%10 == 1 and n%100 != 11) else |
28 | | - 1 if (n%10 >= 2 and n%10 <= 4 and (n%100 < 10 or n%100 >= 20)) else |
29 | | - 2 }, |
30 | | - 'bo': {'nplurals': 1, 'plural': 0}, |
31 | | - 'br': {'nplurals': 2, 'plural': lambda n: (n > 1)}, |
32 | | - 'bs': {'nplurals': 3, 'plural': lambda n: |
33 | | - 0 if (n%10 == 1 and n%100 != 11) else |
34 | | - 1 if (n%10 >= 2 and n%10 <= 4 and (n%100 < 10 or n%100 >= 20)) else |
35 | | - 2 }, |
36 | | - 'cgg':{'nplurals': 1, 'plural': 0}, |
37 | | - 'cs': {'nplurals': 3, 'plural': lambda n: |
38 | | - 0 if (n == 1) else |
39 | | - 1 if (n >= 2 and n <= 4) else |
40 | | - 2 }, |
41 | | - 'csb':{'nplurals': 3, 'plural': lambda n: |
42 | | - 0 if (n == 1) else |
43 | | - 1 if (n%10 >= 2 and n%10 <= 4 and (n%100 < 10 or n%100 >= 20)) else |
44 | | - 2 }, |
45 | | - 'cy': {'nplurals': 6, 'plural': lambda n: |
46 | | - 0 if (n == 0) else |
47 | | - 1 if (n == 1) else |
48 | | - 2 if (n == 2) else |
49 | | - 3 if (n == 3) else |
50 | | - 4 if (n == 6) else |
51 | | - 5 }, |
52 | | - 'dz': {'nplurals': 1, 'plural': 0}, |
53 | | - 'fa': {'nplurals': 1, 'plural': 0}, |
54 | | - 'fil':{'nplurals': 2, 'plural': lambda n: (n > 1)}, |
55 | | - 'fr': {'nplurals': 2, 'plural': lambda n: (n > 1)}, |
56 | | - 'ga': {'nplurals': 5, 'plural': lambda n: |
57 | | - 0 if (n == 1) else |
58 | | - 1 if (n == 2) else |
59 | | - 2 if (n < 7) else |
60 | | - 3 if (n < 11) else |
61 | | - 4 }, |
62 | | - 'gd': {'nplurals': 4, 'plural': lambda n: |
63 | | - 0 if (n == 1 or n == 11) else |
64 | | - 1 if (n == 2 or n == 12) else |
65 | | - 2 if (n > 2 and n < 20) else |
66 | | - 3 }, |
67 | | - 'gun':{'nplurals': 2, 'plural': lambda n: (n > 1)}, |
68 | | - 'hr': {'nplurals': 3, 'plural': lambda n: |
69 | | - 0 if (n%10 == 1 and n%100 != 11) else |
70 | | - 1 if (n%10 >= 2 and n%10 <= 4 and (n%100 < 10 or n%100 >= 20)) else |
71 | | - 2 }, |
72 | | - 'id': {'nplurals': 1, 'plural': 0}, |
73 | | - 'ja': {'nplurals': 1, 'plural': 0}, |
74 | | - 'jbo':{'nplurals': 1, 'plural': 0}, |
75 | | - 'ka': {'nplurals': 1, 'plural': 0}, |
76 | | - 'kk': {'nplurals': 1, 'plural': 0}, |
77 | | - 'km': {'nplurals': 1, 'plural': 0}, |
78 | | - 'ko': {'nplurals': 1, 'plural': 0}, |
79 | | - 'kw': {'nplurals': 4, 'plural': lambda n: |
80 | | - 0 if (n == 1) else |
81 | | - 1 if (n == 2) else |
82 | | - 2 if (n == 3) else |
83 | | - 3 }, |
84 | | - 'ky': {'nplurals': 1, 'plural': 0}, |
85 | | - 'ln': {'nplurals': 2, 'plural': lambda n: (n > 1)}, |
86 | | - 'lo': {'nplurals': 1, 'plural': 0}, |
87 | | - 'lt': {'nplurals': 3, 'plural': lambda n: |
88 | | - 0 if (n%10 == 1 and n%100 != 11) else |
89 | | - 1 if (n%10 >= 2 and (n%100 < 10 or n%100 >= 20)) else |
90 | | - 2 }, |
91 | | - 'lv': {'nplurals': 3, 'plural': lambda n: |
92 | | - 0 if (n%10 == 1 and n%100 != 11) else |
93 | | - 1 if (n != 0) else |
94 | | - 2 }, |
95 | | - 'mfe':{'nplurals': 2, 'plural': lambda n: (n > 1)}, |
96 | | - 'mg': {'nplurals': 2, 'plural': lambda n: (n > 1)}, |
97 | | - 'mi': {'nplurals': 2, 'plural': lambda n: (n > 1)}, |
98 | | - 'mk': {'nplurals': 2, 'plural': lambda n: 0 if n == 1 or n%10 == 1 else 1}, |
99 | | - 'mnk':{'nplurals': 3, 'plural': lambda n: |
100 | | - 0 if (n == 0) else |
101 | | - 1 if n == 1 else |
102 | | - 2 }, |
103 | | - 'ms': {'nplurals': 1, 'plural': 0}, |
104 | | - 'mt': {'nplurals': 4, 'plural': lambda n: |
105 | | - 0 if (n == 1) else |
106 | | - 1 if (n == 0 or (n%100 > 1 and n%100 < 11)) else |
107 | | - 2 if (n%100 > 10 and n%100 < 20) else |
108 | | - 3 }, |
109 | | - 'nso':{'nplurals': 2, 'plural': lambda n: (n > 1)}, |
110 | | - 'oc': {'nplurals': 2, 'plural': lambda n: (n > 1)}, |
111 | | - 'pl': {'nplurals': 3, 'plural': lambda n: |
112 | | - 0 if (n == 1) else |
113 | | - 1 if (n%10 >= 2 and n%10 <= 4 and (n%100 < 10 or n%100 >= 20)) else |
114 | | - 2 }, |
115 | | - 'pt-br': {'nplurals': 2, 'plural': lambda n: (n > 1)}, |
116 | | - 'ro': {'nplurals': 3, 'plural': lambda n: |
117 | | - 0 if (n == 1) else |
118 | | - 1 if (n == 0 or (n%100 > 0 and n%100 < 20)) else |
119 | | - 2 }, |
120 | | - 'ru': {'nplurals': 3, 'plural': lambda n: |
121 | | - 0 if (n%10 == 1 and n%100 != 11) else |
122 | | - 1 if (n%10 >= 2 and n%10 <= 4 and (n%100 < 10 or n%100 >= 20)) else |
123 | | - 2 }, |
124 | | - 'sk': {'nplurals': 3, 'plural': lambda n: |
125 | | - 0 if (n == 1) else |
126 | | - 1 if (n >= 2 and n <= 4) else |
127 | | - 2 }, |
128 | | - 'sl': {'nplurals': 4, 'plural': lambda n: |
129 | | - 0 if (n%100 == 1) else |
130 | | - 1 if (n%100 == 2) else |
131 | | - 2 if (n%100 == 3 or n%100 == 4) else |
132 | | - 3 }, |
133 | | - 'sr': {'nplurals': 3, 'plural': lambda n: |
134 | | - 0 if (n%10 == 1 and n%100 != 11) else |
135 | | - 1 if (n%10 >= 2 and n%10 <= 4 and (n%100 < 10 or n%100 >= 20)) else |
136 | | - 2 }, |
137 | | - 'su': {'nplurals': 1, 'plural': 0}, |
138 | | - 'th': {'nplurals': 1, 'plural': 0}, |
139 | | - 'ti': {'nplurals': 2, 'plural': lambda n: (n > 1)}, |
140 | | - 'tr': {'nplurals': 1, 'plural': 0}, |
141 | | - 'tt': {'nplurals': 1, 'plural': 0}, |
142 | | - 'ug': {'nplurals': 1, 'plural': 0}, |
143 | | - 'uk': {'nplurals': 3, 'plural': lambda n: |
144 | | - 0 if (n%10 == 1 and n%100 != 11) else |
145 | | - 1 if (n%10 >= 2 and n%10 <= 4 and (n%100 < 10 or n%100 >= 20)) else |
146 | | - 2 }, |
147 | | - 'uz': {'nplurals': 1, 'plural': 0}, |
148 | | - 'vi': {'nplurals': 1, 'plural': 0}, |
149 | | - 'wa': {'nplurals': 2, 'plural': lambda n: (n > 1)}, |
150 | | - 'wo': {'nplurals': 1, 'plural': 0}, |
151 | | - 'zh': {'nplurals': 1, 'plural': 0}, |
152 | | - 'zh-hans': {'nplurals': 1, 'plural': 0}, |
153 | | - 'zh-hant': {'nplurals': 1, 'plural': 0}, |
154 | | - 'zh-tw': {'nplurals': 1, 'plural': 0}, |
155 | | -} |
156 | | - |