Add basic Dutch translations by jelle619 and translation scripts

This commit is contained in:
Jeremy Zhang
2017-11-16 03:09:53 +00:00
parent f95cd7060c
commit 3007266556
6 changed files with 193 additions and 9 deletions

8
webapp/bin/tr_compile.py Normal file
View File

@ -0,0 +1,8 @@
#!flask/bin/python
import os
import sys
if sys.platform == 'win32':
pybabel = 'flask\\Scripts\\pybabel'
else:
pybabel = 'pybabel'
os.system(pybabel + ' compile -d titanembeds/translations')

13
webapp/bin/tr_init.py Normal file
View File

@ -0,0 +1,13 @@
#!flask/bin/python
import os
import sys
if sys.platform == 'win32':
pybabel = 'flask\\Scripts\\pybabel'
else:
pybabel = 'pybabel'
if len(sys.argv) != 2:
print("usage: tr_init <language-code>")
sys.exit(1)
os.system(pybabel + ' extract -F babel.cfg -k lazy_gettext -o messages.pot titanembeds')
os.system(pybabel + ' init -i messages.pot -d titanembeds/translations -l ' + sys.argv[1])
os.unlink('messages.pot')

10
webapp/bin/tr_update.py Normal file
View File

@ -0,0 +1,10 @@
#!flask/bin/python
import os
import sys
if sys.platform == 'win32':
pybabel = 'flask\\Scripts\\pybabel'
else:
pybabel = 'pybabel'
os.system(pybabel + ' extract -F babel.cfg -k lazy_gettext -o messages.pot titanembeds')
os.system(pybabel + ' update -i messages.pot -d titanembeds/translations')
os.unlink('messages.pot')