annotate babel/messages/plurals.py @ 56:27d55a07c897

Rename the `babel.catalog` package to `babel.messages` for consistency with the other package names.
author cmlenz
date Fri, 08 Jun 2007 09:16:32 +0000
parents babel/catalog/plurals.py@52dbebdd3789
children 068952b4d4c0
rev   line source
53
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
1 # -*- coding: utf-8 -*-
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
2 #
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
3 # Copyright (C) 2007 Edgewall Software
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
4 # All rights reserved.
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
5 #
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
6 # This software is licensed as described in the file COPYING, which
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
7 # you should have received as part of this distribution. The terms
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
8 # are also available at http://babel.edgewall.org/wiki/License.
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
9 #
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
10 # This software consists of voluntary contributions made by many
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
11 # individuals. For the exact contribution history, see the revision
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
12 # history and logs, available at http://babel.edgewall.org/log/.
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
13
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
14 PLURALS = {
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
15 # Afrikaans - From Pootle's PO's
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
16 'af': (2, '(n != 1)'),
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
17 # Arabic - From Pootle's PO's
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
18 'ar': (6, '(n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n>=3 && n<=10 ? 3 : n>=11 && n<=99 ? 4 : 5)'),
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
19 # Bulgarian - From Pootle's PO's
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
20 'bg': (2, '(n != 1)'),
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
21 # Bengali - From Pootle's PO's
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
22 'bn': (2, '(n != 1)'),
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
23 # Catalan - From Pootle's PO's
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
24 'ca': (2, '(n != 1)'),
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
25 # Czech
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
26 'cs': (3, '(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2)'),
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
27 # Danish
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
28 'da': (2, '(n != 1)'),
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
29 # German
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
30 'de': (2, '(n != 1)'),
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
31 # Greek
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
32 'el': (2, '(n != 1)'),
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
33 # English
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
34 'en': (2, '(n != 1)'),
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
35 # Esperanto
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
36 'eo': (2, '(n != 1)'),
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
37 # Spanish
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
38 'es': (2, '(n != 1)'),
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
39 # Estonian
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
40 'et': (2, '(n != 1)'),
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
41 # Basque - From Pootle's PO's
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
42 'eu': (2, '(n != 1)'),
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
43 # Persian - From Pootle's PO's
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
44 'fa': (1, '0'),
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
45 # Finnish
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
46 'fi': (2, '(n != 1)'),
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
47 # French
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
48 'fr': (2, '(n > 1)'),
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
49 # Furlan - From Pootle's PO's
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
50 'fur': (2, '(n > 1)'),
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
51 # Irish
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
52 'ga': (3, 'n==1 ? 0 : n==2 ? 1 : 2'),
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
53 # Galego - From Pootle's PO's
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
54 'gl': (2, '(n != 1)'),
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
55 # Hausa - From Pootle's PO's
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
56 'ha': (2, '(n != 1)'),
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
57 # Hebrew
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
58 'he': (2, '(n != 1)'),
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
59 # Hindi - From Pootle's PO's
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
60 'hi': (2, '(n != 1)'),
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
61 # Croatian
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
62 'hr': (3, '(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2)'),
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
63 # Hungarian
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
64 'hu': (1, '0'),
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
65 # Armenian - From Pootle's PO's
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
66 'hy': (1, '0'),
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
67 # Icelandic - From Pootle's PO's
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
68 'is': (2, '(n != 1)'),
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
69 # Italian
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
70 'it': (2, '(n != 1)'),
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
71 # Japanese
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
72 'ja': (1, '0'),
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
73 # Georgian - From Pootle's PO's
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
74 'ka': (1, '0'),
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
75 # Kongo - From Pootle's PO's
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
76 'kg': (2, '(n != 1)'),
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
77 # Khmer - From Pootle's PO's
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
78 'km': (1, '0'),
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
79 # Korean
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
80 'ko': (1, '0'),
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
81 # KurdĂ® - From Pootle's PO's
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
82 'ku': (2, '(n != 1)'),
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
83 # Lithuanian
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
84 'lt': (3, '(n%10==1 && n%100!=11 ? 0 : n%10>=2 && (n%100<10 || n%100>=20) ? 1 : 2)'),
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
85 # Latvian
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
86 'lv': (3, '(n%10==1 && n%100!=11 ? 0 : n != 0 ? 1 : 2)'),
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
87 # Maltese - From Pootle's PO's
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
88 'mt': (4, '(n==1 ? 0 : n==0 || ( n%100>1 && n%100<11) ? 1 : (n%100>10 && n%100<20 ) ? 2 : 3)'),
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
89 # Norwegian Bokmal
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
90 'nb': (2, '(n != 1)'),
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
91 # Dutch
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
92 'nl': (2, '(n != 1)'),
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
93 # Norwegian Nynorsk
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
94 'nn': (2, '(n != 1)'),
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
95 # Norwegian
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
96 'no': (2, '(n != 1)'),
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
97 # Punjabi - From Pootle's PO's
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
98 'pa': (2, '(n != 1)'),
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
99 # Polish
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
100 'pl': (3, '(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2)'),
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
101 # Portuguese
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
102 'pt': (2, '(n != 1)'),
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
103 # Brazilian
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
104 'pt_BR': (2, '(n > 1)'),
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
105 # Romanian - From Pootle's PO's
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
106 'ro': (3, '(n==1 ? 0 : (n==0 || (n%100 > 0 && n%100 < 20)) ? 1 : 2)'),
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
107 # Russian
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
108 'ru': (3, '(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2)'),
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
109 # Slovak
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
110 'sk': (3, '(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2)'),
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
111 # Slovenian
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
112 'sl': (4, '(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3)'),
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
113 # Serbian - From Pootle's PO's
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
114 'sr': (3, '(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10< =4 && (n%100<10 || n%100>=20) ? 1 : 2)'),
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
115 # Sesotho - From Pootle's PO's
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
116 'st': (2, '(n != 1)'),
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
117 # Swedish
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
118 'sv': (2, '(n != 1)'),
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
119 # Turkish
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
120 'tr': (1, '0'),
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
121 # Ukrainian
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
122 'uk': (3, '(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2)'),
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
123 # Venda - From Pootle's PO's
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
124 've': (2, '(n != 1)'),
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
125 # Vietnamese - From Pootle's PO's
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
126 'vi': (1, '0'),
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
127 # Xhosa - From Pootle's PO's
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
128 'xh': (2, '(n != 1)'),
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
129 # Chinese - From Pootle's PO's
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
130 'zh_CN': (1, '0'),
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
131 'zh_HK': (1, '0'),
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
132 'zh_TW': (1, '0'),
52dbebdd3789 Fixed a bug regarding plural msgid's handling when writing the `.pot` file.
palgarvio
parents:
diff changeset
133 }
Copyright (C) 2012-2017 Edgewall Software