20 lines
704 B
Python
20 lines
704 B
Python
'''
|
|
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 = ['..\\guimain.py','..\\libbananasplit\\libsplit.py','..\\libbananasplit\\libconfload.py']
|
|
for l in langs:
|
|
for ui in uifiles:
|
|
uio = "..\\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 = "..\\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 |