PDA

View Full Version : Qt Linguist Qt Linguist freezes opening a *.ts file



franco.amato
24th November 2016, 18:30
Good morning,
we are doing a project using Qt5 and CMake named NEWSEGScanner and we are developing using Qt Creator.
At the moment I am doing the translation part, so I added the following macros in CMakeLists.txt:


[...]
SET(
NEWSEGSCANNER_TRANSLATIONS
${CMAKE_CURRENT_SOURCE_DIR}/Lang/es_PE.ts
)
[...]
QT5_WRAP_UI(NEWSEGSCANNER_UI_SRCS ${NEWSEGSCANNER_UIS})
QT5_ADD_RESOURCES(NEWSEGSCANNER_RC_SRCS ${NEWSEGSCANNER_RCS})
QT5_CREATE_TRANSLATION(QM_FILES ${NEWSEGSCANNER_SRCS} ${NEWSEGSCANNER_UIS} ${NEWSEGSCANNER_TRANSLATIONS})
QT5_ADD_TRANSLATION(QM_FILES ${NEWSEGSCANNER_TRANSLATIONS})
[...]
ADD_EXECUTABLE(
${NEWSEGSCANNER_TARGET} WIN32
${NEWSEGSCANNER_SRCS}
${NEWSEGSCANNER_UI_SRCS}
${NEWSEGSCANNER_RC_SRCS}
${QM_FILES}
)
[...]

This generates and update the es_PE.ts file that I would edit using the tool Qt Linguistic to add the translations.

When I try to open it, the tool always freezes and I don't understand why. I am using Qt Linguistic v. 5.7.0

The ts file can be downloaded from here https://dl.dropboxusercontent.com/u/26692214/es_PE.ts

Thanx in advance for the help

anda_skoa
25th November 2016, 11:01
Opens fine for me with Linguist from 5.5.1. 5..6.1, 5.7.0 and a manually built Qt from 5.8 branch.

All on Linux (Debian)

Cheers,
_

franco.amato
25th November 2016, 11:47
So seems the problem is the Windows' version (v 5.7.0 in my case)
I also opened it with virtual Linux version (v. 5.5.1)
Is there any solution ?

Regards

anda_skoa
25th November 2016, 12:29
If you manually run lupdate on one of the cpp or .ui files that have translations, can you open that ts file?

Cheers,
_

franco.amato
25th November 2016, 13:08
I just tried it and yes I can open it

So seems that the CMake macro does not generate a correct ts file?

anda_skoa
25th November 2016, 14:06
It is probably also just calling lupdate and the file can be opened on Linux as we both checked.

Have you tried a different version of linguist?

Cheers,
_

franco.amato
25th November 2016, 14:16
Yes I tried right now with the 5.5.1 version and it opens...so seems a bug of the 5.7.0 version?

anda_skoa
26th November 2016, 09:42
Yes I tried right now with the 5.5.1 version and it opens...so seems a bug of the 5.7.0 version?

It would seem so.

Cheers,
_