spostatui script in virtualenv
This commit is contained in:
20
SPEx/scripts/updateLanguages.py
Normal file
20
SPEx/scripts/updateLanguages.py
Normal file
@@ -0,0 +1,20 @@
|
||||
'''
|
||||
Created on 10 apr 2020
|
||||
|
||||
@author: Emanuele Trabattoni
|
||||
'''
|
||||
import os,glob
|
||||
import subprocess
|
||||
langs = ["en"]
|
||||
|
||||
if __name__ == '__main__':
|
||||
uifiles = glob.glob("..\\*\\*.ui", recursive=True)
|
||||
pyfiles = ['..\\SPEx\\guimain.py','..\\SPEx\\libbananasplit\\libsplit.py','..\\SPEx\\libbananasplit\\libconfload.py']
|
||||
for l in langs:
|
||||
for ui in uifiles:
|
||||
uio = "..\\SPEx\\userInterface\\resources\\translations\\"+os.path.splitext((os.path.split(ui)[1]))[0]+f"_{l}.ts"
|
||||
subprocess.run(f'lupdate.exe {ui} -ts {uio}')
|
||||
for py in pyfiles:
|
||||
pyo = "..\\SPEx\\userInterface\\resources\\translations\\"+os.path.splitext((os.path.split(py)[1]))[0]+f"_{l}.ts"
|
||||
print(subprocess.run(f'pylupdate5.exe {py} -ts {pyo}'))
|
||||
pass
|
||||
Reference in New Issue
Block a user