mirror of
https://bitbucket.org/smil3y/katie.git
synced 2025-02-23 18:32:55 +00:00
review updatetranslations script
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
This commit is contained in:
parent
0c28c71e12
commit
fba22ee92c
1 changed files with 7 additions and 10 deletions
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/python
|
#!/usr/bin/python
|
||||||
|
|
||||||
import os, glob, subprocess, shlex
|
import os, glob, subprocess
|
||||||
|
|
||||||
components = ('core', 'dbus', 'declarative', 'gui', 'network', 'plugins',
|
components = ('core', 'dbus', 'declarative', 'gui', 'network', 'plugins',
|
||||||
'script', 'scripttools', 'sql', 'svg', 'test', 'uitools', 'xml')
|
'script', 'scripttools', 'sql', 'svg', 'test', 'uitools', 'xml')
|
||||||
|
@ -22,13 +22,10 @@ for t in glob.glob('src/tools/*'):
|
||||||
tfiles.extend(list_files(t))
|
tfiles.extend(list_files(t))
|
||||||
|
|
||||||
for t in glob.glob('translations/qt*.ts'):
|
for t in glob.glob('translations/qt*.ts'):
|
||||||
if 'tools' in t:
|
command = ['minsize/bin/lupdate', '-locations', 'relative', '-no-ui-lines', '-no-obsolete']
|
||||||
files = ' '.join(tfiles)
|
if not 'tools' in t:
|
||||||
|
command.extend(tfiles)
|
||||||
else:
|
else:
|
||||||
files = ' '.join(cfiles)
|
command.extend(cfiles)
|
||||||
command = 'minsize/bin/lupdate -locations relative -no-ui-lines -no-obsolete %s -ts %s' % (files, t)
|
command.extend(['-ts', t])
|
||||||
command = shlex.split(command)
|
subprocess.check_call(command)
|
||||||
pipe = subprocess.Popen(command, stderr=subprocess.PIPE)
|
|
||||||
pipe.wait()
|
|
||||||
if pipe.returncode != 0:
|
|
||||||
raise(Exception(pipe.communicate()[1].strip()))
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue