LP-311 Remove basic/advanced stabilization tab auto-switch (autotune/txpid lock issues)
[librepilot.git] / ground / gcs / src / share / translations / translations.pro
blob45d5ebf53ef3d7d34bd404f9969124bfa88f3c8c
1 include(../../../gcs.pri)
3 # Commented languages with outdated translations
4 # Allow removing the 'C' language in default config files at first start.
5 # Need to be uncommented for update in all languages files (make ts)
6 LANGUAGES = fr zh_CN # de es ru
8 # var, prepend, append
9 defineReplace(prependAll) {
10 for(a,$$1):result += $$2$${a}$$3
11 return($$result)
14 XMLPATTERNS = $$[QT_INSTALL_BINS]/xmlpatterns
15 LUPDATE = $$[QT_INSTALL_BINS]/lupdate -locations relative -no-ui-lines -no-sort
16 LRELEASE = $$[QT_INSTALL_BINS]/lrelease
17 LCONVERT = $$[QT_INSTALL_BINS]/lconvert
19 TRANSLATIONS = $$prependAll(LANGUAGES, $$PWD/gcs_,.ts)
21 MIME_TR_H = $$PWD/mime_tr.h
23 for(dir, $$list($$files($$GCS_SOURCE_TREE/src/plugins/*))):MIMETYPES_FILES += $$files($$dir/*.mimetypes.xml)
24 MIMETYPES_FILES = \"$$join(MIMETYPES_FILES, \", \")\"
25 QMAKE_SUBSTITUTES += extract-mimetypes.xq.in
26 ts.commands += \
27 $$XMLPATTERNS -output $$MIME_TR_H $$PWD/extract-mimetypes.xq && \
28 (cd $$GCS_SOURCE_TREE && $$LUPDATE src $$MIME_TR_H -ts $$TRANSLATIONS) && \
29 $$QMAKE_DEL_FILE $$MIME_TR_H
31 QMAKE_EXTRA_TARGETS += ts
33 TEMPLATE = app
34 TARGET = phony_target2
35 CONFIG -= qt sdk separate_debug_info gdb_dwarf_index
36 QT =
37 LIBS =
39 updateqm.input = TRANSLATIONS
40 updateqm.output = $$GCS_DATA_PATH/translations/${QMAKE_FILE_BASE}.qm
41 updateqm.variable_out = PRE_TARGETDEPS
42 updateqm.commands = $$LRELEASE ${QMAKE_FILE_IN} -qm ${QMAKE_FILE_OUT}
43 updateqm.name = LRELEASE ${QMAKE_FILE_IN}
44 updateqm.CONFIG += no_link
45 QMAKE_EXTRA_COMPILERS += updateqm
47 QMAKE_LINK = @: IGNORE THIS LINE
48 OBJECTS_DIR =
49 win32:CONFIG -= embed_manifest_exe
51 qmfiles.files = $$prependAll(LANGUAGES, $$OUT_PWD/gcs_,.qm)
52 qmfiles.path = /share/gcs/translations
53 qmfiles.CONFIG += no_check_exist
54 INSTALLS += qmfiles
56 #========= begin block copying qt_*.qm files ==========
57 defineReplace(QtQmExists) {
58 for(lang,$$1) {
59 qm_file = $$[QT_INSTALL_TRANSLATIONS]/qt_$${lang}.qm
60 exists($$qm_file) : result += $$qm_file
62 return($$result)
64 QT_TRANSLATIONS = $$QtQmExists(LANGUAGES)
66 copyQT_QMs.input = QT_TRANSLATIONS
67 copyQT_QMs.output = $$GCS_DATA_PATH/translations/${QMAKE_FILE_BASE}.qm
68 copyQT_QMs.variable_out = PRE_TARGETDEPS
69 copyQT_QMs.commands = $(COPY_FILE) ${QMAKE_FILE_IN} ${QMAKE_FILE_OUT}
70 copyQT_QMs.name = Copy ${QMAKE_FILE_IN}
71 copyQT_QMs.CONFIG += no_link
72 QMAKE_EXTRA_COMPILERS += copyQT_QMs
73 #========= end block copying qt_*.qm files ============