po2json is only needed in development environments, so don't try to always import it
This commit is contained in:
parent
0adbef9696
commit
a9736b96c0
1 changed files with 2 additions and 1 deletions
3
setup.py
3
setup.py
|
|
@ -14,7 +14,6 @@ import shutil
|
||||||
import glob
|
import glob
|
||||||
|
|
||||||
from babel.messages import frontend as babel
|
from babel.messages import frontend as babel
|
||||||
import po2json
|
|
||||||
|
|
||||||
I18N_MAPPING_FILE = "babel.cfg"
|
I18N_MAPPING_FILE = "babel.cfg"
|
||||||
I18N_DOMAIN = "messages"
|
I18N_DOMAIN = "messages"
|
||||||
|
|
@ -129,6 +128,8 @@ class CompileTranslation(Command):
|
||||||
def run(self):
|
def run(self):
|
||||||
self.babel_compile_messages.run()
|
self.babel_compile_messages.run()
|
||||||
|
|
||||||
|
import po2json
|
||||||
|
|
||||||
for lang_code in os.listdir(I18N_OUTPUT_DIR_PY):
|
for lang_code in os.listdir(I18N_OUTPUT_DIR_PY):
|
||||||
full_path = os.path.join(I18N_OUTPUT_DIR_PY, lang_code)
|
full_path = os.path.join(I18N_OUTPUT_DIR_PY, lang_code)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue