Blame SOURCES/mailman-2.1.9-LC_CTYPE.patch

49da8b
diff --git a/Mailman/MTA/Manual.py b/Mailman/MTA/Manual.py
49da8b
index 92e1c03..0abde2e 100644
49da8b
--- a/Mailman/MTA/Manual.py
49da8b
+++ b/Mailman/MTA/Manual.py
49da8b
@@ -25,7 +25,7 @@ from Mailman import mm_cfg
49da8b
 from Mailman import Message
49da8b
 from Mailman import Utils
49da8b
 from Mailman.Queue.sbcache import get_switchboard
49da8b
-from Mailman.i18n import _
49da8b
+from Mailman.i18n import _, C_
49da8b
 from Mailman.MTA.Utils import makealiases
49da8b
 
49da8b
 try:
49da8b
@@ -74,12 +74,12 @@ Here are the entries for the /etc/aliases file:
49da8b
         outfp = sfp
49da8b
     else:
49da8b
         if not quiet:
49da8b
-            print _("""\
49da8b
+            print C_("""\
49da8b
 To finish creating your mailing list, you must edit your /etc/aliases (or
49da8b
 equivalent) file by adding the following lines, and possibly running the
49da8b
 `newaliases' program:
49da8b
 """)
49da8b
-        print _("""\
49da8b
+        print C_("""\
49da8b
 ## %(listname)s mailing list""")
49da8b
         outfp = sys.stdout
49da8b
     # Common path
49da8b
@@ -120,7 +120,7 @@ Here are the entries in the /etc/aliases file that should be removed:
49da8b
 """)
49da8b
         outfp = sfp
49da8b
     else:
49da8b
-        print _("""
49da8b
+        print C_("""
49da8b
 To finish removing your mailing list, you must edit your /etc/aliases (or
49da8b
 equivalent) file by removing the following lines, and possibly running the
49da8b
 `newaliases' program:
49da8b
diff --git a/Mailman/MTA/Postfix.py b/Mailman/MTA/Postfix.py
49da8b
index 8506b9b..d7a2d06 100644
49da8b
--- a/Mailman/MTA/Postfix.py
49da8b
+++ b/Mailman/MTA/Postfix.py
49da8b
@@ -27,7 +27,7 @@ from stat import *
49da8b
 from Mailman import mm_cfg
49da8b
 from Mailman import Utils
49da8b
 from Mailman import LockFile
49da8b
-from Mailman.i18n import _
49da8b
+from Mailman.i18n import C_
49da8b
 from Mailman.MTA.Utils import makealiases
49da8b
 from Mailman.Logging.Syslog import syslog
49da8b
 
49da8b
@@ -317,7 +317,7 @@ def checkperms(state):
49da8b
     targetmode = S_IFREG | S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP
49da8b
     for file in ALIASFILE, VIRTFILE:
49da8b
         if state.VERBOSE:
49da8b
-            print _('checking permissions on %(file)s')
49da8b
+            print C_('checking permissions on %(file)s')
49da8b
         stat = None
49da8b
         try:
49da8b
             stat = os.stat(file)
49da8b
@@ -327,9 +327,9 @@ def checkperms(state):
49da8b
         if stat and (stat[ST_MODE] & targetmode) <> targetmode:
49da8b
             state.ERRORS += 1
49da8b
             octmode = oct(stat[ST_MODE])
49da8b
-            print _('%(file)s permissions must be 066x (got %(octmode)s)'),
49da8b
+            print C_('%(file)s permissions must be 066x (got %(octmode)s)'),
49da8b
             if state.FIX:
49da8b
-                print _('(fixing)')
49da8b
+                print C_('(fixing)')
49da8b
                 os.chmod(file, stat[ST_MODE] | targetmode)
49da8b
             else:
49da8b
                 print
49da8b
@@ -345,7 +345,7 @@ def checkperms(state):
49da8b
                 raise
49da8b
             continue
49da8b
         if state.VERBOSE:
49da8b
-            print _('checking ownership of %(dbfile)s')
49da8b
+            print C_('checking ownership of %(dbfile)s')
49da8b
         user = mm_cfg.MAILMAN_USER
49da8b
         ownerok = stat[ST_UID] == pwd.getpwnam(user)[2]
49da8b
         if not ownerok:
49da8b
@@ -353,10 +353,10 @@ def checkperms(state):
49da8b
                 owner = pwd.getpwuid(stat[ST_UID])[0]
49da8b
             except KeyError:
49da8b
                 owner = 'uid %d' % stat[ST_UID]
49da8b
-            print _('%(dbfile)s owned by %(owner)s (must be owned by %(user)s'),
49da8b
+            print C_('%(dbfile)s owned by %(owner)s (must be owned by %(user)s'),
49da8b
             state.ERRORS += 1
49da8b
             if state.FIX:
49da8b
-                print _('(fixing)')
49da8b
+                print C_('(fixing)')
49da8b
                 uid = pwd.getpwnam(user)[2]
49da8b
                 gid = grp.getgrnam(mm_cfg.MAILMAN_GROUP)[2]
49da8b
                 os.chown(dbfile, uid, gid)
49da8b
diff --git a/Mailman/i18n.py b/Mailman/i18n.py
49da8b
index 5f926b7..0cfdb99 100644
49da8b
--- a/Mailman/i18n.py
49da8b
+++ b/Mailman/i18n.py
49da8b
@@ -15,6 +15,7 @@
49da8b
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
49da8b
 # USA.
49da8b
 
49da8b
+import locale
49da8b
 import sys
49da8b
 import time
49da8b
 import gettext
49da8b
@@ -25,6 +26,15 @@ from Mailman.SafeDict import SafeDict
49da8b
 
49da8b
 _translation = None
49da8b
 
49da8b
+
49da8b
+def _get_ctype_charset():
49da8b
+    old = locale.setlocale(locale.LC_CTYPE, '')
49da8b
+    charset = locale.nl_langinfo(locale.CODESET)
49da8b
+    locale.setlocale(locale.LC_CTYPE, old)
49da8b
+    return charset
49da8b
+
49da8b
+_ctype_charset = _get_ctype_charset()
49da8b
+
49da8b
 
49da8b
 
49da8b
 def set_language(language=None):
49da8b
@@ -54,7 +64,7 @@ if _translation is None:
49da8b
 
49da8b
 
49da8b
 
49da8b
-def _(s):
49da8b
+def _(s, frame = 1):
49da8b
     if s == '':
49da8b
         return s
49da8b
     assert s
49da8b
@@ -70,7 +80,7 @@ def _(s):
49da8b
     # original string is 1) locals dictionary, 2) globals dictionary.
49da8b
     #
49da8b
     # First, get the frame of the caller
49da8b
-    frame = sys._getframe(1)
49da8b
+    frame = sys._getframe(frame)
49da8b
     # A `safe' dictionary is used so we won't get an exception if there's a
49da8b
     # missing key in the dictionary.
49da8b
     dict = SafeDict(frame.f_globals.copy())
49da8b
@@ -95,6 +105,19 @@ def _(s):
49da8b
 
49da8b
 
49da8b
 
49da8b
+def tolocale(s):
49da8b
+    global _ctype_charset
49da8b
+    if isinstance(s, UnicodeType):
49da8b
+        return s
49da8b
+    source = _translation.charset ()
49da8b
+    if not source:
49da8b
+        return s
49da8b
+    return unicode(s, source, 'replace').encode(_ctype_charset, 'replace')
49da8b
+
49da8b
+def C_(s):
49da8b
+    return tolocale(_(s, 2))
49da8b
+    
49da8b
+
49da8b
 def ctime(date):
49da8b
     # Don't make these module globals since we have to do runtime translation
49da8b
     # of the strings anyway.
49da8b
diff --git a/bin/add_members b/bin/add_members
49da8b
index 77f11af..763ee16 100755
49da8b
--- a/bin/add_members
49da8b
+++ b/bin/add_members
49da8b
@@ -81,6 +81,7 @@ from Mailman import mm_cfg
49da8b
 from Mailman import i18n
49da8b
 
49da8b
 _ = i18n._
49da8b
+C_ = i18n.C_
49da8b
 
49da8b
 
49da8b
 
49da8b
@@ -89,7 +90,7 @@ def usage(status, msg=''):
49da8b
         fd = sys.stderr
49da8b
     else:
49da8b
         fd = sys.stdout
49da8b
-    print >> fd, _(__doc__)
49da8b
+    print >> fd, C_(__doc__)
49da8b
     if msg:
49da8b
         print >> fd, msg
49da8b
     sys.exit(status)
49da8b
@@ -116,7 +117,7 @@ class Tee:
49da8b
         self.__outfp = outfp
49da8b
 
49da8b
     def write(self, msg):
49da8b
-        sys.stdout.write(msg)
49da8b
+        sys.stdout.write(i18n.tolocale(msg))
49da8b
         self.__outfp.write(msg)
49da8b
 
49da8b
 
49da8b
@@ -191,26 +192,26 @@ def main():
49da8b
             elif arg.lower()[0] == 'n':
49da8b
                 send_welcome_msg = 0
49da8b
             else:
49da8b
-                usage(1, _('Bad argument to -w/--welcome-msg: %(arg)s'))
49da8b
+                usage(1, C_('Bad argument to -w/--welcome-msg: %(arg)s'))
49da8b
         elif opt in ('-a', '--admin-notify'):
49da8b
             if arg.lower()[0] == 'y':
49da8b
                 admin_notif = 1
49da8b
             elif arg.lower()[0] == 'n':
49da8b
                 admin_notif = 0
49da8b
             else:
49da8b
-                usage(1, _('Bad argument to -a/--admin-notify: %(arg)s'))
49da8b
+                usage(1, C_('Bad argument to -a/--admin-notify: %(arg)s'))
49da8b
 
49da8b
     if dfile is None and nfile is None:
49da8b
         usage(1)
49da8b
 
49da8b
     if dfile == "-" and nfile == "-":
49da8b
-        usage(1, _('Cannot read both digest and normal members '
49da8b
-                   'from standard input.'))
49da8b
+        usage(1, C_('Cannot read both digest and normal members '
49da8b
+                    'from standard input.'))
49da8b
 
49da8b
     try:
49da8b
         mlist = MailList.MailList(listname)
49da8b
     except Errors.MMUnknownListError:
49da8b
-        usage(1, _('No such list: %(listname)s'))
49da8b
+        usage(1, C_('No such list: %(listname)s'))
49da8b
 
49da8b
     # Set up defaults
49da8b
     if send_welcome_msg is None:
49da8b
@@ -230,7 +231,7 @@ def main():
49da8b
             nmembers = readfile(nfile)
49da8b
 
49da8b
         if not dmembers and not nmembers:
49da8b
-            usage(0, _('Nothing to do.'))
49da8b
+            usage(0, C_('Nothing to do.'))
49da8b
 
49da8b
         s = StringIO()
49da8b
         i18n.set_language(mlist.preferred_language)
49da8b
diff --git a/bin/arch b/bin/arch
49da8b
index a98ae2a..8fdca6a 100644
49da8b
--- a/bin/arch
49da8b
+++ b/bin/arch
49da8b
@@ -70,7 +70,7 @@ from Mailman.Archiver.HyperArch import HyperArchive
49da8b
 from Mailman.LockFile import LockFile
49da8b
 from Mailman import i18n
49da8b
 
49da8b
-_ = i18n._
49da8b
+C_ = i18n.C_
49da8b
 
49da8b
 PROGRAM = sys.argv[0]
49da8b
 i18n.set_language(mm_cfg.DEFAULT_SERVER_LANGUAGE)
49da8b
@@ -82,7 +82,7 @@ def usage(code, msg=''):
49da8b
         fd = sys.stderr
49da8b
     else:
49da8b
         fd = sys.stdout
49da8b
-    print >> fd, _(__doc__)
49da8b
+    print >> fd, C_(__doc__)
49da8b
     if msg:
49da8b
         print >> fd, msg
49da8b
     sys.exit(code)
49da8b
@@ -122,7 +122,7 @@ def main():
49da8b
 
49da8b
     # grok arguments
49da8b
     if len(args) < 1:
49da8b
-        usage(1, _('listname is required'))
49da8b
+        usage(1, C_('listname is required'))
49da8b
     listname = args[0].lower().strip()
49da8b
 
49da8b
     if len(args) < 2:
49da8b
@@ -140,7 +140,7 @@ def main():
49da8b
         try:
49da8b
             mlist = MailList(listname)
49da8b
         except Errors.MMListError, e:
49da8b
-            usage(2, _('No such list "%(listname)s"\n%(e)s'))
49da8b
+            usage(2, C_('No such list "%(listname)s"\n%(e)s'))
49da8b
         if mbox is None:
49da8b
             mbox = mlist.ArchiveFileName()
49da8b
 
49da8b
@@ -165,7 +165,7 @@ def main():
49da8b
         try:
49da8b
             fp = open(mbox)
49da8b
         except IOError, msg:
49da8b
-            usage(3, _('Cannot open mbox file %(mbox)s: %(msg)s'))
49da8b
+            usage(3, C_('Cannot open mbox file %(mbox)s: %(msg)s'))
49da8b
         # Maybe wipe the old archives
49da8b
         if wipe:
49da8b
             if mlist.scrub_nondigest:
49da8b
diff --git a/bin/b4b5-archfix b/bin/b4b5-archfix
49da8b
index 1bdaeda..22d8839 100644
49da8b
--- a/bin/b4b5-archfix
49da8b
+++ b/bin/b4b5-archfix
49da8b
@@ -44,7 +44,7 @@ import cPickle as pickle
49da8b
 
49da8b
 # Required to get the right classes for unpickling
49da8b
 import paths
49da8b
-from Mailman.i18n import _
49da8b
+from Mailman.i18n import C_
49da8b
 
49da8b
 PROGRAM = sys.argv[0]
49da8b
 
49da8b
@@ -55,7 +55,7 @@ def usage(code, msg=''):
49da8b
         fd = sys.stderr
49da8b
     else:
49da8b
         fd = sys.stdout
49da8b
-    print >> fd, _(__doc__)
49da8b
+    print >> fd, C_(__doc__)
49da8b
     if msg:
49da8b
         print >> fd, msg
49da8b
     sys.exit(code)
49da8b
diff --git a/bin/change_pw b/bin/change_pw
49da8b
index 67d5639..35be13d 100644
49da8b
--- a/bin/change_pw
49da8b
+++ b/bin/change_pw
49da8b
@@ -77,6 +77,7 @@ from Mailman import Message
49da8b
 from Mailman import i18n
49da8b
 
49da8b
 _ = i18n._
49da8b
+C_ = i18n.C_
49da8b
 
49da8b
 SPACE = ' '
49da8b
 
49da8b
@@ -87,7 +88,7 @@ def usage(code, msg=''):
49da8b
         fd = sys.stderr
49da8b
     else:
49da8b
         fd = sys.stdout
49da8b
-    print >> fd, _(__doc__)
49da8b
+    print >> fd, C_(__doc__)
49da8b
     if msg:
49da8b
         print >> fd, msg
49da8b
     sys.exit(code)
49da8b
@@ -103,7 +104,7 @@ def openlist(listname):
49da8b
         try:
49da8b
             mlist = MailList.MailList(listname, lock=0)
49da8b
         except Errors.MMListError, e:
49da8b
-            usage(1, _('No such list "%(listname)s"\n%(e)s'))
49da8b
+            usage(1, C_('No such list "%(listname)s"\n%(e)s'))
49da8b
         _listcache[listname] = mlist
49da8b
     return mlist
49da8b
 
49da8b
@@ -155,7 +156,7 @@ def main():
49da8b
                 listnames[name] = 1
49da8b
 
49da8b
     if not listnames:
49da8b
-        print >> sys.stderr, _('Nothing to do.')
49da8b
+        print >> sys.stderr, C_('Nothing to do.')
49da8b
         sys.exit(0)
49da8b
 
49da8b
     # Set the password on the lists
49da8b
@@ -177,7 +178,7 @@ def main():
49da8b
             mlist.Unlock()
49da8b
 
49da8b
         # Notification
49da8b
-        print _('New %(listname)s password: %(notifypassword)s')
49da8b
+        print C_('New %(listname)s password: %(notifypassword)s')
49da8b
         if not quiet:
49da8b
             otrans = i18n.get_translation()
49da8b
             i18n.set_language(mlist.preferred_language)
49da8b
diff --git a/bin/check_db b/bin/check_db
49da8b
index b1157bc..40fa0a2 100755
49da8b
--- a/bin/check_db
49da8b
+++ b/bin/check_db
49da8b
@@ -59,7 +59,7 @@ import paths
49da8b
 from Mailman import mm_cfg
49da8b
 from Mailman import Utils
49da8b
 from Mailman.MailList import MailList
49da8b
-from Mailman.i18n import _
49da8b
+from Mailman.i18n import C_
49da8b
 
49da8b
 PROGRAM = sys.argv[0]
49da8b
 
49da8b
@@ -70,7 +70,7 @@ def usage(code, msg=''):
49da8b
         fd = sys.stderr
49da8b
     else:
49da8b
         fd = sys.stdout
49da8b
-    print >> fd, _(__doc__)
49da8b
+    print >> fd, C_(__doc__)
49da8b
     if msg:
49da8b
         print >> fd, msg
49da8b
     sys.exit(code)
49da8b
@@ -111,12 +111,12 @@ def main():
49da8b
 
49da8b
     listnames = [n.lower().strip() for n in listnames]
49da8b
     if not listnames:
49da8b
-        print _('Nothing to do.')
49da8b
+        print C_('Nothing to do.')
49da8b
         sys.exit(0)
49da8b
 
49da8b
     for listname in listnames:
49da8b
         if not Utils.list_exists(listname):
49da8b
-            print _('No list named:'), listname
49da8b
+            print C_('No list named:'), listname
49da8b
             continue
49da8b
         mlist = MailList(listname, lock=0)
49da8b
         pfile = os.path.join(mlist.fullpath(), 'config.pck')
49da8b
@@ -125,7 +125,7 @@ def main():
49da8b
         dlast = dfile + '.last'
49da8b
 
49da8b
         if verbose:
49da8b
-            print _('List:'), listname
49da8b
+            print C_('List:'), listname
49da8b
 
49da8b
         for file in (pfile, plast, dfile, dlast):
49da8b
             status = 0
49da8b
@@ -145,7 +145,7 @@ def main():
49da8b
                 else:
49da8b
                     print '    %s: %s' % (file, status)
49da8b
             elif verbose:
49da8b
-                print _('   %(file)s: okay')
49da8b
+                print C_('   %(file)s: okay')
49da8b
 
49da8b
 
49da8b
 
49da8b
diff --git a/bin/check_perms b/bin/check_perms
49da8b
index 1f45f84..f0c6795 100755
49da8b
--- a/bin/check_perms
49da8b
+++ b/bin/check_perms
49da8b
@@ -45,7 +45,7 @@ directory.  You must run this from the installation directory instead.
49da8b
     raise
49da8b
 from Mailman import mm_cfg
49da8b
 from Mailman.mm_cfg import MAILMAN_USER, MAILMAN_GROUP
49da8b
-from Mailman.i18n import _
49da8b
+from Mailman.i18n import C_
49da8b
 
49da8b
 # Let KeyErrors percolate
49da8b
 MAILMAN_GID = grp.getgrnam(MAILMAN_GROUP)[2]
49da8b
@@ -107,7 +107,7 @@ def checkwalk(arg, dirname, names):
49da8b
     for name in names:
49da8b
         path = os.path.join(dirname, name)
49da8b
         if arg.VERBOSE:
49da8b
-            print _('    checking gid and mode for %(path)s')
49da8b
+            print C_('    checking gid and mode for %(path)s')
49da8b
         try:
49da8b
             mode, gid = statgidmode(path)
49da8b
         except OSError, e:
49da8b
@@ -119,10 +119,10 @@ def checkwalk(arg, dirname, names):
49da8b
             except KeyError:
49da8b
                 groupname = '<anon gid %d>' % gid
49da8b
             arg.ERRORS += 1
49da8b
-            print _('%(path)s bad group (has: %(groupname)s, '
49da8b
-                    'expected %(MAILMAN_GROUP)s)'),
49da8b
+            print C_('%(path)s bad group (has: %(groupname)s, '
49da8b
+                     'expected %(MAILMAN_GROUP)s)'),
49da8b
             if STATE.FIX:
49da8b
-                print _('(fixing)')
49da8b
+                print C_('(fixing)')
49da8b
                 os.chown(path, -1, MAILMAN_GID)
49da8b
             else:
49da8b
                 print
49da8b
@@ -148,19 +148,19 @@ def checkwalk(arg, dirname, names):
49da8b
         octperms = oct(targetperms)
49da8b
         if S_ISDIR(mode) and (mode & targetperms) <> targetperms:
49da8b
             arg.ERRORS += 1
49da8b
-            print _('directory permissions must be %(octperms)s: %(path)s'),
49da8b
+            print C_('directory permissions must be %(octperms)s: %(path)s'),
49da8b
             if STATE.FIX:
49da8b
-                print _('(fixing)')
49da8b
+                print C_('(fixing)')
49da8b
                 os.chmod(path, mode | targetperms)
49da8b
             else:
49da8b
                 print
49da8b
         elif os.path.splitext(path)[1] in ('.py', '.pyc', '.pyo'):
49da8b
             octperms = oct(PYFILEPERMS)
49da8b
             if mode & PYFILEPERMS <> PYFILEPERMS:
49da8b
-                print _('source perms must be %(octperms)s: %(path)s'),
49da8b
+                print C_('source perms must be %(octperms)s: %(path)s'),
49da8b
                 arg.ERRORS += 1
49da8b
                 if STATE.FIX:
49da8b
-                    print _('(fixing)')
49da8b
+                    print C_('(fixing)')
49da8b
                     os.chmod(path, mode | PYFILEPERMS)
49da8b
                 else:
49da8b
                     print
49da8b
@@ -168,10 +168,10 @@ def checkwalk(arg, dirname, names):
49da8b
             # Article files must be group writeable
49da8b
             octperms = oct(ARTICLEFILEPERMS)
49da8b
             if mode & ARTICLEFILEPERMS <> ARTICLEFILEPERMS:
49da8b
-                print _('article db files must be %(octperms)s: %(path)s'),
49da8b
+                print C_('article db files must be %(octperms)s: %(path)s'),
49da8b
                 arg.ERRORS += 1
49da8b
                 if STATE.FIX:
49da8b
-                    print _('(fixing)')
49da8b
+                    print C_('(fixing)')
49da8b
                     os.chmod(path, mode | ARTICLEFILEPERMS)
49da8b
                 else:
49da8b
                     print
49da8b
@@ -180,7 +180,7 @@ def checkall():
49da8b
     # first check PREFIX
49da8b
     if STATE.VERBOSE:
49da8b
         prefix = mm_cfg.PREFIX
49da8b
-        print _('checking mode for %(prefix)s')
49da8b
+        print C_('checking mode for %(prefix)s')
49da8b
     dirs = {}
49da8b
     for d in (mm_cfg.PREFIX, mm_cfg.EXEC_PREFIX, mm_cfg.VAR_PREFIX,
49da8b
               mm_cfg.CONFIG_DIR, mm_cfg.DATA_DIR, mm_cfg.LOCK_DIR,
49da8b
@@ -191,13 +191,13 @@ def checkall():
49da8b
             mode = statmode(d)
49da8b
         except OSError, e:
49da8b
             if e.errno <> errno.ENOENT: raise
49da8b
-            print _('WARNING: directory does not exist: %(d)s')
49da8b
+            print C_('WARNING: directory does not exist: %(d)s')
49da8b
             continue
49da8b
         if (mode & DIRPERMS) <> DIRPERMS:
49da8b
             STATE.ERRORS += 1
49da8b
-            print _('directory must be at least 02775: %(d)s'),
49da8b
+            print C_('directory must be at least 02775: %(d)s'),
49da8b
             if STATE.FIX:
49da8b
-                print _('(fixing)')
49da8b
+                print C_('(fixing)')
49da8b
                 os.chmod(d, mode | DIRPERMS)
49da8b
             else:
49da8b
                 print
49da8b
@@ -207,14 +207,14 @@ def checkall():
49da8b
 def checkarchives():
49da8b
     private = mm_cfg.PRIVATE_ARCHIVE_FILE_DIR
49da8b
     if STATE.VERBOSE:
49da8b
-        print _('checking perms on %(private)s')
49da8b
+        print C_('checking perms on %(private)s')
49da8b
     # private archives must not be other readable
49da8b
     mode = statmode(private)
49da8b
     if mode & S_IROTH:
49da8b
         STATE.ERRORS += 1
49da8b
-        print _('%(private)s must not be other-readable'),
49da8b
+        print C_('%(private)s must not be other-readable'),
49da8b
         if STATE.FIX:
49da8b
-            print _('(fixing)')
49da8b
+            print C_('(fixing)')
49da8b
             os.chmod(private, mode & ~S_IROTH)
49da8b
         else:
49da8b
             print
49da8b
@@ -238,9 +238,9 @@ def checkmboxfile(mboxdir):
49da8b
         mode = statmode(mboxfile)
49da8b
         if (mode & MBOXPERMS) <> MBOXPERMS:
49da8b
             STATE.ERRORS = STATE.ERRORS + 1
49da8b
-            print _('mbox file must be at least 0660:'), mboxfile
49da8b
+            print C_('mbox file must be at least 0660:'), mboxfile
49da8b
             if STATE.FIX:
49da8b
-                print _('(fixing)')
49da8b
+                print C_('(fixing)')
49da8b
                 os.chmod(mboxfile, mode | MBOXPERMS)
49da8b
             else:
49da8b
                 print
49da8b
@@ -261,9 +261,9 @@ def checkarchivedbs():
49da8b
             continue
49da8b
         if mode & S_IRWXO:
49da8b
             STATE.ERRORS += 1
49da8b
-            print _('%(dbdir)s "other" perms must be 000'),
49da8b
+            print C_('%(dbdir)s "other" perms must be 000'),
49da8b
             if STATE.FIX:
49da8b
-                print _('(fixing)')
49da8b
+                print C_('(fixing)')
49da8b
                 os.chmod(dbdir, mode & ~S_IRWXO)
49da8b
             else:
49da8b
                 print
49da8b
@@ -271,18 +271,18 @@ def checkarchivedbs():
49da8b
 def checkcgi():
49da8b
     cgidir = os.path.join(mm_cfg.EXEC_PREFIX, 'cgi-bin')
49da8b
     if STATE.VERBOSE:
49da8b
-        print _('checking cgi-bin permissions')
49da8b
+        print C_('checking cgi-bin permissions')
49da8b
     exes = os.listdir(cgidir)
49da8b
     for f in exes:
49da8b
         path = os.path.join(cgidir, f)
49da8b
         if STATE.VERBOSE:
49da8b
-            print _('    checking set-gid for %(path)s')
49da8b
+            print C_('    checking set-gid for %(path)s')
49da8b
         mode = statmode(path)
49da8b
         if mode & S_IXGRP and not mode & S_ISGID:
49da8b
             STATE.ERRORS += 1
49da8b
-            print _('%(path)s must be set-gid'),
49da8b
+            print C_('%(path)s must be set-gid'),
49da8b
             if STATE.FIX:
49da8b
-                print _('(fixing)')
49da8b
+                print C_('(fixing)')
49da8b
                 os.chmod(path, mode | S_ISGID)
49da8b
             else:
49da8b
                 print
49da8b
@@ -290,13 +290,13 @@ def checkcgi():
49da8b
 def checkmail():
49da8b
     wrapper = os.path.join(mm_cfg.WRAPPER_DIR, 'mailman')
49da8b
     if STATE.VERBOSE:
49da8b
-        print _('checking set-gid for %(wrapper)s')
49da8b
+        print C_('checking set-gid for %(wrapper)s')
49da8b
     mode = statmode(wrapper)
49da8b
     if not mode & S_ISGID:
49da8b
         STATE.ERRORS += 1
49da8b
-        print _('%(wrapper)s must be set-gid'),
49da8b
+        print C_('%(wrapper)s must be set-gid'),
49da8b
         if STATE.FIX:
49da8b
-            print _('(fixing)')
49da8b
+            print C_('(fixing)')
49da8b
             os.chmod(wrapper, mode | S_ISGID)
49da8b
 
49da8b
 def checkadminpw():
49da8b
@@ -304,7 +304,7 @@ def checkadminpw():
49da8b
                    os.path.join(mm_cfg.DATA_DIR, 'creator.pw')):
49da8b
         targetmode = S_IFREG | S_IRUSR | S_IWUSR | S_IRGRP
49da8b
         if STATE.VERBOSE:
49da8b
-            print _('checking permissions on %(pwfile)s')
49da8b
+            print C_('checking permissions on %(pwfile)s')
49da8b
         try:
49da8b
             mode = statmode(pwfile)
49da8b
         except OSError, e:
49da8b
@@ -313,10 +313,10 @@ def checkadminpw():
49da8b
         if mode <> targetmode:
49da8b
             STATE.ERRORS += 1
49da8b
             octmode = oct(mode)
49da8b
-            print _('%(pwfile)s permissions must be exactly 0640 '
49da8b
-                    '(got %(octmode)s)'),
49da8b
+            print C_('%(pwfile)s permissions must be exactly 0640 '
49da8b
+                     '(got %(octmode)s)'),
49da8b
             if STATE.FIX:
49da8b
-                print _('(fixing)')
49da8b
+                print C_('(fixing)')
49da8b
                 os.chmod(pwfile, targetmode)
49da8b
             else:
49da8b
                 print
49da8b
@@ -338,7 +338,7 @@ def checkdata():
49da8b
                   'digest.mbox', 'pending.pck',
49da8b
                   'request.db', 'request.db.tmp')
49da8b
     if STATE.VERBOSE:
49da8b
-        print _('checking permissions on list data')
49da8b
+        print C_('checking permissions on list data')
49da8b
     # BAW: This needs to be converted to the Site module abstraction
49da8b
     for dir in os.listdir(mm_cfg.LIST_DATA_DIR):
49da8b
         if not os.path.isdir(os.path.join(mm_cfg.LIST_DATA_DIR, dir)):
49da8b
@@ -346,7 +346,7 @@ def checkdata():
49da8b
         for file in checkfiles:
49da8b
             path = os.path.join(mm_cfg.LIST_DATA_DIR, dir, file)
49da8b
             if STATE.VERBOSE:
49da8b
-                print _('    checking permissions on: %(path)s')
49da8b
+                print C_('    checking permissions on: %(path)s')
49da8b
             try:
49da8b
                 mode = statmode(path)
49da8b
             except OSError, e:
49da8b
@@ -354,9 +354,9 @@ def checkdata():
49da8b
                 continue
49da8b
             if (mode & targetmode) <> targetmode:
49da8b
                 STATE.ERRORS += 1
49da8b
-                print _('file permissions must be at least 660: %(path)s'),
49da8b
+                print C_('file permissions must be at least 660: %(path)s'),
49da8b
                 if STATE.FIX:
49da8b
-                    print _('(fixing)')
49da8b
+                    print C_('(fixing)')
49da8b
                     os.chmod(path, mode | targetmode)
49da8b
                 else:
49da8b
                     print
49da8b
@@ -368,7 +368,7 @@ def usage(code, msg=''):
49da8b
         fd = sys.stderr
49da8b
     else:
49da8b
         fd = sys.stdout
49da8b
-    print >> fd, _(__doc__)
49da8b
+    print >> fd, C_(__doc__)
49da8b
     if msg:
49da8b
         print >> fd, msg
49da8b
     sys.exit(code)
49da8b
@@ -399,7 +399,7 @@ if __name__ == '__main__':
49da8b
     checkmta()
49da8b
 
49da8b
     if not STATE.ERRORS:
49da8b
-        print _('No problems found')
49da8b
+        print C_('No problems found')
49da8b
     else:
49da8b
-        print _('Problems found:'), STATE.ERRORS
49da8b
-        print _('Re-run as %(MAILMAN_USER)s (or root) with -f flag to fix')
49da8b
+        print C_('Problems found:'), STATE.ERRORS
49da8b
+        print C_('Re-run as %(MAILMAN_USER)s (or root) with -f flag to fix')
49da8b
diff --git a/bin/cleanarch b/bin/cleanarch
49da8b
index a848533..0994bca 100644
49da8b
--- a/bin/cleanarch
49da8b
+++ b/bin/cleanarch
49da8b
@@ -53,7 +53,7 @@ import getopt
49da8b
 import mailbox
49da8b
 
49da8b
 import paths
49da8b
-from Mailman.i18n import _
49da8b
+from Mailman.i18n import C_
49da8b
 
49da8b
 cre = re.compile(mailbox.UnixMailbox._fromlinepattern)
49da8b
 
49da8b
@@ -69,7 +69,7 @@ def usage(code, msg=''):
49da8b
         fd = sys.stderr
49da8b
     else:
49da8b
         fd = sys.stdout
49da8b
-    print >> fd, _(__doc__)
49da8b
+    print >> fd, C_(__doc__)
49da8b
     if msg:
49da8b
         print >> fd, msg
49da8b
     sys.exit(code)
49da8b
@@ -80,7 +80,7 @@ def escape_line(line, lineno, quiet, output):
49da8b
     if output:
49da8b
         sys.stdout.write('>' + line)
49da8b
     if not quiet:
49da8b
-        print >> sys.stderr, _('Unix-From line changed: %(lineno)d')
49da8b
+        print >> sys.stderr, C_('Unix-From line changed: %(lineno)d')
49da8b
         print >> sys.stderr, line[:-1]
49da8b
 
49da8b
 
49da8b
@@ -108,7 +108,7 @@ def main():
49da8b
             try:
49da8b
                 status = int(arg)
49da8b
             except ValueError:
49da8b
-                usage(1, _('Bad status number: %(arg)s'))
49da8b
+                usage(1, C_('Bad status number: %(arg)s'))
49da8b
 
49da8b
     if args:
49da8b
         usage(1)
49da8b
@@ -164,7 +164,7 @@ def main():
49da8b
                 print >> sys.stderr
49da8b
                 statuscnt = 0
49da8b
         prevline = line
49da8b
-    print >> sys.stderr, _('%(messages)d messages found')
49da8b
+    print >> sys.stderr, C_('%(messages)d messages found')
49da8b
 
49da8b
 
49da8b
 
49da8b
diff --git a/bin/clone_member b/bin/clone_member
49da8b
index 915c540..d9ff224 100755
49da8b
--- a/bin/clone_member
49da8b
+++ b/bin/clone_member
49da8b
@@ -72,7 +72,7 @@ import paths
49da8b
 from Mailman import MailList
49da8b
 from Mailman import Utils
49da8b
 from Mailman import Errors
49da8b
-from Mailman.i18n import _
49da8b
+from Mailman.i18n import C_
49da8b
 
49da8b
 
49da8b
 
49da8b
@@ -81,7 +81,7 @@ def usage(code, msg=''):
49da8b
         fd = sys.stderr
49da8b
     else:
49da8b
         fd = sys.stdout
49da8b
-    print >> fd, _(__doc__)
49da8b
+    print >> fd, C_(__doc__)
49da8b
     if msg:
49da8b
         print >> fd, msg
49da8b
     sys.exit(code)
49da8b
@@ -91,14 +91,14 @@ def usage(code, msg=''):
49da8b
 def dolist(mlist, options):
49da8b
     SPACE = ' '
49da8b
     if not options.quiet:
49da8b
-        print _('processing mailing list:'), mlist.internal_name()
49da8b
+        print C_('processing mailing list:'), mlist.internal_name()
49da8b
 
49da8b
     # scan the list owners.  TBD: mlist.owner keys should be lowercase?
49da8b
     oldowners = mlist.owner[:]
49da8b
     oldowners.sort()
49da8b
     if options.admintoo:
49da8b
         if not options.quiet:
49da8b
-            print _('    scanning list owners:'), SPACE.join(oldowners)
49da8b
+            print C_('    scanning list owners:'), SPACE.join(oldowners)
49da8b
         newowners = {}
49da8b
         foundp = 0
49da8b
         for owner in mlist.owner:
49da8b
@@ -116,9 +116,9 @@ def dolist(mlist, options):
49da8b
         if not options.quiet:
49da8b
             if newowners <> oldowners:
49da8b
                 print
49da8b
-                print _('    new list owners:'), SPACE.join(newowners)
49da8b
+                print C_('    new list owners:'), SPACE.join(newowners)
49da8b
             else:
49da8b
-                print _('(no change)')
49da8b
+                print C_('(no change)')
49da8b
 
49da8b
     # see if the fromaddr is a digest member or regular member
49da8b
     if options.lfromaddr in mlist.getDigestMemberKeys():
49da8b
@@ -127,7 +127,7 @@ def dolist(mlist, options):
49da8b
         digest = 0
49da8b
     else:
49da8b
         if not options.quiet:
49da8b
-            print _('    address not found:'), options.fromaddr
49da8b
+            print C_('    address not found:'), options.fromaddr
49da8b
         return
49da8b
     # Check for banned to address.
49da8b
     pattern = mlist.GetBannedPattern(options.toaddr)
49da8b
@@ -142,13 +142,13 @@ def dolist(mlist, options):
49da8b
             mlist.changeMemberAddress(options.fromaddr, options.toaddr,
49da8b
                                       not options.remove)
49da8b
         if not options.quiet:
49da8b
-            print _('    clone address added:'), options.toaddr
49da8b
+            print C_('    clone address added:'), options.toaddr
49da8b
     except Errors.MMAlreadyAMember:
49da8b
         if not options.quiet:
49da8b
-            print _('    clone address is already a member:'), options.toaddr
49da8b
+            print C_('    clone address is already a member:'), options.toaddr
49da8b
 
49da8b
     if options.remove:
49da8b
-        print _('    original address removed:'), options.fromaddr
49da8b
+        print C_('    original address removed:'), options.fromaddr
49da8b
 
49da8b
 
49da8b
 
49da8b
@@ -199,7 +199,7 @@ def main():
49da8b
     try:
49da8b
         Utils.ValidateEmail(toaddr)
49da8b
     except Errors.EmailAddressError:
49da8b
-        usage(1, _('Not a valid email address: %(toaddr)s'))
49da8b
+        usage(1, C_('Not a valid email address: %(toaddr)s'))
49da8b
     lfromaddr = fromaddr.lower()
49da8b
     options.toaddr = toaddr
49da8b
     options.fromaddr = fromaddr
49da8b
@@ -212,7 +212,7 @@ def main():
49da8b
         try:
49da8b
             mlist = MailList.MailList(listname)
49da8b
         except Errors.MMListError, e:
49da8b
-            print _('Error opening list "%(listname)s", skipping.\n%(e)s')
49da8b
+            print C_('Error opening list "%(listname)s", skipping.\n%(e)s')
49da8b
             continue
49da8b
         try:
49da8b
             dolist(mlist, options)
49da8b
diff --git a/bin/config_list b/bin/config_list
49da8b
index 25d4fb6..e23dac2 100644
49da8b
--- a/bin/config_list
49da8b
+++ b/bin/config_list
49da8b
@@ -76,6 +76,7 @@ from Mailman import Errors
49da8b
 from Mailman import i18n
49da8b
 
49da8b
 _ = i18n._
49da8b
+C_ = i18n.C_
49da8b
 
49da8b
 NL = '\n'
49da8b
 nonasciipat = re.compile(r'[\x80-\xff]')
49da8b
@@ -87,7 +88,7 @@ def usage(code, msg=''):
49da8b
         fd = sys.stderr
49da8b
     else:
49da8b
         fd = sys.stdout
49da8b
-    print >> fd, _(__doc__)
49da8b
+    print >> fd, C_(__doc__)
49da8b
     if msg:
49da8b
         print >> fd, msg
49da8b
     sys.exit(code)
49da8b
@@ -106,7 +107,7 @@ def do_output(listname, outfile):
49da8b
         try:
49da8b
             mlist = MailList.MailList(listname, lock=0)
49da8b
         except Errors.MMListError:
49da8b
-            usage(1, _('No such list: %(listname)s'))
49da8b
+            usage(1, C_('No such list: %(listname)s'))
49da8b
         # Preamble for the config info. PEP263 charset and capture time.
49da8b
         language = mlist.preferred_language
49da8b
         charset = Utils.GetCharSet(language)
49da8b
@@ -114,7 +115,7 @@ def do_output(listname, outfile):
49da8b
         if not charset:
49da8b
             charset = 'us-ascii'
49da8b
         when = time.ctime(time.time())
49da8b
-        print >> outfp, _('''\
49da8b
+        print >> outfp, C_('''\
49da8b
 # -*- python -*-
49da8b
 # -*- coding: %(charset)s -*-
49da8b
 ## "%(listname)s" mailing list configuration settings
49da8b
@@ -140,7 +141,7 @@ def do_list_categories(mlist, k, subcat, outfp):
49da8b
     if info is None:
49da8b
         return
49da8b
     charset = Utils.GetCharSet(mlist.preferred_language)
49da8b
-    print >> outfp, '##', k.capitalize(), _('options')
49da8b
+    print >> outfp, '##', k.capitalize(), C_('options')
49da8b
     print >> outfp, '#'
49da8b
     # First, massage the descripton text, which could have obnoxious
49da8b
     # leading whitespace on second and subsequent lines due to
49da8b
@@ -199,7 +200,7 @@ def do_list_categories(mlist, k, subcat, outfp):
49da8b
                     outfp.write('"""\n')
49da8b
         elif vtype in (mm_cfg.Radio, mm_cfg.Toggle):
49da8b
             print >> outfp, '#'
49da8b
-            print >> outfp, '#', _('legal values are:')
49da8b
+            print >> outfp, '#', C_('legal values are:')
49da8b
             # TBD: This is disgusting, but it's special cased
49da8b
             # everywhere else anyway...
49da8b
             if varname == 'subscribe_policy' and \
49da8b
@@ -253,7 +254,7 @@ def do_input(listname, infile, checkonly, verbose):
49da8b
     try:
49da8b
         mlist = MailList.MailList(listname, lock=not checkonly)
49da8b
     except Errors.MMListError, e:
49da8b
-        usage(1, _('No such list "%(listname)s"\n%(e)s'))
49da8b
+        usage(1, C_('No such list "%(listname)s"\n%(e)s'))
49da8b
     savelist = 0
49da8b
     guibyprop = getPropertyMap(mlist)
49da8b
     try:
49da8b
@@ -266,16 +267,16 @@ def do_input(listname, infile, checkonly, verbose):
49da8b
             if k in ('mlist', '__builtins__'):
49da8b
                 continue
49da8b
             if not hasattr(mlist, k):
49da8b
-                print >> sys.stderr, _('attribute "%(k)s" ignored')
49da8b
+                print >> sys.stderr, C_('attribute "%(k)s" ignored')
49da8b
                 continue
49da8b
             if verbose:
49da8b
-                print >> sys.stderr, _('attribute "%(k)s" changed')
49da8b
+                print >> sys.stderr, C_('attribute "%(k)s" changed')
49da8b
             missing = []
49da8b
             gui, wtype = guibyprop.get(k, (missing, missing))
49da8b
             if gui is missing:
49da8b
                 # This isn't an official property of the list, but that's
49da8b
                 # okay, we'll just restore it the old fashioned way
49da8b
-                print >> sys.stderr, _('Non-standard property restored: %(k)s')
49da8b
+                print >> sys.stderr, C_('Non-standard property restored: %(k)s')
49da8b
                 setattr(mlist, k, v)
49da8b
             else:
49da8b
                 # BAW: This uses non-public methods.  This logic taken from
49da8b
@@ -283,9 +284,9 @@ def do_input(listname, infile, checkonly, verbose):
49da8b
                 try:
49da8b
                     validval = gui._getValidValue(mlist, k, wtype, v)
49da8b
                 except ValueError:
49da8b
-                    print >> sys.stderr, _('Invalid value for property: %(k)s')
49da8b
+                    print >> sys.stderr, C_('Invalid value for property: %(k)s')
49da8b
                 except Errors.EmailAddressError:
49da8b
-                    print >> sys.stderr, _(
49da8b
+                    print >> sys.stderr, C_(
49da8b
                         'Bad email address for option %(k)s: %(v)s')
49da8b
                 else:
49da8b
                     # BAW: Horrible hack, but then this is special cased
49da8b
@@ -342,13 +343,13 @@ def main():
49da8b
 
49da8b
     # sanity check
49da8b
     if infile is not None and outfile is not None:
49da8b
-        usage(1, _('Only one of -i or -o is allowed'))
49da8b
+        usage(1, C_('Only one of -i or -o is allowed'))
49da8b
     if infile is None and outfile is None:
49da8b
-        usage(1, _('One of -i or -o is required'))
49da8b
+        usage(1, C_('One of -i or -o is required'))
49da8b
 
49da8b
     # get the list name
49da8b
     if len(args) <> 1:
49da8b
-        usage(1, _('List name is required'))
49da8b
+        usage(1, C_('List name is required'))
49da8b
     listname = args[0].lower().strip()
49da8b
 
49da8b
     if outfile:
49da8b
diff --git a/bin/convert.py b/bin/convert.py
49da8b
index b0d6a05..ad7228b 100644
49da8b
--- a/bin/convert.py
49da8b
+++ b/bin/convert.py
49da8b
@@ -25,7 +25,7 @@ This script is intended to be run as a bin/withlist script, i.e.
49da8b
 
49da8b
 import paths
49da8b
 from Mailman import Utils
49da8b
-from Mailman.i18n import _
49da8b
+from Mailman.i18n import C_
49da8b
 
49da8b
 def convert(mlist):
49da8b
     for attr in ('msg_header', 'msg_footer', 'digest_header', 'digest_footer',
49da8b
@@ -35,10 +35,10 @@ def convert(mlist):
49da8b
         t = Utils.to_dollar(s)
49da8b
         setattr(mlist, attr, t)
49da8b
     mlist.use_dollar_strings = 1
49da8b
-    print _('Saving list')
49da8b
+    print C_('Saving list')
49da8b
     mlist.Save()
49da8b
 
49da8b
 
49da8b
 
49da8b
 if __name__ == '__main__':
49da8b
-    print _(__doc__.replace('%', '%%'))
49da8b
+    print C_(__doc__.replace('%', '%%'))
49da8b
diff --git a/bin/discard b/bin/discard
49da8b
index c301984..34cb811 100644
49da8b
--- a/bin/discard
49da8b
+++ b/bin/discard
49da8b
@@ -41,7 +41,7 @@ import getopt
49da8b
 import paths
49da8b
 from Mailman import mm_cfg
49da8b
 from Mailman.MailList import MailList
49da8b
-from Mailman.i18n import _
49da8b
+from Mailman.i18n import C_
49da8b
 
49da8b
 try:
49da8b
     True, False
49da8b
@@ -58,7 +58,7 @@ def usage(code, msg=''):
49da8b
         fd = sys.stderr
49da8b
     else:
49da8b
         fd = sys.stdout
49da8b
-    print >> fd, _(__doc__)
49da8b
+    print >> fd, C_(__doc__)
49da8b
     if msg:
49da8b
         print >> fd, msg
49da8b
     sys.exit(code)
49da8b
@@ -80,7 +80,7 @@ def main():
49da8b
 
49da8b
     files = args
49da8b
     if not files:
49da8b
-        print _('Nothing to do.')
49da8b
+        print C_('Nothing to do.')
49da8b
 
49da8b
     # Mapping from listnames to sequence of request ids
49da8b
     discards = {}
49da8b
@@ -91,13 +91,13 @@ def main():
49da8b
         basename = os.path.basename(f)
49da8b
         mo = cre.match(basename)
49da8b
         if not mo:
49da8b
-            print >> sys.stderr, _('Ignoring non-held message: %(f)s')
49da8b
+            print >> sys.stderr, C_('Ignoring non-held message: %(f)s')
49da8b
             continue
49da8b
         listname, id = mo.group('listname', 'id')
49da8b
         try:
49da8b
             id = int(id)
49da8b
         except (ValueError, TypeError):
49da8b
-            print >> sys.stderr, _('Ignoring held msg w/bad id: %(f)s')
49da8b
+            print >> sys.stderr, C_('Ignoring held msg w/bad id: %(f)s')
49da8b
             continue
49da8b
         discards.setdefault(listname, []).append(id)
49da8b
 
49da8b
@@ -109,7 +109,7 @@ def main():
49da8b
                 # No comment, no preserve, no forward, no forwarding address
49da8b
                 mlist.HandleRequest(id, mm_cfg.DISCARD, '', False, False, '')
49da8b
                 if not quiet:
49da8b
-                    print _('Discarded held msg #%(id)s for list %(listname)s')
49da8b
+                    print C_('Discarded held msg #%(id)s for list %(listname)s')
49da8b
             mlist.Save()
49da8b
         finally:
49da8b
             mlist.Unlock()
49da8b
diff --git a/bin/dumpdb b/bin/dumpdb
49da8b
index c8e4246..0b58fae 100644
49da8b
--- a/bin/dumpdb
49da8b
+++ b/bin/dumpdb
49da8b
@@ -54,7 +54,7 @@ from types import StringType
49da8b
 
49da8b
 import paths
49da8b
 # Import this /after/ paths so that the sys.path is properly hacked
49da8b
-from Mailman.i18n import _
49da8b
+from Mailman.i18n import C_
49da8b
 
49da8b
 PROGRAM = sys.argv[0]
49da8b
 COMMASPACE = ', '
49da8b
@@ -72,7 +72,7 @@ def usage(code, msg=''):
49da8b
         fd = sys.stderr
49da8b
     else:
49da8b
         fd = sys.stdout
49da8b
-    print >> fd, _(__doc__) % globals()
49da8b
+    print >> fd, C_(__doc__) % globals()
49da8b
     if msg:
49da8b
         print >> fd, msg
49da8b
     sys.exit(code)
49da8b
@@ -102,10 +102,10 @@ def main():
49da8b
             doprint = False
49da8b
 
49da8b
     if len(args) < 1:
49da8b
-        usage(1, _('No filename given.'))
49da8b
+        usage(1, C_('No filename given.'))
49da8b
     elif len(args) > 1:
49da8b
         pargs = COMMASPACE.join(args)
49da8b
-        usage(1, _('Bad arguments: %(pargs)s'))
49da8b
+        usage(1, C_('Bad arguments: %(pargs)s'))
49da8b
     else:
49da8b
         filename = args[0]
49da8b
 
49da8b
@@ -115,7 +115,7 @@ def main():
49da8b
         elif filename.endswith('.pck'):
49da8b
             filetype = 0
49da8b
         else:
49da8b
-            usage(1, _('Please specify either -p or -m.'))
49da8b
+            usage(1, C_('Please specify either -p or -m.'))
49da8b
 
49da8b
     # Handle dbs
49da8b
     pp = pprint.PrettyPrinter(indent=4)
49da8b
@@ -130,16 +130,16 @@ def main():
49da8b
     try:
49da8b
         cnt = 1
49da8b
         if doprint:
49da8b
-            print _('[----- start %(typename)s file -----]')
49da8b
+            print C_('[----- start %(typename)s file -----]')
49da8b
         while True:
49da8b
             try:
49da8b
                 obj = load(fp)
49da8b
             except EOFError:
49da8b
                 if doprint:
49da8b
-                    print _('[----- end %(typename)s file -----]')
49da8b
+                    print C_('[----- end %(typename)s file -----]')
49da8b
                 break
49da8b
             if doprint:
49da8b
-                print _('<----- start object %(cnt)s ----->')
49da8b
+                print C_('<----- start object %(cnt)s ----->')
49da8b
                 if isinstance(obj, StringType):
49da8b
                     print obj
49da8b
                 else:
49da8b
diff --git a/bin/find_member b/bin/find_member
49da8b
index a1701bf..99e4ee6 100755
49da8b
--- a/bin/find_member
49da8b
+++ b/bin/find_member
49da8b
@@ -64,7 +64,7 @@ import paths
49da8b
 from Mailman import Utils
49da8b
 from Mailman import MailList
49da8b
 from Mailman import Errors
49da8b
-from Mailman.i18n import _
49da8b
+from Mailman.i18n import C_
49da8b
 
49da8b
 AS_MEMBER = 0x01
49da8b
 AS_OWNER = 0x02
49da8b
@@ -76,7 +76,7 @@ def usage(code, msg=''):
49da8b
         fd = sys.stderr
49da8b
     else:
49da8b
         fd = sys.stdout
49da8b
-    print >> fd, _(__doc__)
49da8b
+    print >> fd, C_(__doc__)
49da8b
     if msg:
49da8b
         print >> fd, msg
49da8b
     sys.exit(code)
49da8b
@@ -94,7 +94,7 @@ def scanlists(options):
49da8b
         try:
49da8b
             mlist = MailList.MailList(listname, lock=0)
49da8b
         except Errors.MMListError:
49da8b
-            print _('No such list: %(listname)s')
49da8b
+            print C_('No such list: %(listname)s')
49da8b
             continue
49da8b
         if options.owners:
49da8b
             owners = mlist.owner
49da8b
@@ -156,12 +156,12 @@ def main():
49da8b
             pass
49da8b
 
49da8b
     if not args:
49da8b
-        usage(1, _('Search regular expression required'))
49da8b
+        usage(1, C_('Search regular expression required'))
49da8b
 
49da8b
     options.regexps = args
49da8b
 
49da8b
     if not options.listnames:
49da8b
-        print _('No lists to search')
49da8b
+        print C_('No lists to search')
49da8b
         return
49da8b
 
49da8b
     matches = scanlists(options)
49da8b
@@ -170,13 +170,13 @@ def main():
49da8b
     for k in addrs:
49da8b
         hits = matches[k]
49da8b
         lists = hits.keys()
49da8b
-        print k, _('found in:')
49da8b
+        print k, C_('found in:')
49da8b
         for name in lists:
49da8b
             aswhat = hits[name]
49da8b
             if aswhat & AS_MEMBER:
49da8b
                 print '    ', name
49da8b
             if aswhat & AS_OWNER:
49da8b
-                print '    ', name, _('(as owner)')
49da8b
+                print '    ', name, C_('(as owner)')
49da8b
 
49da8b
 
49da8b
 
49da8b
diff --git a/bin/fix_url.py b/bin/fix_url.py
49da8b
index d2731c1..6523ce2 100644
49da8b
--- a/bin/fix_url.py
49da8b
+++ b/bin/fix_url.py
49da8b
@@ -43,12 +43,12 @@ import getopt
49da8b
 
49da8b
 import paths
49da8b
 from Mailman import mm_cfg
49da8b
-from Mailman.i18n import _
49da8b
+from Mailman.i18n import C_
49da8b
 
49da8b
 
49da8b
 
49da8b
 def usage(code, msg=''):
49da8b
-    print _(__doc__.replace('%', '%%'))
49da8b
+    print C_(__doc__.replace('%', '%%'))
49da8b
     if msg:
49da8b
         print msg
49da8b
     sys.exit(code)
49da8b
@@ -82,12 +82,12 @@ def fix_url(mlist, *args):
49da8b
         mailhost = mm_cfg.DEFAULT_EMAIL_HOST
49da8b
 
49da8b
     if verbose:
49da8b
-        print _('Setting web_page_url to: %(web_page_url)s')
49da8b
+        print C_('Setting web_page_url to: %(web_page_url)s')
49da8b
     mlist.web_page_url = web_page_url
49da8b
     if verbose:
49da8b
-        print _('Setting host_name to: %(mailhost)s')
49da8b
+        print C_('Setting host_name to: %(mailhost)s')
49da8b
     mlist.host_name = mailhost
49da8b
-    print _('Saving list')
49da8b
+    print C_('Saving list')
49da8b
     mlist.Save()
49da8b
     mlist.Unlock()
49da8b
 
49da8b
diff --git a/bin/genaliases b/bin/genaliases
49da8b
index 77bc290..c49cba6 100644
49da8b
--- a/bin/genaliases
49da8b
+++ b/bin/genaliases
49da8b
@@ -40,7 +40,7 @@ import paths                                      # path hacking
49da8b
 from Mailman import mm_cfg
49da8b
 from Mailman import Utils
49da8b
 from Mailman import MailList
49da8b
-from Mailman.i18n import _
49da8b
+from Mailman.i18n import C_
49da8b
 
49da8b
 try:
49da8b
     True, False
49da8b
@@ -55,7 +55,7 @@ def usage(code, msg=''):
49da8b
         fd = sys.stderr
49da8b
     else:
49da8b
         fd = sys.stdout
49da8b
-    print >> fd, _(__doc__)
49da8b
+    print >> fd, C_(__doc__)
49da8b
     if msg:
49da8b
         print >> fd, msg
49da8b
     sys.exit(code)
49da8b
diff --git a/bin/inject b/bin/inject
49da8b
index 432c292..fa91f5e 100644
49da8b
--- a/bin/inject
49da8b
+++ b/bin/inject
49da8b
@@ -48,7 +48,7 @@ import paths
49da8b
 from Mailman import mm_cfg
49da8b
 from Mailman import Utils
49da8b
 from Mailman import Post
49da8b
-from Mailman.i18n import _
49da8b
+from Mailman.i18n import C_
49da8b
 
49da8b
 
49da8b
 
49da8b
@@ -57,7 +57,7 @@ def usage(code, msg=''):
49da8b
         fd = sys.stderr
49da8b
     else:
49da8b
         fd = sys.stdout
49da8b
-    print >> fd, _(__doc__)
49da8b
+    print >> fd, C_(__doc__)
49da8b
     if msg:
49da8b
         print >> fd, msg
49da8b
     sys.exit(code)
49da8b
@@ -81,14 +81,14 @@ def main():
49da8b
         elif opt in ('-q', '--queue'):
49da8b
             qdir = os.path.join(mm_cfg.QUEUE_DIR, arg)
49da8b
             if not os.path.isdir(qdir):
49da8b
-                usage(1, _('Bad queue directory: %(qdir)s'))
49da8b
+                usage(1, C_('Bad queue directory: %(qdir)s'))
49da8b
         elif opt in ('-l', '--listname'):
49da8b
             listname = arg.lower()
49da8b
 
49da8b
     if listname is None:
49da8b
-        usage(1, _('A list name is required'))
49da8b
+        usage(1, C_('A list name is required'))
49da8b
     elif not Utils.list_exists(listname):
49da8b
-        usage(1, _('No such list: %(listname)s'))
49da8b
+        usage(1, C_('No such list: %(listname)s'))
49da8b
 
49da8b
     if len(args) == 0:
49da8b
         # Use standard input
49da8b
diff --git a/bin/list_admins b/bin/list_admins
49da8b
index b86a5eb..f9304c7 100644
49da8b
--- a/bin/list_admins
49da8b
+++ b/bin/list_admins
49da8b
@@ -45,7 +45,7 @@ import getopt
49da8b
 import paths
49da8b
 from Mailman import MailList, Utils
49da8b
 from Mailman import Errors
49da8b
-from Mailman.i18n import _
49da8b
+from Mailman.i18n import C_
49da8b
 
49da8b
 COMMASPACE = ', '
49da8b
 
49da8b
@@ -58,7 +58,7 @@ def usage(code, msg=''):
49da8b
         fd = sys.stderr
49da8b
     else:
49da8b
         fd = sys.stdout
49da8b
-    print >> fd, _(__doc__)
49da8b
+    print >> fd, C_(__doc__)
49da8b
     if msg:
49da8b
         print >> fd, msg
49da8b
     sys.exit(code)
49da8b
@@ -87,14 +87,14 @@ def main():
49da8b
        try:
49da8b
            mlist = MailList.MailList(listname, lock=0)
49da8b
        except Errors.MMListError, e:
49da8b
-           print _('No such list: %(listname)s')
49da8b
+           print C_('No such list: %(listname)s')
49da8b
            continue
49da8b
 
49da8b
        if vhost and vhost <> mlist.host_name:
49da8b
            continue
49da8b
 
49da8b
        owners = COMMASPACE.join(mlist.owner)
49da8b
-       print _('List: %(listname)s, \tOwners: %(owners)s')
49da8b
+       print C_('List: %(listname)s, \tOwners: %(owners)s')
49da8b
 
49da8b
 
49da8b
 
49da8b
diff --git a/bin/list_lists b/bin/list_lists
49da8b
index 870759b..004db2a 100644
49da8b
--- a/bin/list_lists
49da8b
+++ b/bin/list_lists
49da8b
@@ -47,7 +47,7 @@ from Mailman import mm_cfg
49da8b
 from Mailman import MailList
49da8b
 from Mailman import Utils
49da8b
 from Mailman import Errors
49da8b
-from Mailman.i18n import _
49da8b
+from Mailman.i18n import C_
49da8b
 
49da8b
 program = sys.argv[0]
49da8b
 
49da8b
@@ -56,7 +56,7 @@ def usage(code, msg=''):
49da8b
         fd = sys.stderr
49da8b
     else:
49da8b
         fd = sys.stdout
49da8b
-    print >> fd, _(__doc__)
49da8b
+    print >> fd, C_(__doc__)
49da8b
     if msg:
49da8b
         print >> fd, msg
49da8b
     sys.exit(code)
49da8b
@@ -102,18 +102,18 @@ def main():
49da8b
         longest = max(len(mlist.real_name), longest)
49da8b
 
49da8b
     if not mlists and not bare:
49da8b
-        print _('No matching mailing lists found')
49da8b
+        print C_('No matching mailing lists found')
49da8b
         return
49da8b
 
49da8b
     if not bare:
49da8b
-        print len(mlists), _('matching mailing lists found:')
49da8b
+        print len(mlists), C_('matching mailing lists found:')
49da8b
 
49da8b
     format = '%%%ds - %%.%ds' % (longest, 77 - longest)
49da8b
     for mlist in mlists:
49da8b
         if bare:
49da8b
             print mlist.internal_name()
49da8b
         else:
49da8b
-            description = mlist.description or _('[no description available]')
49da8b
+            description = mlist.description or C_('[no description available]')
49da8b
             print '   ', format % (mlist.real_name, description)
49da8b
 
49da8b
 
49da8b
diff --git a/bin/list_members b/bin/list_members
49da8b
index cb57408..7e51ddc 100755
49da8b
--- a/bin/list_members
49da8b
+++ b/bin/list_members
49da8b
@@ -76,7 +76,7 @@ from Mailman import Utils
49da8b
 from Mailman import MailList
49da8b
 from Mailman import Errors
49da8b
 from Mailman import MemberAdaptor
49da8b
-from Mailman.i18n import _
49da8b
+from Mailman.i18n import C_
49da8b
 
49da8b
 from email.Utils import formataddr
49da8b
 
49da8b
@@ -104,7 +104,7 @@ def usage(code, msg=''):
49da8b
         fd = sys.stderr
49da8b
     else:
49da8b
         fd = sys.stdout
49da8b
-    print >> fd, _(__doc__)
49da8b
+    print >> fd, C_(__doc__)
49da8b
     if msg:
49da8b
         print >> fd, msg
49da8b
     sys.exit(code)
49da8b
@@ -188,7 +188,7 @@ def main():
49da8b
             if i >= 0:
49da8b
                 why = opt[i+1:]
49da8b
                 if why not in WHYCHOICES.keys():
49da8b
-                    usage(1, _('Bad --nomail option: %(why)s'))
49da8b
+                    usage(1, C_('Bad --nomail option: %(why)s'))
49da8b
         elif opt == '-d':
49da8b
             digest = True
49da8b
             if args and args[0] in ('mime', 'plain'):
49da8b
@@ -199,7 +199,7 @@ def main():
49da8b
             if i >= 0:
49da8b
                 kind = opt[i+1:]
49da8b
                 if kind not in ('mime', 'plain'):
49da8b
-                    usage(1, _('Bad --digest option: %(kind)s'))
49da8b
+                    usage(1, C_('Bad --digest option: %(kind)s'))
49da8b
         elif opt in ('-i', '--invalid'):
49da8b
             invalidonly = True
49da8b
         elif opt in ('-u', '--unicode'):
49da8b
@@ -221,7 +221,7 @@ def main():
49da8b
         try:
49da8b
             fp = open(outfile, 'w')
49da8b
         except IOError:
49da8b
-            print >> sys.stderr, _('Could not open file for writing:'), outfile
49da8b
+            print >> sys.stderr, C_('Could not open file for writing:'), outfile
49da8b
             sys.exit(1)
49da8b
     else:
49da8b
         fp = sys.stdout
49da8b
@@ -229,7 +229,7 @@ def main():
49da8b
     try:
49da8b
         mlist = MailList.MailList(listname, lock=False)
49da8b
     except Errors.MMListError, e:
49da8b
-        print >> sys.stderr, _('No such list: %(listname)s')
49da8b
+        print >> sys.stderr, C_('No such list: %(listname)s')
49da8b
         sys.exit(1)
49da8b
 
49da8b
     # Get the lowercased member addresses
49da8b
diff --git a/bin/list_owners b/bin/list_owners
49da8b
index 4c2d908..adcba10 100644
49da8b
--- a/bin/list_owners
49da8b
+++ b/bin/list_owners
49da8b
@@ -45,7 +45,7 @@ import getopt
49da8b
 import paths
49da8b
 from Mailman import Utils
49da8b
 from Mailman.MailList import MailList
49da8b
-from Mailman.i18n import _
49da8b
+from Mailman.i18n import C_
49da8b
 
49da8b
 PROGRAM = sys.argv[0]
49da8b
 
49da8b
@@ -62,7 +62,7 @@ def usage(code, msg=''):
49da8b
         fd = sys.stderr
49da8b
     else:
49da8b
         fd = sys.stdout
49da8b
-    print >> fd, _(__doc__)
49da8b
+    print >> fd, C_(__doc__)
49da8b
     if msg:
49da8b
         print >> fd, msg
49da8b
     sys.exit(code)
49da8b
diff --git a/bin/mailmanctl b/bin/mailmanctl
49da8b
index 3d59d57..2a5085d 100644
49da8b
--- a/bin/mailmanctl
49da8b
+++ b/bin/mailmanctl
49da8b
@@ -111,7 +111,7 @@ from Mailman import Utils
49da8b
 from Mailman import LockFile
49da8b
 from Mailman import Errors
49da8b
 from Mailman.MailList import MailList
49da8b
-from Mailman.i18n import _
49da8b
+from Mailman.i18n import C_
49da8b
 from Mailman.Logging.Syslog import syslog
49da8b
 from Mailman.Logging.Utils import LogStdErr
49da8b
 
49da8b
@@ -136,7 +136,7 @@ def usage(code, msg=''):
49da8b
         fd = sys.stderr
49da8b
     else:
49da8b
         fd = sys.stdout
49da8b
-    print >> fd, _(__doc__)
49da8b
+    print >> fd, C_(__doc__)
49da8b
     if msg:
49da8b
         print >> fd, msg
49da8b
     sys.exit(code)
49da8b
@@ -152,17 +152,17 @@ def kill_watcher(sig):
49da8b
     except (IOError, ValueError), e:
49da8b
         # For i18n convenience
49da8b
         pidfile = mm_cfg.PIDFILE
49da8b
-        print >> sys.stderr, _('PID unreadable in: %(pidfile)s')
49da8b
+        print >> sys.stderr, C_('PID unreadable in: %(pidfile)s')
49da8b
         print >> sys.stderr, e
49da8b
-        print >> sys.stderr, _('Is qrunner even running?')
49da8b
+        print >> sys.stderr, C_('Is qrunner even running?')
49da8b
         return
49da8b
     try:
49da8b
         os.kill(pid, sig)
49da8b
     except OSError, e:
49da8b
         if e.errno <> errno.ESRCH: raise
49da8b
-        print >> sys.stderr, _('No child with pid: %(pid)s')
49da8b
+        print >> sys.stderr, C_('No child with pid: %(pid)s')
49da8b
         print >> sys.stderr, e
49da8b
-        print >> sys.stderr, _('Stale pid file removed.')
49da8b
+        print >> sys.stderr, C_('Stale pid file removed.')
49da8b
         os.unlink(mm_cfg.PIDFILE)
49da8b
 
49da8b
 
49da8b
@@ -266,19 +266,19 @@ def acquire_lock(force):
49da8b
         status = qrunner_state()
49da8b
         if status == 1:
49da8b
             # host matches and proc exists
49da8b
-            print >> sys.stderr, _("""\
49da8b
+            print >> sys.stderr, C_("""\
49da8b
 The master qrunner lock could not be acquired because it appears as if another
49da8b
 master qrunner is already running.
49da8b
 """)
49da8b
         elif status == 0:
49da8b
             # host matches but no proc
49da8b
-            print >> sys.stderr, _("""\
49da8b
+            print >> sys.stderr, C_("""\
49da8b
 The master qrunner lock could not be acquired.  It appears as though there is
49da8b
 a stale master qrunner lock.  Try re-running mailmanctl with the -s flag.
49da8b
 """)
49da8b
         else:
49da8b
             # host doesn't even match
49da8b
-            print >> sys.stderr, _("""\
49da8b
+            print >> sys.stderr, C_("""\
49da8b
 The master qrunner lock could not be acquired, because it appears as if some
49da8b
 process on some other host may have acquired it.  We can't test for stale
49da8b
 locks across host boundaries, so you'll have to do this manually.  Or, if you
49da8b
@@ -325,7 +325,7 @@ def check_for_site_list():
49da8b
     try:
49da8b
         sitelist = MailList(sitelistname, lock=0)
49da8b
     except Errors.MMUnknownListError:
49da8b
-        print >> sys.stderr, _('Site list is missing: %(sitelistname)s')
49da8b
+        print >> sys.stderr, C_('Site list is missing: %(sitelistname)s')
49da8b
         syslog('error', 'Site list is missing: %s', mm_cfg.MAILMAN_SITE_LIST)
49da8b
         sys.exit(1)
49da8b
 
49da8b
@@ -350,7 +350,7 @@ def check_privs():
49da8b
         os.setuid(uid)
49da8b
     elif myuid <> uid:
49da8b
         name = mm_cfg.MAILMAN_USER
49da8b
-        usage(1, _(
49da8b
+        usage(1, C_(
49da8b
             'Run this program as root or as the %(name)s user, or use -u.'))
49da8b
 
49da8b
 
49da8b
@@ -381,10 +381,10 @@ def main():
49da8b
             quiet = 1
49da8b
 
49da8b
     if len(args) < 1:
49da8b
-        usage(1, _('No command given.'))
49da8b
+        usage(1, C_('No command given.'))
49da8b
     elif len(args) > 1:
49da8b
         command = COMMASPACE.join(args)
49da8b
-        usage(1, _('Bad command: %(command)s'))
49da8b
+        usage(1, C_('Bad command: %(command)s'))
49da8b
 
49da8b
     command = args[0].lower()
49da8b
 
49da8b
@@ -392,7 +392,7 @@ def main():
49da8b
         check_privs()
49da8b
     else:
49da8b
         if command != 'status':
49da8b
-	    print _('Warning!  You may encounter permission problems.')
49da8b
+	    print C_('Warning!  You may encounter permission problems.')
49da8b
 
49da8b
     # Handle the commands
49da8b
     if command == 'stop':
49da8b
@@ -400,26 +400,26 @@ def main():
49da8b
         # giving cron/qrunner a ctrl-c or KeyboardInterrupt.  This will
49da8b
         # effectively shut everything down.
49da8b
         if not quiet:
49da8b
-            print _("Shutting down Mailman's master qrunner")
49da8b
+            print C_("Shutting down Mailman's master qrunner")
49da8b
         kill_watcher(signal.SIGTERM)
49da8b
     elif command == 'restart':
49da8b
         # Sent the master qrunner process a SIGHUP.  This will cause the
49da8b
         # master qrunner to kill and restart all the worker qrunners, and to
49da8b
         # close and re-open its log files.
49da8b
         if not quiet:
49da8b
-            print _("Restarting Mailman's master qrunner")
49da8b
+            print C_("Restarting Mailman's master qrunner")
49da8b
         kill_watcher(signal.SIGINT)
49da8b
     elif command == 'reopen':
49da8b
         if not quiet:
49da8b
-            print _('Re-opening all log files')
49da8b
+            print C_('Re-opening all log files')
49da8b
         kill_watcher(signal.SIGHUP)
49da8b
     elif command == 'status':
49da8b
         status, pid = mailman_status()
49da8b
         if not quiet:
49da8b
             if status == 0:
49da8b
-                print _("mailman (pid %(pid)d) is running...")
49da8b
+                print C_("mailman (pid %(pid)d) is running...")
49da8b
             else:
49da8b
-                print _("mailman is stopped")
49da8b
+                print C_("mailman is stopped")
49da8b
         sys.exit(status)
49da8b
     elif command == 'start':
49da8b
         # First, complain loudly if there's no site list.
49da8b
@@ -455,7 +455,7 @@ def main():
49da8b
         if pid:
49da8b
             # parent
49da8b
             if not quiet:
49da8b
-                print _("Starting Mailman's master qrunner.")
49da8b
+                print C_("Starting Mailman's master qrunner.")
49da8b
             # Give up the lock "ownership".  This just means the foreground
49da8b
             # process won't close/unlock the lock when it finalizes this lock
49da8b
             # instance.  We'll let the mater watcher subproc own the lock.
49da8b
diff --git a/bin/mmsitepass b/bin/mmsitepass
49da8b
index 0bb6e77..bb4cc71 100755
49da8b
--- a/bin/mmsitepass
49da8b
+++ b/bin/mmsitepass
49da8b
@@ -43,7 +43,7 @@ import getopt
49da8b
 
49da8b
 import paths
49da8b
 from Mailman import Utils
49da8b
-from Mailman.i18n import _
49da8b
+from Mailman.i18n import C_
49da8b
 
49da8b
 PROGRAM = sys.argv[0]
49da8b
 
49da8b
@@ -54,7 +54,7 @@ def usage(code, msg=''):
49da8b
         fd = sys.stderr
49da8b
     else:
49da8b
         fd = sys.stdout
49da8b
-    print >> fd, _(__doc__)
49da8b
+    print >> fd, C_(__doc__)
49da8b
     if msg:
49da8b
         print >> fd, msg
49da8b
     sys.exit(code)
49da8b
@@ -70,34 +70,34 @@ def main():
49da8b
 
49da8b
     # Defaults
49da8b
     siteadmin = 1
49da8b
-    pwdesc = _('site')
49da8b
+    pwdesc = C_('site')
49da8b
 
49da8b
     for opt, arg in opts:
49da8b
         if opt in ('-h', '--help'):
49da8b
             usage(0)
49da8b
         elif opt in ('-c', '--listcreator'):
49da8b
             siteadmin = 0
49da8b
-            pwdesc = _('list creator')
49da8b
+            pwdesc = C_('list creator')
49da8b
 
49da8b
     if len(args) == 1:
49da8b
         pw1 = args[0]
49da8b
     else:
49da8b
         try:
49da8b
-            pw1 = getpass.getpass(_('New %(pwdesc)s password: '))
49da8b
-            pw2 = getpass.getpass(_('Again to confirm password: '))
49da8b
+            pw1 = getpass.getpass(C_('New %(pwdesc)s password: '))
49da8b
+            pw2 = getpass.getpass(C_('Again to confirm password: '))
49da8b
             if pw1 <> pw2:
49da8b
-                print _('Passwords do not match; no changes made.')
49da8b
+                print C_('Passwords do not match; no changes made.')
49da8b
                 sys.exit(1)
49da8b
         except KeyboardInterrupt:
49da8b
-            print _('Interrupted...')
49da8b
+            print C_('Interrupted...')
49da8b
             sys.exit(0)
49da8b
     # Set the site password by writing it to a local file.  Make sure the
49da8b
     # permissions don't allow other+read.
49da8b
     Utils.set_global_password(pw1, siteadmin)
49da8b
     if Utils.check_global_password(pw1, siteadmin):
49da8b
-        print _('Password changed.')
49da8b
+        print C_('Password changed.')
49da8b
     else:
49da8b
-        print _('Password change failed.')
49da8b
+        print C_('Password change failed.')
49da8b
 
49da8b
 
49da8b
 
49da8b
diff --git a/bin/newlist b/bin/newlist
49da8b
index c14b77f..7000396 100755
49da8b
--- a/bin/newlist
49da8b
+++ b/bin/newlist
49da8b
@@ -104,6 +104,7 @@ from Mailman import Message
49da8b
 from Mailman import i18n
49da8b
 
49da8b
 _ = i18n._
49da8b
+C_ = i18n.C_
49da8b
 
49da8b
 PROGRAM = sys.argv[0]
49da8b
 
49da8b
@@ -114,7 +115,7 @@ def usage(code, msg=''):
49da8b
         fd = sys.stderr
49da8b
     else:
49da8b
         fd = sys.stdout
49da8b
-    print >> fd, _(__doc__)
49da8b
+    print >> fd, C_(__doc__)
49da8b
     if msg:
49da8b
         print >> fd, msg
49da8b
     sys.exit(code)
49da8b
@@ -147,12 +148,12 @@ def main():
49da8b
 
49da8b
     # Is the language known?
49da8b
     if lang not in mm_cfg.LC_DESCRIPTIONS.keys():
49da8b
-        usage(1, _('Unknown language: %(lang)s'))
49da8b
+        usage(1, C_('Unknown language: %(lang)s'))
49da8b
 
49da8b
     if len(args) > 0:
49da8b
         listname = args[0]
49da8b
     else:
49da8b
-        listname = raw_input(_('Enter the name of the list: '))
49da8b
+        listname = raw_input(C_('Enter the name of the list: '))
49da8b
     listname = listname.lower()
49da8b
 
49da8b
     if '@' in listname:
49da8b
@@ -167,22 +168,22 @@ def main():
49da8b
     web_page_url = mm_cfg.DEFAULT_URL_PATTERN % urlhost
49da8b
 
49da8b
     if Utils.list_exists(listname):
49da8b
-        usage(1, _('List already exists: %(listname)s'))
49da8b
+        usage(1, C_('List already exists: %(listname)s'))
49da8b
 
49da8b
     if len(args) > 1:
49da8b
         owner_mail = args[1]
49da8b
     else:
49da8b
         owner_mail = raw_input(
49da8b
-            _('Enter the email of the person running the list: '))
49da8b
+            C_('Enter the email of the person running the list: '))
49da8b
 
49da8b
     if len(args) > 2:
49da8b
         listpasswd = args[2]
49da8b
     else:
49da8b
-        listpasswd = getpass.getpass(_('Initial %(listname)s password: '))
49da8b
+        listpasswd = getpass.getpass(C_('Initial %(listname)s password: '))
49da8b
     # List passwords cannot be empty
49da8b
     listpasswd = listpasswd.strip()
49da8b
     if not listpasswd:
49da8b
-        usage(1, _('The list password cannot be empty'))
49da8b
+        usage(1, C_('The list password cannot be empty'))
49da8b
 
49da8b
     mlist = MailList.MailList()
49da8b
     try:
49da8b
@@ -202,11 +203,11 @@ def main():
49da8b
             finally:
49da8b
                 os.umask(oldmask)
49da8b
         except Errors.BadListNameError, s:
49da8b
-            usage(1, _('Illegal list name: %(s)s'))
49da8b
+            usage(1, C_('Illegal list name: %(s)s'))
49da8b
         except Errors.EmailAddressError, s:
49da8b
-            usage(1, _('Bad owner email address: %(s)s'))
49da8b
+            usage(1, C_('Bad owner email address: %(s)s'))
49da8b
         except Errors.MMListAlreadyExistsError:
49da8b
-            usage(1, _('List already exists: %(listname)s'))
49da8b
+            usage(1, C_('List already exists: %(listname)s'))
49da8b
 
49da8b
         # Assign domain-specific attributes
49da8b
         mlist.host_name = host_name
49da8b
@@ -227,7 +228,7 @@ def main():
49da8b
 
49da8b
     # And send the notice to the list owner
49da8b
     if not quiet:
49da8b
-        print _('Hit enter to notify %(listname)s owner...'),
49da8b
+        print C_('Hit enter to notify %(listname)s owner...'),
49da8b
         sys.stdin.readline()
49da8b
         siteowner = Utils.get_site_email(mlist.host_name, 'owner')
49da8b
         text = Utils.maketext(
49da8b
diff --git a/bin/qrunner b/bin/qrunner
49da8b
index 20fe830..29bba0f 100644
49da8b
--- a/bin/qrunner
49da8b
+++ b/bin/qrunner
49da8b
@@ -78,7 +78,7 @@ import signal
49da8b
 
49da8b
 import paths
49da8b
 from Mailman import mm_cfg
49da8b
-from Mailman.i18n import _
49da8b
+from Mailman.i18n import C_
49da8b
 from Mailman.Logging.Syslog import syslog
49da8b
 from Mailman.Logging.Utils import LogStdErr
49da8b
 
49da8b
@@ -95,7 +95,7 @@ def usage(code, msg=''):
49da8b
         fd = sys.stderr
49da8b
     else:
49da8b
         fd = sys.stdout
49da8b
-    print >> fd, _(__doc__)
49da8b
+    print >> fd, C_(__doc__)
49da8b
     if msg:
49da8b
         print >> fd, msg
49da8b
     sys.exit(code)
49da8b
@@ -175,8 +175,8 @@ def main():
49da8b
                     name = runnername[:-len('Runner')]
49da8b
                 else:
49da8b
                     name = runnername
49da8b
-                print _('%(name)s runs the %(runnername)s qrunner')
49da8b
-            print _('All runs all the above qrunners')
49da8b
+                print C_('%(name)s runs the %(runnername)s qrunner')
49da8b
+            print C_('All runs all the above qrunners')
49da8b
             sys.exit(0)
49da8b
         elif opt in ('-o', '--once'):
49da8b
             once = 1
49da8b
@@ -212,7 +212,7 @@ def main():
49da8b
     if len(args) <> 0:
49da8b
         usage(1)
49da8b
     if len(runners) == 0:
49da8b
-        usage(1, _('No runner name given.'))
49da8b
+        usage(1, C_('No runner name given.'))
49da8b
 
49da8b
     # Before we startup qrunners, we redirect the stderr to mailman syslog.
49da8b
     # We assume !AS_SUBPROC is running for debugging purpose and don't
49da8b
diff --git a/bin/rb-archfix b/bin/rb-archfix
49da8b
index fceadc2..2b1bef6 100644
49da8b
--- a/bin/rb-archfix
49da8b
+++ b/bin/rb-archfix
49da8b
@@ -52,7 +52,7 @@ import cPickle as pickle
49da8b
 
49da8b
 # Required to get the right classes for unpickling
49da8b
 import paths
49da8b
-from Mailman.i18n import _
49da8b
+from Mailman.i18n import C_
49da8b
 
49da8b
 PROGRAM = sys.argv[0]
49da8b
 
49da8b
@@ -63,7 +63,7 @@ def usage(code, msg=''):
49da8b
         fd = sys.stderr
49da8b
     else:
49da8b
         fd = sys.stdout
49da8b
-    print >> fd, _(__doc__)
49da8b
+    print >> fd, C_(__doc__)
49da8b
     if msg:
49da8b
         print >> fd, msg
49da8b
     sys.exit(code)
49da8b
diff --git a/bin/remove_members b/bin/remove_members
49da8b
index a7b4ebb..33aa6a2 100755
49da8b
--- a/bin/remove_members
49da8b
+++ b/bin/remove_members
49da8b
@@ -66,7 +66,7 @@ import paths
49da8b
 from Mailman import MailList
49da8b
 from Mailman import Utils
49da8b
 from Mailman import Errors
49da8b
-from Mailman.i18n import _
49da8b
+from Mailman.i18n import C_
49da8b
 
49da8b
 try:
49da8b
     True, False
49da8b
@@ -81,7 +81,7 @@ def usage(code, msg=''):
49da8b
         fd = sys.stderr
49da8b
     else:
49da8b
         fd = sys.stdout
49da8b
-    print >> fd, _(__doc__)
49da8b
+    print >> fd, C_(__doc__)
49da8b
     if msg:
49da8b
         print >> fd, msg
49da8b
     sys.exit(code)
49da8b
@@ -153,14 +153,14 @@ def main():
49da8b
         try:
49da8b
             addresses = addresses + ReadFile(filename)
49da8b
         except IOError:
49da8b
-            print _('Could not open file for reading: %(filename)s.')
49da8b
+            print C_('Could not open file for reading: %(filename)s.')
49da8b
 
49da8b
     for listname in listnames:
49da8b
        try:
49da8b
            # open locked
49da8b
            mlist = MailList.MailList(listname)
49da8b
        except Errors.MMListError:
49da8b
-           print _('Error opening list %(listname)s... skipping.')
49da8b
+           print C_('Error opening list %(listname)s... skipping.')
49da8b
            continue
49da8b
 
49da8b
        if all:
49da8b
@@ -170,12 +170,12 @@ def main():
49da8b
            for addr in addresses:
49da8b
                if not mlist.isMember(addr):
49da8b
                    if not alllists:
49da8b
-                       print _('No such member: %(addr)s')
49da8b
+                       print C_('No such member: %(addr)s')
49da8b
                    continue
49da8b
                mlist.ApprovedDeleteMember(addr, 'bin/remove_members',
49da8b
                                           admin_notif, userack)
49da8b
                if alllists:
49da8b
-                   print _("User `%(addr)s' removed from list: %(listname)s.")
49da8b
+                   print C_("User `%(addr)s' removed from list: %(listname)s.")
49da8b
            mlist.Save()
49da8b
        finally:
49da8b
            mlist.Unlock()
49da8b
diff --git a/bin/rmlist b/bin/rmlist
49da8b
index f61b41d..4d1ce50 100755
49da8b
--- a/bin/rmlist
49da8b
+++ b/bin/rmlist
49da8b
@@ -46,7 +46,7 @@ import paths
49da8b
 from Mailman import mm_cfg
49da8b
 from Mailman import Utils
49da8b
 from Mailman import MailList
49da8b
-from Mailman.i18n import _
49da8b
+from Mailman.i18n import C_
49da8b
 
49da8b
 try:
49da8b
     True, False
49da8b
@@ -61,7 +61,7 @@ def usage(code, msg=''):
49da8b
         fd = sys.stderr
49da8b
     else:
49da8b
         fd = sys.stdout
49da8b
-    print >> fd, _(__doc__)
49da8b
+    print >> fd, C_(__doc__)
49da8b
     if msg:
49da8b
         print >> fd, msg
49da8b
     sys.exit(code)
49da8b
@@ -70,15 +70,15 @@ def usage(code, msg=''):
49da8b
 
49da8b
 def remove_it(listname, filename, msg):
49da8b
     if os.path.islink(filename):
49da8b
-        print _('Removing %(msg)s')
49da8b
+        print C_('Removing %(msg)s')
49da8b
         os.unlink(filename)
49da8b
     elif os.path.isdir(filename):
49da8b
-        print _('Removing %(msg)s')
49da8b
+        print C_('Removing %(msg)s')
49da8b
         shutil.rmtree(filename)
49da8b
     elif os.path.isfile(filename):
49da8b
         os.unlink(filename)
49da8b
     else:
49da8b
-        print _('%(listname)s %(msg)s not found as %(filename)s')
49da8b
+        print C_('%(listname)s %(msg)s not found as %(filename)s')
49da8b
 
49da8b
 
49da8b
 
49da8b
@@ -102,13 +102,13 @@ def main():
49da8b
 
49da8b
     if not Utils.list_exists(listname):
49da8b
         if not removeArchives:
49da8b
-            usage(1, _('No such list (or list already deleted): %(listname)s'))
49da8b
+            usage(1, C_('No such list (or list already deleted): %(listname)s'))
49da8b
         else:
49da8b
-            print _(
49da8b
+            print C_(
49da8b
                 'No such list: %(listname)s.  Removing its residual archives.')
49da8b
 
49da8b
     if not removeArchives:
49da8b
-        print _('Not removing archives.  Reinvoke with -a to remove them.')
49da8b
+        print C_('Not removing archives.  Reinvoke with -a to remove them.')
49da8b
 
49da8b
 
49da8b
     REMOVABLES = []
49da8b
@@ -122,7 +122,7 @@ def main():
49da8b
             sys.modules[modname].remove(mlist)
49da8b
 
49da8b
         REMOVABLES = [
49da8b
-            (os.path.join(mm_cfg.LIST_DATA_DIR, listname), _('list info')),
49da8b
+            (os.path.join(mm_cfg.LIST_DATA_DIR, listname), C_('list info')),
49da8b
             ]
49da8b
 
49da8b
     # Remove any stale locks associated with the list
49da8b
@@ -130,7 +130,7 @@ def main():
49da8b
         fn_listname = filename.split('.')[0]
49da8b
         if fn_listname == listname:
49da8b
             REMOVABLES.append((os.path.join(mm_cfg.LOCK_DIR, filename),
49da8b
-                               _('stale lock file')))
49da8b
+                               C_('stale lock file')))
49da8b
 
49da8b
     # Remove any held messages for this list
49da8b
     for filename in os.listdir(mm_cfg.DATA_DIR):
49da8b
@@ -138,18 +138,18 @@ def main():
49da8b
                          re.IGNORECASE)
49da8b
         if cre.match(filename):
49da8b
             REMOVABLES.append((os.path.join(mm_cfg.DATA_DIR, filename),
49da8b
-                               _('held message file')))
49da8b
+                               C_('held message file')))
49da8b
 
49da8b
     if removeArchives:
49da8b
         REMOVABLES.extend([
49da8b
             (os.path.join(mm_cfg.PRIVATE_ARCHIVE_FILE_DIR, listname),
49da8b
-             _('private archives')),
49da8b
+             C_('private archives')),
49da8b
             (os.path.join(mm_cfg.PRIVATE_ARCHIVE_FILE_DIR, listname + '.mbox'),
49da8b
-             _('private archives')),
49da8b
+             C_('private archives')),
49da8b
             (os.path.join(mm_cfg.PUBLIC_ARCHIVE_FILE_DIR, listname),
49da8b
-             _('public archives')),
49da8b
+             C_('public archives')),
49da8b
             (os.path.join(mm_cfg.PUBLIC_ARCHIVE_FILE_DIR, listname + '.mbox'),
49da8b
-             _('public archives')),
49da8b
+             C_('public archives')),
49da8b
             ])
49da8b
 
49da8b
     for dir, msg in REMOVABLES:
49da8b
diff --git a/bin/show_qfiles b/bin/show_qfiles
49da8b
index 0dbe9fe..686a652 100644
49da8b
--- a/bin/show_qfiles
49da8b
+++ b/bin/show_qfiles
49da8b
@@ -37,7 +37,7 @@ import getopt
49da8b
 from cPickle import load
49da8b
 
49da8b
 import paths
49da8b
-from Mailman.i18n import _
49da8b
+from Mailman.i18n import C_
49da8b
 
49da8b
 try:
49da8b
     True, False
49da8b
@@ -52,7 +52,7 @@ def usage(code, msg=''):
49da8b
         fd = sys.stderr
49da8b
     else:
49da8b
         fd = sys.stdout
49da8b
-    print >> fd, _(__doc__)
49da8b
+    print >> fd, C_(__doc__)
49da8b
     if msg:
49da8b
         print >> fd, msg
49da8b
     sys.exit(code)
49da8b
diff --git a/bin/sync_members b/bin/sync_members
49da8b
index 13d0b2b..d302243 100755
49da8b
--- a/bin/sync_members
49da8b
+++ b/bin/sync_members
49da8b
@@ -86,7 +86,7 @@ from Mailman import MailList
49da8b
 from Mailman import Errors
49da8b
 from Mailman import Utils
49da8b
 from Mailman.UserDesc import UserDesc
49da8b
-from Mailman.i18n import _
49da8b
+from Mailman.i18n import C_
49da8b
 
49da8b
 
49da8b
 
49da8b
@@ -97,7 +97,7 @@ def usage(code, msg=''):
49da8b
         fd = sys.stderr
49da8b
     else:
49da8b
         fd = sys.stdout
49da8b
-    print >> fd, _(__doc__)
49da8b
+    print >> fd, C_(__doc__)
49da8b
     if msg:
49da8b
         print >> fd, msg
49da8b
     sys.exit(code)
49da8b
@@ -112,7 +112,7 @@ def yesno(opt):
49da8b
     elif yesno in ('n', 'no'):
49da8b
         return 0
49da8b
     else:
49da8b
-        usage(1, _('Bad choice: %(yesno)s'))
49da8b
+        usage(1, C_('Bad choice: %(yesno)s'))
49da8b
         # no return
49da8b
 
49da8b
 
49da8b
@@ -135,7 +135,7 @@ def main():
49da8b
         elif opt in ('-n', '--no-change'):
49da8b
             dryrun = 1
49da8b
             i += 1
49da8b
-            print _('Dry run mode')
49da8b
+            print C_('Dry run mode')
49da8b
         elif opt in ('-d', '--digest'):
49da8b
             digest = 1
49da8b
             i += 1
49da8b
@@ -156,11 +156,11 @@ def main():
49da8b
             i += 1
49da8b
         elif opt in ('-f', '--file'):
49da8b
             if filename is not None:
49da8b
-                usage(1, _('Only one -f switch allowed'))
49da8b
+                usage(1, C_('Only one -f switch allowed'))
49da8b
             try:
49da8b
                 filename = sys.argv[i+1]
49da8b
             except IndexError:
49da8b
-                usage(1, _('No argument to -f given'))
49da8b
+                usage(1, C_('No argument to -f given'))
49da8b
             i += 2
49da8b
         elif opt in ('-a', '--notifyadmin'):
49da8b
             notifyadmin = 1
49da8b
@@ -169,17 +169,17 @@ def main():
49da8b
             notifyadmin = yesno(opt)
49da8b
             i += 1
49da8b
         elif opt[0] == '-':
49da8b
-            usage(1, _('Illegal option: %(opt)s'))
49da8b
+            usage(1, C_('Illegal option: %(opt)s'))
49da8b
         else:
49da8b
             try:
49da8b
                 listname = sys.argv[i].lower()
49da8b
                 i += 1
49da8b
             except IndexError:
49da8b
-                usage(1, _('No listname given'))
49da8b
+                usage(1, C_('No listname given'))
49da8b
             break
49da8b
 
49da8b
     if listname is None or filename is None:
49da8b
-        usage(1, _('Must have a listname and a filename'))
49da8b
+        usage(1, C_('Must have a listname and a filename'))
49da8b
 
49da8b
     # read the list of addresses to sync to from the file
49da8b
     if filename == '-':
49da8b
@@ -188,7 +188,7 @@ def main():
49da8b
         try:
49da8b
             fp = open(filename)
49da8b
         except IOError, (code, msg):
49da8b
-            usage(1, _('Cannot read address file: %(filename)s: %(msg)s'))
49da8b
+            usage(1, C_('Cannot read address file: %(filename)s: %(msg)s'))
49da8b
         try:
49da8b
             filemembers = fp.readlines()
49da8b
         finally:
49da8b
@@ -200,7 +200,7 @@ def main():
49da8b
         addr = filemembers[i].strip()
49da8b
         if addr == '' or addr[:1] == '#':
49da8b
             del filemembers[i]
49da8b
-            print _('Ignore  :  %(addr)30s')
49da8b
+            print C_('Ignore  :  %(addr)30s')
49da8b
 
49da8b
     # first filter out any invalid addresses
49da8b
     filemembers = email.Utils.getaddresses(filemembers)
49da8b
@@ -209,17 +209,17 @@ def main():
49da8b
         try:
49da8b
             Utils.ValidateEmail(addr)
49da8b
         except Errors.EmailAddressError:
49da8b
-            print _('Invalid :  %(addr)30s')
49da8b
+            print C_('Invalid :  %(addr)30s')
49da8b
             invalid = 1
49da8b
     if invalid:
49da8b
-        print _('You must fix the preceding invalid addresses first.')
49da8b
+        print C_('You must fix the preceding invalid addresses first.')
49da8b
         sys.exit(1)
49da8b
 
49da8b
     # get the locked list object
49da8b
     try:
49da8b
         mlist = MailList.MailList(listname)
49da8b
     except Errors.MMListError, e:
49da8b
-        print _('No such list: %(listname)s')
49da8b
+        print C_('No such list: %(listname)s')
49da8b
         sys.exit(1)
49da8b
 
49da8b
     try:
49da8b
@@ -241,7 +241,7 @@ def main():
49da8b
                 needsadding[laddr] = (name, addr)
49da8b
 
49da8b
         if not needsadding and not addrs:
49da8b
-            print _('Nothing to do.')
49da8b
+            print C_('Nothing to do.')
49da8b
             sys.exit(0)
49da8b
 
49da8b
         enc = sys.getdefaultencoding()
49da8b
@@ -257,7 +257,7 @@ def main():
49da8b
                 if not dryrun:
49da8b
                     mlist.ApprovedAddMember(userdesc, welcome, notifyadmin)
49da8b
                 s = email.Utils.formataddr((name, addr)).encode(enc, 'replace')
49da8b
-                print _('Added  : %(s)s')
49da8b
+                print C_('Added  : %(s)s')
49da8b
             except Errors.MMAlreadyAMember:
49da8b
                 pass
49da8b
             except Errors.MembershipIsBanned, pattern:
49da8b
@@ -277,7 +277,7 @@ def main():
49da8b
                     # get rid of this member's entry
49da8b
                     mlist.removeMember(addr)
49da8b
             s = email.Utils.formataddr((name, addr)).encode(enc, 'replace')
49da8b
-            print _('Removed: %(s)s')
49da8b
+            print C_('Removed: %(s)s')
49da8b
 
49da8b
         mlist.Save()
49da8b
     finally:
49da8b
diff --git a/bin/transcheck b/bin/transcheck
49da8b
index 1fb3301..e375316 100755
49da8b
--- a/bin/transcheck
49da8b
+++ b/bin/transcheck
49da8b
@@ -36,7 +36,7 @@ import os
49da8b
 import getopt
49da8b
 
49da8b
 import paths
49da8b
-from Mailman.i18n import _
49da8b
+from Mailman.i18n import C_
49da8b
 
49da8b
 program = sys.argv[0]
49da8b
 
49da8b
@@ -47,7 +47,7 @@ def usage(code, msg=''):
49da8b
         fd = sys.stderr
49da8b
     else:
49da8b
         fd = sys.stdout
49da8b
-    print >> fd, _(__doc__)
49da8b
+    print >> fd, C_(__doc__)
49da8b
     if msg:
49da8b
         print >> fd, msg
49da8b
     sys.exit(code)
49da8b
diff --git a/bin/unshunt b/bin/unshunt
49da8b
index 842cc0f..e17ecae 100644
49da8b
--- a/bin/unshunt
49da8b
+++ b/bin/unshunt
49da8b
@@ -38,7 +38,7 @@ import getopt
49da8b
 import paths
49da8b
 from Mailman import mm_cfg
49da8b
 from Mailman.Queue.sbcache import get_switchboard
49da8b
-from Mailman.i18n import _
49da8b
+from Mailman.i18n import C_
49da8b
 
49da8b
 
49da8b
 
49da8b
@@ -47,7 +47,7 @@ def usage(code, msg=''):
49da8b
         fd = sys.stderr
49da8b
     else:
49da8b
         fd = sys.stdout
49da8b
-    print >> fd, _(__doc__)
49da8b
+    print >> fd, C_(__doc__)
49da8b
     if msg:
49da8b
         print >> fd, msg
49da8b
     sys.exit(code)
49da8b
@@ -82,7 +82,7 @@ def main():
49da8b
         except Exception, e:
49da8b
             # If there are any unshunting errors, log them and continue trying
49da8b
             # other shunted messages.
49da8b
-            print >> sys.stderr, _(
49da8b
+            print >> sys.stderr, C_(
49da8b
                 'Cannot unshunt message %(filebase)s, skipping:\n%(e)s')
49da8b
         else:
49da8b
             # Unlink the .bak file left by dequeue()
49da8b
diff --git a/bin/update b/bin/update
49da8b
index d74cae9..0ac5ffe 100755
49da8b
--- a/bin/update
49da8b
+++ b/bin/update
49da8b
@@ -52,7 +52,7 @@ from Mailman import MailList
49da8b
 from Mailman import Message
49da8b
 from Mailman import Pending
49da8b
 from Mailman.LockFile import TimeOutError
49da8b
-from Mailman.i18n import _
49da8b
+from Mailman.i18n import C_
49da8b
 from Mailman.Queue.Switchboard import Switchboard
49da8b
 from Mailman.OldStyleMemberships import OldStyleMemberships
49da8b
 from Mailman.MemberAdaptor import BYBOUNCE, ENABLED
49da8b
@@ -104,7 +104,7 @@ def make_varabs(relpath):
49da8b
 
49da8b
 def move_language_templates(mlist):
49da8b
     listname = mlist.internal_name()
49da8b
-    print _('Fixing language templates: %(listname)s')
49da8b
+    print C_('Fixing language templates: %(listname)s')
49da8b
     # Mailman 2.1 has a new cascading search for its templates, defined and
49da8b
     # described in Utils.py:maketext().  Putting templates in the top level
49da8b
     # templates/ subdir or the lists/<listname> subdir is deprecated and no
49da8b
@@ -193,8 +193,8 @@ def dolist(listname):
49da8b
     try:
49da8b
         mlist.Lock(0.5)
49da8b
     except TimeOutError:
49da8b
-        print >> sys.stderr, _('WARNING: could not acquire lock for list: '
49da8b
-                               '%(listname)s')
49da8b
+        print >> sys.stderr, C_('WARNING: could not acquire lock for list: '
49da8b
+                                '%(listname)s')
49da8b
         return 1
49da8b
 
49da8b
     # Sanity check the invariant that every BYBOUNCE disabled member must have
49da8b
@@ -212,13 +212,13 @@ def dolist(listname):
49da8b
         # re-disable them if necessary.
49da8b
         n = len(noinfo)
49da8b
         if n > 0:
49da8b
-            print _(
49da8b
+            print C_(
49da8b
                 'Resetting %(n)s BYBOUNCEs disabled addrs with no bounce info')
49da8b
             for addr in noinfo.keys():
49da8b
                 mlist.setDeliveryStatus(addr, ENABLED)
49da8b
 
49da8b
     # Update the held requests database
49da8b
-    print _("""Updating the held requests database.""")
49da8b
+    print C_("""Updating the held requests database.""")
49da8b
     mlist._UpdateRecords()
49da8b
 
49da8b
     mbox_dir = make_varabs('archives/private/%s.mbox' % (listname))
49da8b
@@ -240,7 +240,7 @@ def dolist(listname):
49da8b
     else:
49da8b
         # this shouldn't happen, but hey, just in case
49da8b
         if not os.path.isdir(mbox_dir):
49da8b
-            print _("""\
49da8b
+            print C_("""\
49da8b
 For some reason, %(mbox_dir)s exists as a file.  This won't work with
49da8b
 b6, so I'm renaming it to %(mbox_dir)s.tmp and proceeding.""")
49da8b
             os.rename(mbox_dir, "%s.tmp" % (mbox_dir))
49da8b
@@ -252,7 +252,7 @@ b6, so I'm renaming it to %(mbox_dir)s.tmp and proceeding.""")
49da8b
     # private one existing
49da8b
     if os.path.isfile(o_pri_mbox_file) and os.path.isfile(o_pub_mbox_file):
49da8b
         if mlist.archive_private:
49da8b
-            print _("""\
49da8b
+            print C_("""\
49da8b
 
49da8b
 %(listname)s has both public and private mbox archives.  Since this list
49da8b
 currently uses private archiving, I'm installing the private mbox archive
49da8b
@@ -267,7 +267,7 @@ script.
49da8b
         o_pub_mbox_file)
49da8b
             os.rename(o_pub_mbox_file, "%s.preb6" % (o_pub_mbox_file))
49da8b
         else:
49da8b
-            print _("""\
49da8b
+            print C_("""\
49da8b
 %s has both public and private mbox archives.  Since this list
49da8b
 currently uses public archiving, I'm installing the public mbox file
49da8b
 archive file (%s) as the active one, and renaming
49da8b
@@ -284,7 +284,7 @@ script.
49da8b
     # move private archive mbox there if it's around
49da8b
     # and take into account all sorts of absurdities
49da8b
     #
49da8b
-    print _('- updating old private mbox file')
49da8b
+    print C_('- updating old private mbox file')
49da8b
     if os.path.exists(o_pri_mbox_file):
49da8b
         if os.path.isfile(o_pri_mbox_file):
49da8b
             os.rename(o_pri_mbox_file, mbox_file)
49da8b
@@ -292,21 +292,21 @@ script.
49da8b
             newname = "%s.mm_install-dunno_what_this_was_but_its_in_the_way" \
49da8b
                       % o_pri_mbox_file
49da8b
             os.rename(o_pri_mbox_file, newname)
49da8b
-            print _("""\
49da8b
+            print C_("""\
49da8b
     unknown file in the way, moving
49da8b
         %(o_pri_mbox_file)s
49da8b
     to
49da8b
         %(newname)s""")
49da8b
         else:
49da8b
             # directory
49da8b
-            print _('Nothing to do.')
49da8b
+            print C_('Nothing to do.')
49da8b
 
49da8b
 
49da8b
     #
49da8b
     # move public archive mbox there if it's around
49da8b
     # and take into account all sorts of absurdities.
49da8b
     #
49da8b
-    print _('- updating old public mbox file')
49da8b
+    print C_('- updating old public mbox file')
49da8b
     if os.path.exists(o_pub_mbox_file):
49da8b
         if os.path.isfile(o_pub_mbox_file):
49da8b
             os.rename(o_pub_mbox_file, mbox_file)
49da8b
@@ -314,13 +314,13 @@ script.
49da8b
             newname = "%s.mm_install-dunno_what_this_was_but_its_in_the_way" \
49da8b
                       % o_pub_mbox_file
49da8b
             os.rename(o_pub_mbox_file, newname)
49da8b
-            print _("""\
49da8b
+            print C_("""\
49da8b
     unknown file in the way, moving
49da8b
         %(o_pub_mbox_file)s
49da8b
     to
49da8b
         %(newname)s""")
49da8b
         else: # directory
49da8b
-            print _('Nothing to do.')
49da8b
+            print C_('Nothing to do.')
49da8b
 
49da8b
     #
49da8b
     # move the html archives there
49da8b
@@ -350,7 +350,7 @@ script.
49da8b
         b4_tmpl_dir = os.path.join(tmpl_dir, mlist._internal_name)
49da8b
         new_tmpl_dir = os.path.join(list_dir, mlist._internal_name)
49da8b
         if os.path.exists(b4_tmpl_dir):
49da8b
-            print _("""\
49da8b
+            print C_("""\
49da8b
 - This list looks like it might have <= b4 list templates around""")
49da8b
             for f in os.listdir(b4_tmpl_dir):
49da8b
                 o_tmpl = os.path.join(b4_tmpl_dir, f)
49da8b
@@ -358,12 +358,12 @@ script.
49da8b
                 if os.path.exists(o_tmpl):
49da8b
                     if not os.path.exists(n_tmpl):
49da8b
                         os.rename(o_tmpl, n_tmpl)
49da8b
-                        print _('- moved %(o_tmpl)s to %(n_tmpl)s')
49da8b
+                        print C_('- moved %(o_tmpl)s to %(n_tmpl)s')
49da8b
                     else:
49da8b
-                        print _("""\
49da8b
+                        print C_("""\
49da8b
 - both %(o_tmpl)s and %(n_tmpl)s exist, leaving untouched""")
49da8b
                 else:
49da8b
-                    print _("""\
49da8b
+                    print C_("""\
49da8b
 - %(o_tmpl)s doesn't exist, leaving untouched""")
49da8b
     #
49da8b
     # Move all the templates to the en language subdirectory as required for
49da8b
@@ -393,23 +393,23 @@ def remove_old_sources(module):
49da8b
     src = '%s/%s' % (mm_cfg.PREFIX, module)
49da8b
     pyc = src + "c"
49da8b
     if os.path.isdir(src):
49da8b
-        print _('removing directory %(src)s and everything underneath')
49da8b
+        print C_('removing directory %(src)s and everything underneath')
49da8b
         shutil.rmtree(src)
49da8b
     elif os.path.exists(src):
49da8b
-        print _('removing %(src)s')
49da8b
+        print C_('removing %(src)s')
49da8b
         try:
49da8b
             os.unlink(src)
49da8b
         except os.error, rest:
49da8b
-            print _("Warning: couldn't remove %(src)s -- %(rest)s")
49da8b
+            print C_("Warning: couldn't remove %(src)s -- %(rest)s")
49da8b
     if module.endswith('.py') and os.path.exists(pyc):
49da8b
         try:
49da8b
             os.unlink(pyc)
49da8b
         except os.error, rest:
49da8b
-            print _("couldn't remove old file %(pyc)s -- %(rest)s")
49da8b
+            print C_("couldn't remove old file %(pyc)s -- %(rest)s")
49da8b
 
49da8b
 
49da8b
 def update_qfiles():
49da8b
-    print _('updating old qfiles')
49da8b
+    print C_('updating old qfiles')
49da8b
     prefix = `time.time()` + '+'
49da8b
     # Be sure the qfiles/in directory exists (we don't really need the
49da8b
     # switchboard object, but it's convenient for creating the directory).
49da8b
@@ -527,7 +527,7 @@ def dequeue(filebase):
49da8b
                 # This message was unparsable, most likely because its
49da8b
                 # MIME encapsulation was broken.  For now, there's not
49da8b
                 # much we can do about it.
49da8b
-                print _('message is unparsable: %(filebase)s')
49da8b
+                print C_('message is unparsable: %(filebase)s')
49da8b
                 msgfp.close()
49da8b
                 msgfp = None
49da8b
                 if mm_cfg.QRUNNER_SAVE_BAD_MESSAGES:
49da8b
@@ -560,7 +560,7 @@ def update_pending():
49da8b
     except IOError, e:
49da8b
         if e.errno <> errno.ENOENT: raise
49da8b
     else:
49da8b
-        print _('Updating Mailman 2.0 pending_subscriptions.db database')
49da8b
+        print C_('Updating Mailman 2.0 pending_subscriptions.db database')
49da8b
         db = marshal.load(fp)
49da8b
         # Convert to the pre-Mailman 2.1.5 format
49da8b
         db = Pending._update(db)
49da8b
@@ -571,10 +571,10 @@ def update_pending():
49da8b
         except IOError, e:
49da8b
             if e.errno <> errno.ENOENT: raise
49da8b
         else:
49da8b
-            print _('Updating Mailman 2.1.4 pending.pck database')
49da8b
+            print C_('Updating Mailman 2.1.4 pending.pck database')
49da8b
             db = cPickle.load(fp)
49da8b
     if db is None:
49da8b
-        print _('Nothing to do.')
49da8b
+        print C_('Nothing to do.')
49da8b
         return
49da8b
     # Now upgrade the database to the 2.1.5 format.  Each list now has its own
49da8b
     # pending.pck file, but only the RE_ENABLE operation actually recorded the
49da8b
@@ -595,7 +595,7 @@ def update_pending():
49da8b
             op = val[0]
49da8b
             data = val[1:]
49da8b
         except (IndexError, ValueError):
49da8b
-            print _('Ignoring bad pended data: %(key)s: %(val)s')
49da8b
+            print C_('Ignoring bad pended data: %(key)s: %(val)s')
49da8b
             continue
49da8b
         if op in (Pending.UNSUBSCRIPTION, Pending.CHANGE_OF_ADDRESS):
49da8b
             # data[0] is the address being unsubscribed
49da8b
@@ -611,7 +611,7 @@ def update_pending():
49da8b
             # data[0] is the hold id.  There better only be one entry per id
49da8b
             id = data[0]
49da8b
             if holds_by_id.has_key(id):
49da8b
-                print _('WARNING: Ignoring duplicate pending ID: %(id)s.')
49da8b
+                print C_('WARNING: Ignoring duplicate pending ID: %(id)s.')
49da8b
             else:
49da8b
                 holds_by_id[id] = (key, val)
49da8b
     # Now we have to lock every list and re-pend all the appropriate
49da8b
@@ -664,7 +664,7 @@ def update_pending():
49da8b
 def main():
49da8b
     errors = 0
49da8b
     # get rid of old stuff
49da8b
-    print _('getting rid of old source files')
49da8b
+    print C_('getting rid of old source files')
49da8b
     for mod in ('Mailman/Archiver.py', 'Mailman/HyperArch.py',
49da8b
                 'Mailman/HyperDatabase.py', 'Mailman/pipermail.py',
49da8b
                 'Mailman/smtplib.py', 'Mailman/Cookie.py',
49da8b
@@ -674,29 +674,29 @@ def main():
49da8b
         remove_old_sources(mod)
49da8b
     listnames = Utils.list_names()
49da8b
     if not listnames:
49da8b
-        print _('no lists == nothing to do, exiting')
49da8b
+        print C_('no lists == nothing to do, exiting')
49da8b
         return
49da8b
     #
49da8b
     # for people with web archiving, make sure the directories
49da8b
     # in the archiving are set with proper perms for b6.
49da8b
     #
49da8b
     if os.path.isdir("%s/public_html/archives" % mm_cfg.PREFIX):
49da8b
-        print _("""\
49da8b
+        print C_("""\
49da8b
 fixing all the perms on your old html archives to work with b6
49da8b
 If your archives are big, this could take a minute or two...""")
49da8b
         os.path.walk("%s/public_html/archives" % mm_cfg.PREFIX,
49da8b
                      archive_path_fixer, "")
49da8b
-        print _('done')
49da8b
+        print C_('done')
49da8b
     for listname in listnames:
49da8b
-        print _('Updating mailing list: %(listname)s')
49da8b
+        print C_('Updating mailing list: %(listname)s')
49da8b
         errors = errors + dolist(listname)
49da8b
         print
49da8b
-    print _('Updating Usenet watermarks')
49da8b
+    print C_('Updating Usenet watermarks')
49da8b
     wmfile = os.path.join(mm_cfg.DATA_DIR, 'gate_watermarks')
49da8b
     try:
49da8b
         fp = open(wmfile)
49da8b
     except IOError:
49da8b
-        print _('- nothing to update here')
49da8b
+        print C_('- nothing to update here')
49da8b
     else:
49da8b
         d = marshal.load(fp)
49da8b
         fp.close()
49da8b
@@ -708,7 +708,7 @@ If your archives are big, this could take a minute or two...""")
49da8b
             try:
49da8b
                 mlist.Lock(0.5)
49da8b
             except TimeOutError:
49da8b
-                print >> sys.stderr, _(
49da8b
+                print >> sys.stderr, C_(
49da8b
                     'WARNING: could not acquire lock for list: %(listname)s')
49da8b
                 errors = errors + 1
49da8b
             else:
49da8b
@@ -719,7 +719,7 @@ If your archives are big, this could take a minute or two...""")
49da8b
                 mlist.Save()
49da8b
                 mlist.Unlock()
49da8b
         os.unlink(wmfile)
49da8b
-        print _('- usenet watermarks updated and gate_watermarks removed')
49da8b
+        print C_('- usenet watermarks updated and gate_watermarks removed')
49da8b
     # In Mailman 2.1, the pending database format and file name changed, but
49da8b
     # in Mailman 2.1.5 it changed again.  This should update all existing
49da8b
     # files to the 2.1.5 format.
49da8b
@@ -733,7 +733,7 @@ If your archives are big, this could take a minute or two...""")
49da8b
     # There's no good way of figuring this out for releases prior to 2.0beta2
49da8b
     # :(
49da8b
     if lastversion == NOTFRESH:
49da8b
-        print _("""
49da8b
+        print C_("""
49da8b
 
49da8b
 NOTE NOTE NOTE NOTE NOTE
49da8b
 
49da8b
@@ -760,7 +760,7 @@ def usage(code, msg=''):
49da8b
         fd = sys.stderr
49da8b
     else:
49da8b
         fd = sys.stdout
49da8b
-    print >> fd, _(__doc__) % globals()
49da8b
+    print >> fd, C_(__doc__) % globals()
49da8b
     if msg:
49da8b
         print >> sys.stderr, msg
49da8b
     sys.exit(code)
49da8b
@@ -790,15 +790,15 @@ if __name__ == '__main__':
49da8b
     hextversion = hex(thisversion)
49da8b
     if lastversion == thisversion and not force:
49da8b
         # nothing to do
49da8b
-        print _('No updates are necessary.')
49da8b
+        print C_('No updates are necessary.')
49da8b
         sys.exit(0)
49da8b
     if lastversion > thisversion and not force:
49da8b
-        print _("""\
49da8b
+        print C_("""\
49da8b
 Downgrade detected, from version %(hexlversion)s to version %(hextversion)s
49da8b
 This is probably not safe.
49da8b
 Exiting.""")
49da8b
         sys.exit(1)
49da8b
-    print _('Upgrading from version %(hexlversion)s to %(hextversion)s')
49da8b
+    print C_('Upgrading from version %(hexlversion)s to %(hextversion)s')
49da8b
     errors = main()
49da8b
     if not errors:
49da8b
         # Record the version we just upgraded to
49da8b
@@ -807,7 +807,7 @@ Exiting.""")
49da8b
         fp.close()
49da8b
     else:
49da8b
         lockdir = mm_cfg.LOCK_DIR
49da8b
-        print _('''\
49da8b
+        print C_('''\
49da8b
 
49da8b
 ERROR:
49da8b
 
49da8b
diff --git a/bin/version b/bin/version
49da8b
index 72c50b8..4efba6f 100644
49da8b
--- a/bin/version
49da8b
+++ b/bin/version
49da8b
@@ -21,6 +21,6 @@
49da8b
 
49da8b
 import paths
49da8b
 import Mailman.mm_cfg
49da8b
-from Mailman.i18n import _
49da8b
+from Mailman.i18n import C_
49da8b
 
49da8b
-print _('Using Mailman version:'), Mailman.mm_cfg.VERSION
49da8b
+print C_('Using Mailman version:'), Mailman.mm_cfg.VERSION
49da8b
diff --git a/bin/withlist b/bin/withlist
49da8b
index 38ab9ab..b23588a 100644
49da8b
--- a/bin/withlist
49da8b
+++ b/bin/withlist
49da8b
@@ -154,7 +154,7 @@ def usage(code, msg=''):
49da8b
         fd = sys.stderr
49da8b
     else:
49da8b
         fd = sys.stdout
49da8b
-    print >> fd, _(__doc__)
49da8b
+    print >> fd, C_(__doc__)
49da8b
     if msg:
49da8b
         print >> fd, msg
49da8b
     sys.exit(code)
49da8b
@@ -172,11 +172,11 @@ def atexit():
49da8b
     if m.Locked():
49da8b
         if VERBOSE:
49da8b
             listname = m.internal_name()
49da8b
-            print >> sys.stderr, _(
49da8b
+            print >> sys.stderr, C_(
49da8b
                 'Unlocking (but not saving) list: %(listname)s')
49da8b
         m.Unlock()
49da8b
     if VERBOSE:
49da8b
-        print >> sys.stderr, _('Finalizing')
49da8b
+        print >> sys.stderr, C_('Finalizing')
49da8b
     del m
49da8b
 
49da8b
 
49da8b
@@ -185,16 +185,16 @@ def do_list(listname, args, func):
49da8b
     global m
49da8b
     # first try to open mailing list
49da8b
     if VERBOSE:
49da8b
-        print >> sys.stderr, _('Loading list %(listname)s'),
49da8b
+        print >> sys.stderr, C_('Loading list %(listname)s'),
49da8b
         if LOCK:
49da8b
-            print >> sys.stderr, _('(locked)')
49da8b
+            print >> sys.stderr, C_('(locked)')
49da8b
         else:
49da8b
-            print >> sys.stderr, _('(unlocked)')
49da8b
+            print >> sys.stderr, C_('(unlocked)')
49da8b
 
49da8b
     try:
49da8b
         m = MailList.MailList(listname, lock=LOCK)
49da8b
     except Errors.MMUnknownListError:
49da8b
-        print >> sys.stderr, _('Unknown list: %(listname)s')
49da8b
+        print >> sys.stderr, C_('Unknown list: %(listname)s')
49da8b
         m = None
49da8b
 
49da8b
     # try to import the module and run the callable
49da8b
@@ -234,7 +234,7 @@ def main():
49da8b
             all = True
49da8b
 
49da8b
     if len(args) < 1 and not all:
49da8b
-        warning = _('No list name supplied.')
49da8b
+        warning = C_('No list name supplied.')
49da8b
         if interact:
49da8b
             # Let them keep going
49da8b
             print warning
49da8b
@@ -243,7 +243,7 @@ def main():
49da8b
             usage(1, warning)
49da8b
 
49da8b
     if all and not run:
49da8b
-        usage(1, _('--all requires --run'))
49da8b
+        usage(1, C_('--all requires --run'))
49da8b
 
49da8b
     # The default for interact is 1 unless -r was given
49da8b
     if interact is None:
49da8b
@@ -263,11 +263,11 @@ def main():
49da8b
             module = run[:i]
49da8b
             callable = run[i+1:]
49da8b
         if VERBOSE:
49da8b
-            print >> sys.stderr, _('Importing %(module)s...')
49da8b
+            print >> sys.stderr, C_('Importing %(module)s...')
49da8b
         __import__(module)
49da8b
         mod = sys.modules[module]
49da8b
         if VERBOSE:
49da8b
-            print >> sys.stderr, _('Running %(module)s.%(callable)s()...')
49da8b
+            print >> sys.stderr, C_('Running %(module)s.%(callable)s()...')
49da8b
         func = getattr(mod, callable)
49da8b
 
49da8b
     if all:
49da8b
@@ -288,7 +288,7 @@ def main():
49da8b
         namespace = globals().copy()
49da8b
         namespace.update(locals())
49da8b
         if dolist:
49da8b
-            ban = _("The variable `m' is the %(listname)s MailList instance")
49da8b
+            ban = C_("The variable `m' is the %(listname)s MailList instance")
49da8b
         else:
49da8b
             ban = None
49da8b
         code.InteractiveConsole(namespace).interact(ban)