translations.pro 1.52 KB
Newer Older
1
2
include(../../../qtcreator.pri)

Sergey Belyashov's avatar
Sergey Belyashov committed
3
TRANSLATIONS = de it ja ru
4
5
6
7
8
9
10

# var, prepend, append
defineReplace(prependAll) {
    for(a,$$1):result += $$2$${a}$$3
    return($$result)
}

11
12
LUPDATE = $$targetPath($$[QT_INSTALL_BINS]/lupdate) -locations relative -no-ui-lines
LRELEASE = $$targetPath($$[QT_INSTALL_BINS]/lrelease)
13
14
15

TS_FILES = $$prependAll(TRANSLATIONS, $$PWD/qtcreator_,.ts)

16
17
contains(QT_VERSION, ^4\.[0-5]\..*):ts.commands = @echo This Qt version is too old for the ts target. Need Qt 4.6+.
else:ts.commands = (cd $$IDE_SOURCE_TREE && $$LUPDATE src -ts $$TS_FILES)
18
19
20
21
QMAKE_EXTRA_TARGETS += ts

TEMPLATE = app
TARGET = phony_target2
22
CONFIG -= qt
23
24
QT =
LIBS =
25
26

updateqm.input = TS_FILES
27
updateqm.output = $$IDE_DATA_PATH/translations/${QMAKE_FILE_BASE}.qm
28
29
30
31
32
33
34
isEmpty(vcproj):updateqm.variable_out = PRE_TARGETDEPS
updateqm.commands = $$LRELEASE ${QMAKE_FILE_IN} -qm ${QMAKE_FILE_OUT}
updateqm.name = LRELEASE ${QMAKE_FILE_IN}
updateqm.CONFIG += no_link
QMAKE_EXTRA_COMPILERS += updateqm

isEmpty(vcproj) {
35
    QMAKE_LINK = @: IGNORE THIS LINE
36
37
38
    OBJECTS_DIR =
    win32:CONFIG -= embed_manifest_exe
} else {
39
    CONFIG += console
40
41
42
    PHONY_DEPS = .
    phony_src.input = PHONY_DEPS
    phony_src.output = phony.c
43
    phony_src.variable_out = GENERATED_SOURCES
44
    phony_src.commands = echo int main() { return 0; } > phony.c
45
    phony_src.name = CREATE phony.c
46
47
48
49
50
51
52
    phony_src.CONFIG += combine
    QMAKE_EXTRA_COMPILERS += phony_src
}

qmfiles.files = $$prependAll(TRANSLATIONS, $$OUT_PWD/qtcreator_,.qm)
qmfiles.path = /share/qtcreator/translations
INSTALLS += qmfiles