mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-23 13:04:23 +00:00
Generate i18n .ts files in the correct directory
Fixup 5b7c089dd2fce88017fcdc5911801fc809175c0d. Closes #9313.
This commit is contained in:
parent
6c9a4df515
commit
d9461f348f
@ -1,5 +1,10 @@
|
|||||||
TRANSLATIONS += $$files(qbittorrent_*.ts)
|
TS_FILES += $$files(qbittorrent_*.ts)
|
||||||
TS_IN_NOEXT = $$replace(TRANSLATIONS,".ts","")
|
|
||||||
|
# need to use full path, otherwise running
|
||||||
|
# `lupdate` will generate *.ts files in project root directory
|
||||||
|
for(file, TS_FILES) {
|
||||||
|
TRANSLATIONS += "$${PWD}/$${file}"
|
||||||
|
}
|
||||||
|
|
||||||
isEmpty(QMAKE_LRELEASE) {
|
isEmpty(QMAKE_LRELEASE) {
|
||||||
win32:QMAKE_LRELEASE = $$[QT_INSTALL_BINS]\\lrelease.exe
|
win32:QMAKE_LRELEASE = $$[QT_INSTALL_BINS]\\lrelease.exe
|
||||||
@ -14,8 +19,9 @@ isEmpty(QMAKE_LRELEASE) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
message("Building translations")
|
message("Building translations")
|
||||||
for(L,TS_IN_NOEXT) {
|
TS_FILES_NOEXT = $$replace(TS_FILES, ".ts", "")
|
||||||
message("Processing $${L}")
|
for(file, TS_FILES_NOEXT) {
|
||||||
system("$$QMAKE_LRELEASE -silent $${L}.ts -qm $${L}.qm")
|
message("Processing $${file}")
|
||||||
!exists("$${L}.qm"):error("Building translations failed, cannot continue")
|
system("$$QMAKE_LRELEASE -silent $${file}.ts -qm $${file}.qm")
|
||||||
|
!exists("$${file}.qm"):error("Building translations failed, cannot continue")
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user