Apply 63_update_default_server_language.patch
authorMichael Spang <mspang@uwaterloo.ca>
Thu, 13 Sep 2007 00:32:57 +0000 (20:32 -0400)
committerMichael Spang <mspang@uwaterloo.ca>
Thu, 13 Sep 2007 00:32:57 +0000 (20:32 -0400)
bin/update

index 5b2ba56..ec78dcb 100755 (executable)
@@ -121,7 +121,7 @@ def move_language_templates(mlist):
     #
     # 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 @@ def move_language_templates(mlist):
                 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 = 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))