diff options
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') |