add script to automatically generate all languages
This commit is contained in:
13
scripts/compile_lang.py
Normal file
13
scripts/compile_lang.py
Normal file
@@ -0,0 +1,13 @@
|
||||
import os, glob
|
||||
from scripts import msgfmt
|
||||
|
||||
import sys
|
||||
|
||||
script_dir = os.path.dirname(os.path.abspath(__file__))
|
||||
locale_path = os.path.abspath(os.path.join(script_dir, '..', 'locale'))
|
||||
|
||||
for name in glob.iglob(locale_path + '/**'):
|
||||
if not os.path.isfile(name):
|
||||
path = os.path.join(locale_path, name, 'LC_MESSAGES', 'lang')
|
||||
sys.argv[1:] = [path + '.po']
|
||||
msgfmt.main()
|
||||
Reference in New Issue
Block a user