diff options
author | Mark Sapiro <mark@msapiro.net> | 2016-02-27 15:21:12 -0800 |
---|---|---|
committer | Mark Sapiro <mark@msapiro.net> | 2016-02-27 15:21:12 -0800 |
commit | 95385417e926517c13ee769ef915ce5710a515f2 (patch) | |
tree | a39eccce0b844476a3715f328ee6712a5d62640e /bin/add_members | |
parent | 1833e1e51f4994d733c4ef3fca7c6ef7a4fd519e (diff) | |
parent | b3e0912e4d982e53eccac906fad347e8f1792b97 (diff) | |
download | mailman2-95385417e926517c13ee769ef915ce5710a515f2.tar.gz mailman2-95385417e926517c13ee769ef915ce5710a515f2.tar.xz mailman2-95385417e926517c13ee769ef915ce5710a515f2.zip |
Fixed l10n to use correct charset for command-line scripts.
Diffstat (limited to 'bin/add_members')
-rwxr-xr-x | bin/add_members | 19 |
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) |