diff options
author | Yasuhito FUTATSUKI at POEM <futatuki@poem.co.jp> | 2016-02-22 17:51:37 +0900 |
---|---|---|
committer | Yasuhito FUTATSUKI at POEM <futatuki@poem.co.jp> | 2016-02-22 17:51:37 +0900 |
commit | 6aaafb6c05840389f1dd9139da9694f3b43c57df (patch) | |
tree | 3ca127f0bd34ede1ff388fa529fffad522d424d8 /bin/add_members | |
parent | 3c78c57cc88877f701a935ce009efd39d31925e6 (diff) | |
download | mailman2-6aaafb6c05840389f1dd9139da9694f3b43c57df.tar.gz mailman2-6aaafb6c05840389f1dd9139da9694f3b43c57df.tar.xz mailman2-6aaafb6c05840389f1dd9139da9694f3b43c57df.zip |
Importing locale patch for command line utils, from RHEL6 rpm source
(for -japan-poem, originally imported from 2.1.12-18 package for RHEL6
rpm source)
Diffstat (limited to '')
-rwxr-xr-x | bin/add_members | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/bin/add_members b/bin/add_members index a471919e..36ed3670 100755 --- a/bin/add_members +++ b/bin/add_members @@ -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) |