2013-01-16 04:21:11 +08:00
|
|
|
TS_IN = $$fromfile(src/src.pro,TRANSLATIONS)
|
|
|
|
TS_IN_NOEXT = $$replace(TS_IN,".ts","")
|
2017-04-26 13:53:47 +08:00
|
|
|
|
2013-01-16 04:21:11 +08:00
|
|
|
isEmpty(QMAKE_LRELEASE) {
|
2017-10-09 22:56:45 +08:00
|
|
|
win32:QMAKE_LRELEASE = $$[QT_INSTALL_BINS]\\lrelease.exe
|
2013-01-16 04:21:11 +08:00
|
|
|
else:QMAKE_LRELEASE = $$[QT_INSTALL_BINS]/lrelease
|
|
|
|
unix {
|
2015-12-08 19:40:54 +08:00
|
|
|
equals(QT_MAJOR_VERSION, 5) {
|
|
|
|
!exists($$QMAKE_LRELEASE) { QMAKE_LRELEASE = lrelease-qt5 }
|
|
|
|
}
|
2013-01-16 04:21:11 +08:00
|
|
|
} else {
|
|
|
|
!exists($$QMAKE_LRELEASE) { QMAKE_LRELEASE = lrelease }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
message("Building translations")
|
|
|
|
for(L,TS_IN_NOEXT) {
|
|
|
|
message("Processing $${L}")
|
|
|
|
system("$$QMAKE_LRELEASE -silent src/$${L}.ts -qm src/$${L}.qm")
|
|
|
|
!exists("src/$${L}.qm"):error("Building translations failed, cannot continue")
|
|
|
|
}
|