disable tr for old qt

This commit is contained in:
Andrei Yankovich 2021-10-19 10:46:41 +03:00
parent 208e1ab4b6
commit 8042dba2c1

View File

@ -116,43 +116,46 @@ QMAKE_EXTRA_TARGETS += \
chmodSnap chmodSnap
# Translations !lessThan(QT_MAJOR_VERSION, 6):lessThan(QT_MINOR_VERSION, 12) {
SUPPORT_LANGS = ru
defineReplace(findFiles) { # Translations
patern = $$1 SUPPORT_LANGS = ru
path = $$2
all_files = $$files(*$${patern}, true) defineReplace(findFiles) {
win32:all_files ~= s|\\\\|/|g patern = $$1
win32:path ~= s|\\\\|/|g path = $$2
for(file, all_files) { all_files = $$files(*$${patern}, true)
result += $$find(file, $$path) win32:all_files ~= s|\\\\|/|g
win32:path ~= s|\\\\|/|g
for(file, all_files) {
result += $$find(file, $$path)
}
return($$result)
} }
return($$result) XML_FILES = $$files(*.xml, true)
}
XML_FILES = $$files(*.xml, true) for(LANG, SUPPORT_LANGS) {
for(XML, XML_FILES) {
FILE_PATH = $$dirname(XML)
for(LANG, SUPPORT_LANGS) { JS_FILES = $$findFiles(".js", $$FILE_PATH)
for(XML, XML_FILES) { UI_FILES = $$findFiles(".ui", $$FILE_PATH)
FILE_PATH = $$dirname(XML)
JS_FILES = $$findFiles(".js", $$FILE_PATH) commands += "$$LUPDATE $$JS_FILES $$UI_FILES -ts $$FILE_PATH/$${LANG}.ts"
UI_FILES = $$findFiles(".ui", $$FILE_PATH) TS_FILES += $$FILE_PATH/$${LANG}.ts
commands += "$$LUPDATE $$JS_FILES $$UI_FILES -ts $$FILE_PATH/$${LANG}.ts" }
TS_FILES += $$FILE_PATH/$${LANG}.ts
for(TS, TS_FILES) {
commands += "$$LRELEASE $$TS"
}
} }
for(TS, TS_FILES) { for(command, commands) {
commands += "$$LRELEASE $$TS" system($$command)|error("Failed to run: $$command")
} }
} }
for(command, commands) {
system($$command)|error("Failed to run: $$command")
}