qmake translations doesn't seem to work
- by gordebak
I have a Qt app with a Czech translation. I can get my translation compiled and installed fine with the following code. But when I run the app, translation doesn't work. What am I missing?
I even tried to chmod 644 to change the permissions of the translation file, but it didn't work either.
Thanks in advance.
TRANSLATIONS += cs_CZ.ts
isEmpty(QMAKE_LRELEASE) {
win32|os2:QMAKE_LRELEASE = $$[QT_INSTALL_BINS]\lrelease.exe
else:QMAKE_LRELEASE = $$[QT_INSTALL_BINS]/lrelease
unix {
!exists($$QMAKE_LRELEASE) { QMAKE_LRELEASE = lrelease-qt4 }
} else {
!exists($$QMAKE_LRELEASE) { QMAKE_LRELEASE = lrelease }
}
}
updateqm.input = TRANSLATIONS
updateqm.output = qm/${QMAKE_FILE_BASE}.qm
updateqm.commands = $$QMAKE_LRELEASE -silent ${QMAKE_FILE_IN} -q qm/${QMAKE_FILE_BASE}.qm
updateqm.CONFIG += no_link target_predeps
QMAKE_EXTRA_COMPILERS += updateqm
INSTALLS += translations
translations.path = /usr/share/app
translations.files = qm/cs_CZ.qm