Skip to content
Snippets Groups Projects
Commit e2670c73 authored by inso's avatar inso
Browse files

Merge branch 'dev' of https://github.com/ucoin-io/cutecoin into dev

parents a8726535 7db37345
No related branches found
No related tags found
No related merge requests found
...@@ -3,11 +3,14 @@ import sys, os, multiprocessing, subprocess, time ...@@ -3,11 +3,14 @@ import sys, os, multiprocessing, subprocess, time
gen_resources = os.path.abspath(os.path.join(os.path.dirname(__file__), 'src')) 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')) 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')) qm = os.path.abspath(os.path.join(os.path.dirname(__file__), 'res', 'i18n', 'qm'))
if not os.path.exists(qm):
os.mkdir(qm)
translations = [] translations = []
qm_files = [] qm_files = []
qm_shortnames = [] qm_shortnames = []
def prepare_qm(): def prepare_qm():
for root, dirs, files in os.walk(ts): for root, dirs, files in os.walk(ts):
for f in files: for f in files:
...@@ -23,9 +26,11 @@ def prepare_qm(): ...@@ -23,9 +26,11 @@ def prepare_qm():
print(os.path.join(root, f)) print(os.path.join(root, f))
for (ts_file, qm_file) in translations: 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) print(ts_file + " >> " + qm_file)
def build_resources(): def build_resources():
files = "" files = ""
for file in qm_shortnames: for file in qm_shortnames:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment