22 lines
874 B
Python
22 lines
874 B
Python
'''
|
|
Created on 10 apr 2020
|
|
|
|
@author: Emanuele Trabattoni
|
|
'''
|
|
import os,glob
|
|
import subprocess
|
|
langs = ["en"]
|
|
|
|
# crea i file ts dalle interfacce, da usare solo se si e' modificato qualcosa nelle interfacce
|
|
|
|
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 |