4

I have some PyQt5 application with some tr() translations in it. I have a Python script that compiles UI forms and resources, and I want it to also update the ts file with translations, because it's a bit annoying to run pylupdate manually each time.

Alas, I haven't find any information, how to run the Python functions that provide translation file compilation in PyQt5. Haven't you ever got the same problem?

Felix
  • 3,351
  • 6
  • 40
  • 68

1 Answers1

2

I was able to do it like this

import os
ret = os.system("E:\Anaconda3\Library\\bin\\pylupdate5.exe -verbose Main.py otherfile.py thirdfile.py -ts zh_CN.ts")

Hopefully you found it as well

Faller
  • 1,588
  • 3
  • 16
  • 27