![]() |
Is there a way to generate a ts-file for qml and python at the same time?
May be a dump question but I have the following problem:
I have projects with both qml and python-files which contains strings, that should be translated. There are tools for generating a ts-file for python-files (pyside-lupdate) and qml-files (lupdate) and they work fine for their own files but not for the others. So every time I change something, I have to generate two seperate ts-files and merge the two ts-files by hand. Call me lazy, but if there is a way to do it in one step, please let me know :p EmaNymton |
Re: Is there a way to generate a ts-file for qml and python at the same time?
I have never tried pyside, but can't you create the ts file with a script which calls both pyside-lupdate and lupdate which operates on python files and qml files but on the same ts file? Won't the ts file be filled by both programs?
|
Re: Is there a way to generate a ts-file for qml and python at the same time?
Unfortunately this doesn't work, because both programs seems to override the ts-file:
pyside-lupdate after lupdate: Code:
pyside-lupdate -verbose main.py -ts base.ts Code:
lupdate qml/* -ts base.ts Bringe 'base.ts' auf aktuellen Stand... |
Re: Is there a way to generate a ts-file for qml and python at the same time?
Check the ts version both commands use, are they different? You have to open the ts file with a text editor.
Another solution is to script everything: Code:
pyside-lupdate main.py -ts temp.ts |
Re: Is there a way to generate a ts-file for qml and python at the same time?
Thanks for the suggestion with the script, the version of pyside generated ts-file and lupdate are different (1.1 and 2.0). So I tried to change 1.1 to 2.0 by hand but the same outcome. I checked the PyQt lupdate and the ts-versions are the same, but the same result. :(
Code:
pylupdate4 version 4.8.1 lupdate Code:
<?xml version="1.0" encoding="utf-8"?> Code:
<?xml version="1.0" encoding="utf-8"?> Code:
<?xml version="1.0" encoding="utf-8"?> Code:
#!/usr/bin/python |
All times are GMT. The time now is 15:15. |
vBulletin® Version 3.8.8