aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xMailman/Defaults.py.in7
-rw-r--r--Mailman/i18n.py11
-rw-r--r--NEWS5
3 files changed, 19 insertions, 4 deletions
diff --git a/Mailman/Defaults.py.in b/Mailman/Defaults.py.in
index 06b3e0ad..04d7db8a 100755
--- a/Mailman/Defaults.py.in
+++ b/Mailman/Defaults.py.in
@@ -153,6 +153,13 @@ ACCEPTABLE_LISTNAME_CHARACTERS = '[-+_.=a-z0-9]'
# 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
+
#####
diff --git a/Mailman/i18n.py b/Mailman/i18n.py
index 102bee83..b8b527e0 100644
--- a/Mailman/i18n.py
+++ b/Mailman/i18n.py
@@ -33,7 +33,8 @@ def _get_ctype_charset():
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 @@ def tolocale(s):
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):
diff --git a/NEWS b/NEWS
index c7092b8b..1047b272 100644
--- a/NEWS
+++ b/NEWS
@@ -39,7 +39,10 @@ Here is a history of user visible changes to Mailman.
- 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.