if len(catalog):
percentage = translated * 100 // len(catalog)
self.log.info(
- '%d of %d messages (%d%%) translated in %r',
+ '%d of %d messages (%d%%) translated in %s',
translated, len(catalog), percentage, po_file
)
if catalog.fuzzy and not self.use_fuzzy:
- self.log.info('catalog %r is marked as fuzzy, skipping', po_file)
+ self.log.info('catalog %s is marked as fuzzy, skipping', po_file)
continue
for message, errors in catalog.check():
'error: %s:%d: %s', po_file, message.lineno, error
)
- self.log.info('compiling catalog %r to %r', po_file, mo_file)
+ self.log.info('compiling catalog %s to %s', po_file, mo_file)
outfile = open(mo_file, 'wb')
try:
def run(self):
self.log.info(
- 'creating catalog %r based on %r', self.output_file, self.input_file
+ 'creating catalog %s based on %s', self.output_file, self.input_file
)
infile = open(self.input_file, 'rb')
raise DistutilsOptionError('no message catalogs found')
for locale, filename in po_files:
- self.log.info('updating catalog %r based on %r', filename, self.input_file)
+ self.log.info('updating catalog %s based on %s', filename, self.input_file)
infile = open(filename, 'rb')
try:
catalog = read_po(infile, locale=locale, domain=domain)
'-d', self._i18n_dir()])
assert not os.path.isfile(mo_file), 'Expected no file at %r' % mo_file
self.assertEqual("""\
-catalog %r is marked as fuzzy, skipping
+catalog %s is marked as fuzzy, skipping
""" % (po_file), sys.stderr.getvalue())
def test_compile_fuzzy_catalog(self):
'-d', self._i18n_dir()])
assert os.path.isfile(mo_file)
self.assertEqual("""\
-compiling catalog %r to %r
+compiling catalog %s to %s
""" % (po_file, mo_file), sys.stderr.getvalue())
finally:
if os.path.isfile(mo_file):
'-d', self._i18n_dir()])
assert os.path.isfile(mo_file)
self.assertEqual("""\
-compiling catalog %r to %r
+compiling catalog %s to %s
""" % (po_file, mo_file), sys.stderr.getvalue())
finally:
if os.path.isfile(mo_file):
for mo_file in [mo_foo, mo_bar]:
assert os.path.isfile(mo_file)
self.assertEqual("""\
-compiling catalog %r to %r
-compiling catalog %r to %r
+compiling catalog %s to %s
+compiling catalog %s to %s
""" % (po_foo, mo_foo, po_bar, mo_bar), sys.stderr.getvalue())
finally: