Hi, I have a very strange problem: my application's gui is partially translated although I translated all strings with Qt Linguist. I'm using the following code to load the qm file.
Code:
QTranslator appTranslator; QTranslator qtTranslator; QStringList uiLanguages; // uiLanguages crashes on Windows with 4.8.0 release builds #if (QT_VERSION >= 0x040801) || (QT_VERSION >= 0x040800 && !defined(Q_OS_WIN)) #else #endif #if (QT_VERSION >= 0x050000) #else #endif installTranslator(&appTranslator); // Binary installer puts Qt tr files into creatorTrPath if (qtTranslator.load(qtTrFile, qtTrPath) || qtTranslator.load(qtTrFile, appTrPath)) { installTranslator(&qtTranslator); setProperty("qtc_locale", locale); } break; // use built-in break; // use built-in break; } }
Since some strings are correctly translated I presume that the qm file is loaded. I tryed to remove it and, as expected, no string is translated. I loaded the qm file in a binary editor to check reference to untranslated text and the missing strings are there.
to create the qm files I follow the usual procedure:
lupdate -no-obsolete *.cpp *.ui *.h -ts ../translations/*.ts
(translation with Qt Linguist)
cd ../translations
lrelease *.ts
Any idea how debug the problem?
Thanks
