Cleanup up run()

This commit is contained in:
Kovid Goyal 2016-06-25 10:10:37 +05:30
parent 7937c083e4
commit 95bb9e3c8b

View File

@ -216,6 +216,12 @@ class Translations(POT): # {{{
def run(self, opts): def run(self, opts):
self.compile_content_server_translations() self.compile_content_server_translations()
self.compile_main_translations()
self.write_stats()
self.freeze_locales()
self.compile_user_manual_translations()
def compile_main_translations(self):
l = {} l = {}
lc_dataf = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'lc_data.py') lc_dataf = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'lc_data.py')
exec(compile(open(lc_dataf, 'rb').read(), lc_dataf, 'exec'), l, l) exec(compile(open(lc_dataf, 'rb').read(), lc_dataf, 'exec'), l, l)
@ -255,10 +261,6 @@ class Translations(POT): # {{{
print (err) print (err)
raise SystemExit(1) raise SystemExit(1)
self.write_stats()
self.freeze_locales()
self.compile_user_manual_translations()
def compile_content_server_translations(self): def compile_content_server_translations(self):
self.info('\nCompiling content-server translations') self.info('\nCompiling content-server translations')
from calibre.utils.rapydscript import msgfmt from calibre.utils.rapydscript import msgfmt