simplify translations script

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2015-12-30 10:44:42 +02:00
parent cdf942c03d
commit 5f30ffe788

View file

@ -26,16 +26,12 @@ for t in tools:
for t in glob.glob('translations/qt*.ts'): for t in glob.glob('translations/qt*.ts'):
if 'tools' in t: if 'tools' in t:
command = 'build/bin/lupdate -locations relative -no-ui-lines -no-obsolete %s -ts %s' % (' '.join(tfiles), t) files = ' '.join(tfiles)
command = shlex.split(command)
pipe = subprocess.Popen(command, stderr=subprocess.PIPE)
pipe.wait()
if pipe.returncode != 0:
raise(Exception(pipe.communicate()[1].strip()))
else: else:
command = 'build/bin/lupdate -locations relative -no-ui-lines -no-obsolete %s -ts %s' % (' '.join(cfiles), t) files = ' '.join(cfiles)
command = shlex.split(command) command = 'build/bin/lupdate -locations relative -no-ui-lines -no-obsolete %s -ts %s' % (files, t)
pipe = subprocess.Popen(command, stderr=subprocess.PIPE) command = shlex.split(command)
pipe.wait() pipe = subprocess.Popen(command, stderr=subprocess.PIPE)
if pipe.returncode != 0: pipe.wait()
raise(Exception(pipe.communicate()[1].strip())) if pipe.returncode != 0:
raise(Exception(pipe.communicate()[1].strip()))