From 6aaafb6c05840389f1dd9139da9694f3b43c57df Mon Sep 17 00:00:00 2001 From: Yasuhito FUTATSUKI at POEM Date: Mon, 22 Feb 2016 17:51:37 +0900 Subject: 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) --- bin/change_pw | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'bin/change_pw') diff --git a/bin/change_pw b/bin/change_pw index 67d56392..35be13d4 100644 --- a/bin/change_pw +++ b/bin/change_pw @@ -77,6 +77,7 @@ from Mailman import Message from Mailman import i18n _ = i18n._ +C_ = i18n.C_ SPACE = ' ' @@ -87,7 +88,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) @@ -103,7 +104,7 @@ def openlist(listname): try: mlist = MailList.MailList(listname, lock=0) except Errors.MMListError, e: - usage(1, _('No such list "%(listname)s"\n%(e)s')) + usage(1, C_('No such list "%(listname)s"\n%(e)s')) _listcache[listname] = mlist return mlist @@ -155,7 +156,7 @@ def main(): listnames[name] = 1 if not listnames: - print >> sys.stderr, _('Nothing to do.') + print >> sys.stderr, C_('Nothing to do.') sys.exit(0) # Set the password on the lists @@ -177,7 +178,7 @@ def main(): mlist.Unlock() # Notification - print _('New %(listname)s password: %(notifypassword)s') + print C_('New %(listname)s password: %(notifypassword)s') if not quiet: otrans = i18n.get_translation() i18n.set_language(mlist.preferred_language) -- cgit v1.2.3 From e7519290ad288df840bc86d8dcaea524407df964 Mon Sep 17 00:00:00 2001 From: Yasuhito FUTATSUKI at POEM Date: Mon, 22 Feb 2016 20:06:27 +0900 Subject: * add option to pick up C_() texts to make potfile * revise command line utils _()/C_() usage (not tested at all) --- bin/change_pw | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'bin/change_pw') diff --git a/bin/change_pw b/bin/change_pw index 35be13d4..f3bb1977 100644 --- a/bin/change_pw +++ b/bin/change_pw @@ -142,11 +142,11 @@ def main(): if args: strargs = SPACE.join(args) - usage(1, _('Bad arguments: %(strargs)s')) + usage(1, C_('Bad arguments: %(strargs)s')) if password is not None: if not password: - usage(1, _('Empty list passwords are not allowed')) + usage(1, C_('Empty list passwords are not allowed')) shapassword = Utils.sha_new(password).hexdigest() if domains: -- cgit v1.2.3