Mercurial > babel > old > babel-test
changeset 231:772739bbd2e8
Use proper logging in distutils `compile_catalog` command.
author | cmlenz |
---|---|
date | Sun, 29 Jul 2007 20:04:17 +0000 |
parents | 2097287603e7 |
children | 0e5c33776833 |
files | babel/messages/frontend.py |
diffstat | 1 files changed, 7 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/babel/messages/frontend.py +++ b/babel/messages/frontend.py @@ -145,20 +145,20 @@ for message in list(catalog)[1:]: if message.string: translated +=1 - print "%d of %d messages (%d%%) translated in %r" % ( - translated, len(catalog), translated * 100 // len(catalog), - po_file - ) + log.info('%d of %d messages (%d%%) translated in %r', + translated, len(catalog), + translated * 100 // len(catalog), po_file) if catalog.fuzzy and not self.use_fuzzy: - print 'catalog %r is marked as fuzzy, skipping' % (po_file) + log.warn('catalog %r is marked as fuzzy, skipping', po_file) continue for message, errors in catalog.check(): for error in errors: - print 'error: %s:%d: %s' % (po_file, message.lineno, error) + log.error('error: %s:%d: %s', po_file, message.lineno, + error) - print 'compiling catalog %r to %r' % (po_file, mo_file) + log.info('compiling catalog %r to %r', po_file, mo_file) outfile = open(mo_file, 'w') try: