diff options
| author | bwarsaw | 2000-12-07 19:24:51 +0000 |
|---|---|---|
| committer | bwarsaw | 2000-12-07 19:24:51 +0000 |
| commit | f80f72d57ce4e6ef145502ef71bcc8f7bed592a1 (patch) | |
| tree | 08a602db2bfaa1f0670c3c48d8ad0982c271bfaa /cron/bumpdigests | |
| parent | a405e7481d9d5b60ac0101b067c9fefff2b796f6 (diff) | |
| download | mailman-f80f72d57ce4e6ef145502ef71bcc8f7bed592a1.tar.gz mailman-f80f72d57ce4e6ef145502ef71bcc8f7bed592a1.tar.zst mailman-f80f72d57ce4e6ef145502ef71bcc8f7bed592a1.zip | |
Start of support for i18n; marking of translatable strings.
Use extended print statement and other Python 2.0 features.
Diffstat (limited to '')
| -rw-r--r-- | cron/bumpdigests | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/cron/bumpdigests b/cron/bumpdigests index 7c6642fb4..891c68b9e 100644 --- a/cron/bumpdigests +++ b/cron/bumpdigests @@ -36,6 +36,7 @@ import paths from Mailman import MailList from Mailman import Utils from Mailman import Errors +from Mailman.i18n import _ # Work around known problems with some RedHat cron daemons import signal @@ -46,9 +47,9 @@ PROGRAM = sys.argv[0] def usage(code, msg=''): - print __doc__ % globals() + print >> sys.stderr, _(__doc__) if msg: - print msg + print >> sys.stderr, msg sys.exit(code) @@ -69,7 +70,7 @@ def main(): listnames = Utils.list_names() if not listnames: - print 'Nothing to do.' + print _('Nothing to do.') sys.exit(0) for listname in listnames: @@ -77,9 +78,9 @@ def main(): # be sure the list is locked mlist = MailList.MailList(listname) except Errors.MMListError, e: - usage(1, 'No such list: %s' % listname) + usage(1, _('No such list: %(listname)s')) try: - mlist.volume = mlist.volume + 1 + mlist.volume += 1 mlist.next_digest_number = 1 finally: mlist.Save() |
