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/clone_member | |
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 'bin/clone_member')
-rwxr-xr-x | bin/clone_member | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/bin/clone_member b/bin/clone_member index 915c540f..d9ff2247 100755 --- a/bin/clone_member +++ b/bin/clone_member @@ -72,7 +72,7 @@ import paths from Mailman import MailList from Mailman import Utils from Mailman import Errors -from Mailman.i18n import _ +from Mailman.i18n import C_ @@ -81,7 +81,7 @@ def usage(code, msg=''): fd = sys.stderr else: fd = sys.stdout - print >> fd, _(__doc__) + print >> fd, C_(__doc__) if msg: print >> fd, msg sys.exit(code) @@ -91,14 +91,14 @@ def usage(code, msg=''): def dolist(mlist, options): SPACE = ' ' if not options.quiet: - print _('processing mailing list:'), mlist.internal_name() + print C_('processing mailing list:'), mlist.internal_name() # scan the list owners. TBD: mlist.owner keys should be lowercase? oldowners = mlist.owner[:] oldowners.sort() if options.admintoo: if not options.quiet: - print _(' scanning list owners:'), SPACE.join(oldowners) + print C_(' scanning list owners:'), SPACE.join(oldowners) newowners = {} foundp = 0 for owner in mlist.owner: @@ -116,9 +116,9 @@ def dolist(mlist, options): if not options.quiet: if newowners <> oldowners: print - print _(' new list owners:'), SPACE.join(newowners) + print C_(' new list owners:'), SPACE.join(newowners) else: - print _('(no change)') + print C_('(no change)') # see if the fromaddr is a digest member or regular member if options.lfromaddr in mlist.getDigestMemberKeys(): @@ -127,7 +127,7 @@ def dolist(mlist, options): digest = 0 else: if not options.quiet: - print _(' address not found:'), options.fromaddr + print C_(' address not found:'), options.fromaddr return # Check for banned to address. pattern = mlist.GetBannedPattern(options.toaddr) @@ -142,13 +142,13 @@ def dolist(mlist, options): mlist.changeMemberAddress(options.fromaddr, options.toaddr, not options.remove) if not options.quiet: - print _(' clone address added:'), options.toaddr + print C_(' clone address added:'), options.toaddr except Errors.MMAlreadyAMember: if not options.quiet: - print _(' clone address is already a member:'), options.toaddr + print C_(' clone address is already a member:'), options.toaddr if options.remove: - print _(' original address removed:'), options.fromaddr + print C_(' original address removed:'), options.fromaddr @@ -199,7 +199,7 @@ def main(): try: Utils.ValidateEmail(toaddr) except Errors.EmailAddressError: - usage(1, _('Not a valid email address: %(toaddr)s')) + usage(1, C_('Not a valid email address: %(toaddr)s')) lfromaddr = fromaddr.lower() options.toaddr = toaddr options.fromaddr = fromaddr @@ -212,7 +212,7 @@ def main(): try: mlist = MailList.MailList(listname) except Errors.MMListError, e: - print _('Error opening list "%(listname)s", skipping.\n%(e)s') + print C_('Error opening list "%(listname)s", skipping.\n%(e)s') continue try: dolist(mlist, options) |