Package: mailman / 1:2.1.18-2+deb8u2

63_update_default_server_language.patch Patch series | download
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
Author: L�szl� 'GCS' B�sz�rm�nyi <gcs@lsc.hu>
Description: Get the default language from the config file, and do not use the
 hardcoded English.
Forwarded: no

Index: b/bin/update
===================================================================
--- a/bin/update	2012-05-20 14:21:40.194890466 +0200
+++ b/bin/update	2012-05-20 14:21:41.810898489 +0200
@@ -121,7 +121,7 @@
     #
     # First, get rid of any lists/<list> template or lists/<list>/en template
     # that is identical to the global templates/* default.
-    for gtemplate in os.listdir(os.path.join(mm_cfg.TEMPLATE_DIR, 'en')):
+    for gtemplate in os.listdir(os.path.join(mm_cfg.TEMPLATE_DIR, mm_cfg.DEFAULT_SERVER_LANGUAGE)):
         # BAW: get rid of old templates, e.g. admlogin.txt and
         # handle_opts.html
         try:
@@ -155,14 +155,14 @@
                 os.unlink(os.path.join(mlist.fullpath(), gtemplate + '.prev'))
         # Match against the lists/<list>/en/* templates
         try:
-            fp = open(os.path.join(mlist.fullpath(), 'en', gtemplate))
+            fp = open(os.path.join(mlist.fullpath(), mm_cfg.DEFAULT_SERVER_LANGUAGE, gtemplate))
         except IOError, e:
             if e.errno <> errno.ENOENT: raise
         else:
             tcksum = Utils.md5_new(fp.read()).digest()
             fp.close()
             if gcksum == tcksum:
-                os.unlink(os.path.join(mlist.fullpath(), 'en', gtemplate))
+                os.unlink(os.path.join(mlist.fullpath(), mm_cfg.DEFAULT_SERVER_LANGUAGE, gtemplate))
         # Match against the templates/* template
         try:
             fp = open(os.path.join(mm_cfg.TEMPLATE_DIR, gtemplate))