Blame SOURCES/mailman-2.1.9-LC_CTYPE.patch

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