------------------------------------------------------------
revno: 1626
committer: Mark Sapiro <m...@msapiro.net>
branch nick: 2.1
timestamp: Sat 2016-02-27 20:38:34 -0800
message:
  Added switch to disable the l10n cset recoding.
modified:
  Mailman/Defaults.py.in
  Mailman/i18n.py
  NEWS


--
lp:mailman/2.1
https://code.launchpad.net/~mailman-coders/mailman/2.1

Your team Mailman Checkins is subscribed to branch lp:mailman/2.1.
To unsubscribe from this branch go to 
https://code.launchpad.net/~mailman-coders/mailman/2.1/+edit-subscription
=== modified file 'Mailman/Defaults.py.in'
--- Mailman/Defaults.py.in	2016-02-27 23:21:12 +0000
+++ Mailman/Defaults.py.in	2016-02-28 04:38:34 +0000
@@ -153,6 +153,13 @@
 # in list rosters?  Defaults to No to preserve prior behavior.
 ROSTER_DISPLAY_REALNAME = No
 
+# Beginning in Mailman 2.1.21, localized help and some other output from
+# Mailman's bin/ commands is converted to the character set of the user's
+# workstation (LC_CTYPE) if different from the character set of the language.
+# This is not well tested over a wide range of locales, so if it causes
+# problems, it can be disabled by setting the following to Yes.
+DISABLE_COMMAND_LOCALE_CSET = No
+
 
 
 #####

=== modified file 'Mailman/i18n.py'
--- Mailman/i18n.py	2016-02-27 23:21:12 +0000
+++ Mailman/i18n.py	2016-02-28 04:38:34 +0000
@@ -33,7 +33,8 @@
     locale.setlocale(locale.LC_CTYPE, old)
     return charset
 
-_ctype_charset = _get_ctype_charset()
+if not mm_cfg.DISABLE_COMMAND_LOCALE_CSET:
+    _ctype_charset = _get_ctype_charset()
 
 
 
@@ -114,8 +115,12 @@
         return s
     return unicode(s, source, 'replace').encode(_ctype_charset, 'replace')
 
-def C_(s):
-    return tolocale(_(s, 2))
+if mm_cfg.DISABLE_COMMAND_LOCALE_CSET:
+    C_ = _
+else:
+    def C_(s):
+        return tolocale(_(s, 2))
+
     
 
 def ctime(date):

=== modified file 'NEWS'
--- NEWS	2016-02-27 23:21:12 +0000
+++ NEWS	2016-02-28 04:38:34 +0000
@@ -39,7 +39,10 @@
     - Also thanks to Miloslav Trmac and Yasuhito FUTATSUKI, the l10n for
       Mailman's bin/ commands has been fixed to display using the character
       set of the user's work station even when Mailman's character set for
-      the language is different.  (LP: #558167)
+      the language is different.  Because this has not been tested over a
+      wide set of locales, there is an mm_cfg.py switch
+      DISABLE_COMMAND_LOCALE_CSET to disable it if it causes problems.
+      (LP: #558167)
 
     - The Polish translation has been updated by Stefan Plewako.
 

_______________________________________________
Mailman-checkins mailing list
Mailman-checkins@python.org
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org

Reply via email to