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