aboutsummaryrefslogtreecommitdiffstats
path: root/bin/add_members
diff options
context:
space:
mode:
Diffstat (limited to 'bin/add_members')
-rwxr-xr-xbin/add_members19
1 files changed, 10 insertions, 9 deletions
diff --git a/bin/add_members b/bin/add_members
index a471919e..bb1c0678 100755
--- a/bin/add_members
+++ b/bin/add_members
@@ -1,6 +1,6 @@
#! @PYTHON@
#
-# Copyright (C) 1998-2013 by the Free Software Foundation, Inc.
+# Copyright (C) 1998-2016 by the Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -86,6 +86,7 @@ from Mailman import MailList
from Mailman import MemberAdaptor
_ = i18n._
+C_ = i18n.C_
@@ -94,7 +95,7 @@ def usage(status, msg=''):
fd = sys.stderr
else:
fd = sys.stdout
- print >> fd, _(__doc__)
+ print >> fd, C_(__doc__)
if msg:
print >> fd, msg
sys.exit(status)
@@ -121,7 +122,7 @@ class Tee:
self.__outfp = outfp
def write(self, msg):
- sys.stdout.write(msg)
+ sys.stdout.write(i18n.tolocale(msg))
self.__outfp.write(msg)
@@ -196,14 +197,14 @@ def main():
elif arg.lower()[0] == 'n':
send_welcome_msg = 0
else:
- usage(1, _('Bad argument to -w/--welcome-msg: %(arg)s'))
+ usage(1, C_('Bad argument to -w/--welcome-msg: %(arg)s'))
elif opt in ('-a', '--admin-notify'):
if arg.lower()[0] == 'y':
admin_notif = 1
elif arg.lower()[0] == 'n':
admin_notif = 0
else:
- usage(1, _('Bad argument to -a/--admin-notify: %(arg)s'))
+ usage(1, C_('Bad argument to -a/--admin-notify: %(arg)s'))
elif opt in ('-n', '--nomail'):
nomail = True
@@ -211,13 +212,13 @@ def main():
usage(1)
if dfile == "-" and nfile == "-":
- usage(1, _('Cannot read both digest and normal members '
- 'from standard input.'))
+ usage(1, C_('Cannot read both digest and normal members '
+ 'from standard input.'))
try:
mlist = MailList.MailList(listname)
except Errors.MMUnknownListError:
- usage(1, _('No such list: %(listname)s'))
+ usage(1, C_('No such list: %(listname)s'))
# Set up defaults
if send_welcome_msg is None:
@@ -237,7 +238,7 @@ def main():
nmembers = readfile(nfile)
if not dmembers and not nmembers:
- usage(0, _('Nothing to do.'))
+ usage(0, C_('Nothing to do.'))
s = StringIO()
i18n.set_language(mlist.preferred_language)