Commit 7db37345 authored by Vincent Texier's avatar Vincent Texier

Fix bugs in gen_translations.py

parent 0264093f
......@@ -3,11 +3,14 @@ import sys, os, multiprocessing, subprocess, time
gen_resources = os.path.abspath(os.path.join(os.path.dirname(__file__), 'src'))
ts = os.path.abspath(os.path.join(os.path.dirname(__file__), 'res', 'i18n', 'ts'))
qm = os.path.abspath(os.path.join(os.path.dirname(__file__), 'res', 'i18n', 'qm'))
if not os.path.exists(qm):
os.mkdir(qm)
translations = []
qm_files = []
qm_shortnames = []
def prepare_qm():
for root, dirs, files in os.walk(ts):
for f in files:
......@@ -23,9 +26,11 @@ def prepare_qm():
print(os.path.join(root, f))
for (ts_file, qm_file) in translations:
subprocess.call(["lrelease-qt5", ts_file, "-qm", qm_file])
# avoid conflict with qt4 lrelease by running qtchooser directly
subprocess.call(["qtchooser", "-run-tool=lrelease", "-qt=5", ts_file, "-qm", qm_file])
print(ts_file + " >> " + qm_file)
def build_resources():
files = ""
for file in qm_shortnames:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment