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/newlist | |
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/newlist')
-rwxr-xr-x | bin/newlist | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/bin/newlist b/bin/newlist index f80595c8..202587fa 100755 --- a/bin/newlist +++ b/bin/newlist @@ -112,6 +112,7 @@ from Mailman import Message from Mailman import i18n _ = i18n._ +C_ = i18n.C_ PROGRAM = sys.argv[0] @@ -122,7 +123,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) @@ -158,12 +159,12 @@ def main(): # Is the language known? if lang not in mm_cfg.LC_DESCRIPTIONS.keys(): - usage(1, _('Unknown language: %(lang)s')) + usage(1, C_('Unknown language: %(lang)s')) if len(args) > 0: listname = args[0] else: - listname = raw_input(_('Enter the name of the list: ')) + listname = raw_input(C_('Enter the name of the list: ')) listname = listname.lower() if '@' in listname: @@ -178,22 +179,22 @@ def main(): web_page_url = mm_cfg.DEFAULT_URL_PATTERN % urlhost if Utils.list_exists(listname): - usage(1, _('List already exists: %(listname)s')) + usage(1, C_('List already exists: %(listname)s')) if len(args) > 1: owner_mail = args[1] else: owner_mail = raw_input( - _('Enter the email of the person running the list: ')) + C_('Enter the email of the person running the list: ')) if len(args) > 2: listpasswd = args[2] else: - listpasswd = getpass.getpass(_('Initial %(listname)s password: ')) + listpasswd = getpass.getpass(C_('Initial %(listname)s password: ')) # List passwords cannot be empty listpasswd = listpasswd.strip() if not listpasswd: - usage(1, _('The list password cannot be empty')) + usage(1, C_('The list password cannot be empty')) mlist = MailList.MailList() try: @@ -213,13 +214,13 @@ def main(): finally: os.umask(oldmask) except Errors.BadListNameError, s: - usage(1, _('Illegal list name: %(s)s')) + usage(1, C_('Illegal list name: %(s)s')) except Errors.EmailAddressError, s: - usage(1, _('Bad owner email address: %(s)s') + - _(' - owner addresses need to be fully-qualified names' - ' like "owner@example.com", not just "owner".')) + usage(1, C_('Bad owner email address: %(s)s') + + C_(' - owner addresses need to be fully-qualified names' + ' like "owner@example.com", not just "owner".')) except Errors.MMListAlreadyExistsError: - usage(1, _('List already exists: %(listname)s')) + usage(1, C_('List already exists: %(listname)s')) # Assign domain-specific attributes mlist.host_name = host_name @@ -240,7 +241,7 @@ def main(): # And send the notice to the list owner if not quiet and not automate: - print _('Hit enter to notify %(listname)s owner...'), + print C_('Hit enter to notify %(listname)s owner...'), sys.stdin.readline() if not quiet: siteowner = Utils.get_site_email(mlist.host_name, 'owner') |