Merge lp:~abompard/mailman/default_languages into lp:mailman

Proposed by Aurélien Bompard on 2014-04-17
Status: Merged
Approved by: Barry Warsaw on 2015-05-07
Approved revision: 7248
Merge reported by: Barry Warsaw
Merged at revision: not available
Proposed branch: lp:~abompard/mailman/default_languages
Merge into: lp:mailman
Diff against target: 252 lines (+191/-8)
5 files modified
src/mailman/app/tests/test_templates.py (+0/-1)
src/mailman/commands/docs/conf.rst (+2/-0)
src/mailman/config/schema.cfg (+189/-0)
src/mailman/model/docs/users.rst (+0/-4)
src/mailman/utilities/tests/test_templates.py (+0/-3)
To merge this branch: bzr merge lp:~abompard/mailman/default_languages
Reviewer Review Type Date Requested Status
Mailman Coders 2014-04-17 Pending
Review via email: mp+216401@code.launchpad.net

Description of the change

This branch adds the default languages that were defined in Mailman 2.1.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/mailman/app/tests/test_templates.py'
2--- src/mailman/app/tests/test_templates.py 2014-04-14 16:14:13 +0000
3+++ src/mailman/app/tests/test_templates.py 2014-04-17 21:36:46 +0000
4@@ -58,7 +58,6 @@
5 with open(os.path.join(path, 'demo.txt'), 'w') as fp:
6 print('Test content', end='', file=fp)
7 self._loader = getUtility(ITemplateLoader)
8- getUtility(ILanguageManager).add('it', 'utf-8', 'Italian')
9 self._mlist = create_list('test@example.com')
10
11 def tearDown(self):
12
13=== modified file 'src/mailman/commands/docs/conf.rst'
14--- src/mailman/commands/docs/conf.rst 2013-09-01 15:08:46 +0000
15+++ src/mailman/commands/docs/conf.rst 2014-04-17 21:36:46 +0000
16@@ -22,6 +22,8 @@
17 command without any options.
18
19 >>> command.process(FakeArgs)
20+ [language.pt] charset: iso-8859-1
21+ ...
22 [logging.archiver] path: mailman.log
23 ...
24 [passwords] password_length: 8
25
26=== modified file 'src/mailman/config/schema.cfg'
27--- src/mailman/config/schema.cfg 2014-01-01 14:59:42 +0000
28+++ src/mailman/config/schema.cfg 2014-04-17 21:36:46 +0000
29@@ -340,6 +340,195 @@
30 # Whether the language is enabled or not.
31 enabled: yes
32
33+# Language charsets as imported from Mailman 2.1 defaults
34+# Ref: http://www.lingoes.net/en/translator/langcode.htm
35+
36+[language.ar]
37+description: Arabic
38+charset: utf-8
39+enabled: yes
40+
41+[language.ast]
42+description: Asturian
43+charset: iso-8859-1
44+enabled: yes
45+
46+[language.ca]
47+description: Catalan
48+charset: utf-8
49+enabled: yes
50+
51+[language.cs]
52+description: Czech
53+charset: iso-8859-2
54+enabled: yes
55+
56+[language.da]
57+description: Danish
58+charset: iso-8859-1
59+enabled: yes
60+
61+[language.de]
62+description: German
63+charset: iso-8859-1
64+enabled: yes
65+
66+[language.el]
67+description: Greek
68+charset: iso-8859-7
69+enabled: yes
70+
71+[language.es]
72+description: Spanish
73+charset: iso-8859-1
74+enabled: yes
75+
76+[language.et]
77+description: Estonian
78+charset: iso-8859-15
79+enabled: yes
80+
81+[language.eu]
82+# Basque
83+description: Euskara
84+charset: iso-8859-15
85+enabled: yes
86+
87+[language.fi]
88+description: Finnish
89+charset: iso-8859-1
90+enabled: yes
91+
92+[language.fr]
93+description: French
94+charset: iso-8859-1
95+enabled: yes
96+
97+[language.gl]
98+description: Galician
99+charset: utf-8
100+enabled: yes
101+
102+[language.he]
103+description: Hebrew
104+charset: utf-8
105+enabled: yes
106+
107+[language.hr]
108+description: Croatian
109+charset: iso-8859-2
110+enabled: yes
111+
112+[language.hu]
113+description: Hungarian
114+charset: iso-8859-2
115+enabled: yes
116+
117+[language.ia]
118+description: Interlingua
119+charset: iso-8859-15
120+enabled: yes
121+
122+[language.it]
123+description: Italian
124+charset: iso-8859-1
125+enabled: yes
126+
127+[language.ja]
128+description: Japanese
129+charset: euc-jp
130+enabled: yes
131+
132+[language.ko]
133+description: Korean
134+charset: euc-kr
135+enabled: yes
136+
137+[language.lt]
138+description: Lithuanian
139+charset: iso-8859-13
140+enabled: yes
141+
142+[language.nl]
143+description: Dutch
144+charset: iso-8859-1
145+enabled: yes
146+
147+[language.no]
148+description: Norwegian
149+charset: iso-8859-1
150+enabled: yes
151+
152+[language.pl]
153+description: Polish
154+charset: iso-8859-2
155+enabled: yes
156+
157+[language.pt]
158+description: Protuguese
159+charset: iso-8859-1
160+enabled: yes
161+
162+[language.pt_BR]
163+description: Protuguese (Brazil)
164+charset: iso-8859-1
165+enabled: yes
166+
167+[language.ro]
168+description: Romanian
169+charset: iso-8859-2
170+enabled: yes
171+
172+[language.ru]
173+description: Russian
174+charset: koi8-r
175+enabled: yes
176+
177+[language.sk]
178+description: Slovak
179+charset: utf-8
180+enabled: yes
181+
182+[language.sl]
183+description: Slovenian
184+charset: iso-8859-2
185+enabled: yes
186+
187+[language.sr]
188+description: Serbian
189+charset: utf-8
190+enabled: yes
191+
192+[language.sv]
193+description: Swedish
194+charset: iso-8859-1
195+enabled: yes
196+
197+[language.tr]
198+description: Turkish
199+charset: iso-8859-9
200+enabled: yes
201+
202+[language.uk]
203+description: Ukrainian
204+charset: utf-8
205+enabled: yes
206+
207+[language.vi]
208+description: Vietnamese
209+charset: utf-8
210+enabled: yes
211+
212+[language.zh_CN]
213+description: Chinese
214+charset: utf-8
215+enabled: yes
216+
217+[language.zh_TW]
218+description: Chinese (Taiwan)
219+charset: utf-8
220+enabled: yes
221+
222
223 [antispam]
224 # This section defines basic antispam detection settings.
225
226=== modified file 'src/mailman/model/docs/users.rst'
227--- src/mailman/model/docs/users.rst 2013-06-19 02:43:40 +0000
228+++ src/mailman/model/docs/users.rst 2014-04-17 21:36:46 +0000
229@@ -272,10 +272,6 @@
230 ``False``.
231 ::
232
233- >>> from mailman.interfaces.languages import ILanguageManager
234- >>> getUtility(ILanguageManager).add('it', 'iso-8859-1', 'Italian')
235- <Language [it] Italian>
236-
237 >>> from mailman.core.constants import DeliveryMode
238 >>> prefs = user_1.preferences
239 >>> prefs.acknowledge_posts = True
240
241=== modified file 'src/mailman/utilities/tests/test_templates.py'
242--- src/mailman/utilities/tests/test_templates.py 2014-01-01 14:59:42 +0000
243+++ src/mailman/utilities/tests/test_templates.py 2014-04-17 21:36:46 +0000
244@@ -53,9 +53,6 @@
245 [paths.testing]
246 var_dir: {0}
247 """.format(self.var_dir))
248- language_manager = getUtility(ILanguageManager)
249- language_manager.add('de', 'utf-8', 'German')
250- language_manager.add('it', 'utf-8', 'Italian')
251 self.mlist = create_list('l@example.com')
252 self.mlist.preferred_language = 'de'
253