mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-02-08 12:54:27 +00:00
Create translations at configure time
This commit is contained in:
parent
687d192e71
commit
92e24e332a
@ -3,6 +3,7 @@ TEMPLATE = subdirs
|
|||||||
SUBDIRS += src
|
SUBDIRS += src
|
||||||
|
|
||||||
include(version.pri)
|
include(version.pri)
|
||||||
|
include(qm_gen.pri)
|
||||||
|
|
||||||
# Dist
|
# Dist
|
||||||
dist.commands += rm -fR ../$${PROJECT_NAME}-$${PROJECT_VERSION}/ &&
|
dist.commands += rm -fR ../$${PROJECT_NAME}-$${PROJECT_VERSION}/ &&
|
||||||
|
19
qm_gen.pri
Normal file
19
qm_gen.pri
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
TS_IN = $$fromfile(src/src.pro,TRANSLATIONS)
|
||||||
|
TS_IN_NOEXT = $$replace(TS_IN,".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 }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
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")
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user