Move qm_gen.pri

This commit is contained in:
Chocobo1
2018-06-11 17:49:58 +08:00
committed by sledgehammer999
parent afa8d6bb8f
commit 2ffc09d097
4 changed files with 7 additions and 8 deletions

21
src/lang/lang.pri Normal file
View File

@@ -0,0 +1,21 @@
TRANSLATIONS += $$files(qbittorrent_*.ts)
TS_IN_NOEXT = $$replace(TRANSLATIONS,".ts","")
isEmpty(QMAKE_LRELEASE) {
win32:QMAKE_LRELEASE = $$[QT_INSTALL_BINS]\\lrelease.exe
else:QMAKE_LRELEASE = $$[QT_INSTALL_BINS]/lrelease
unix {
equals(QT_MAJOR_VERSION, 5) {
!exists($$QMAKE_LRELEASE) { QMAKE_LRELEASE = lrelease-qt5 }
}
} else {
!exists($$QMAKE_LRELEASE) { QMAKE_LRELEASE = lrelease }
}
}
message("Building translations")
for(L,TS_IN_NOEXT) {
message("Processing $${L}")
system("$$QMAKE_LRELEASE -silent $${L}.ts -qm $${L}.qm")
!exists("$${L}.qm"):error("Building translations failed, cannot continue")
}