Sjorten compile transations output

This commit is contained in:
Kovid Goyal 2019-12-05 23:26:12 +05:30
parent 4d09491e01
commit 2865326de3
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -348,7 +348,7 @@ class Translations(POT): # {{{
handle_stats(src, stats_cache(src)) handle_stats(src, stats_cache(src))
else: else:
if file_ok is None or file_ok(data, src): if file_ok is None or file_ok(data, src):
self.info('\t' + os.path.relpath(src, self.j(self.d(self.SRC), 'translations'))) # self.info('\t' + os.path.relpath(src, self.j(self.d(self.SRC), 'translations')))
if islinux: if islinux:
msgfmt = ['msgfmt'] msgfmt = ['msgfmt']
else: else:
@ -359,6 +359,7 @@ class Translations(POT): # {{{
if action_per_file is not None: if action_per_file is not None:
action_per_file(src) action_per_file(src)
self.info(f'\tCompiling {len(jobs)} files')
for (src, dest), line in zip(ok_files, parallel_check_output(jobs, self.info)): for (src, dest), line in zip(ok_files, parallel_check_output(jobs, self.info)):
self.write_cache(open(dest, 'rb').read(), hashmap[src], src) self.write_cache(open(dest, 'rb').read(), hashmap[src], src)
nums = tuple(map(int, re.findall(r'\d+', line))) nums = tuple(map(int, re.findall(r'\d+', line)))
@ -500,7 +501,7 @@ class Translations(POT): # {{{
if current_hash == saved_hash: if current_hash == saved_hash:
raw = saved_data raw = saved_data
else: else:
self.info('\tParsing ' + os.path.basename(src)) # self.info('\tParsing ' + os.path.basename(src))
raw = None raw = None
po_data = data.decode('utf-8') po_data = data.decode('utf-8')
data = json.loads(msgfmt(po_data)) data = json.loads(msgfmt(po_data))