summaryrefslogtreecommitdiffstats
path: root/src/sdk/sdk.pro
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@digia.com>2014-03-27 16:44:41 +0100
committerOswald Buddenhagen <oswald.buddenhagen@digia.com>2014-03-27 16:44:41 +0100
commit1f8ec5b6a4bed3cfa02eaa36d39bceb7d37fc891 (patch)
treef225e5fe3d34ba9468634628338a16b1d087071f /src/sdk/sdk.pro
parentb170fae8b21e25b9ddfc66f985e7d7040ab3d2c0 (diff)
parentddf7aa85ec7bada4a96b2692e4b9f1bdd709cbad (diff)
Merge remote-tracking branch 'origin/1.5'
Conflicts: installerfw.pri Change-Id: I8bd85997fef0fcfa21a4dd28a6362748a54a4a3b
Diffstat (limited to 'src/sdk/sdk.pro')
-rw-r--r--src/sdk/sdk.pro31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/sdk/sdk.pro b/src/sdk/sdk.pro
index 132f26271..e75fbe3c2 100644
--- a/src/sdk/sdk.pro
+++ b/src/sdk/sdk.pro
@@ -37,6 +37,37 @@ exists($$LRELEASE) {
IB_TRANSLATIONS = $$prependAll(IB_LANGUAGES, $$PWD/translations/,.ts)
QT_TRANSLATIONS = $$prependAll(QT_LANGUAGES, $$[QT_INSTALL_TRANSLATIONS]/,.ts)
+ wd = $$toNativeSeparators($$IFW_SOURCE_TREE)
+ sources = src
+ lupdate_opts = -locations relative -no-ui-lines -no-sort
+
+ for(file, IB_TRANSLATIONS) {
+ lang = $$replace(file, .*/([^/]*)\\.ts, \\1)
+ v = ts-$${lang}.commands
+ $$v = cd $$wd && $$LUPDATE $$lupdate_opts $$sources -ts $$file
+ QMAKE_EXTRA_TARGETS += ts-$$lang
+ }
+ ts-all.commands = cd $$wd && $$LUPDATE $$lupdate_opts $$sources -ts $$IB_TRANSLATIONS
+ QMAKE_EXTRA_TARGETS += ts-all
+
+ isEqual(QMAKE_DIR_SEP, /) {
+ commit-ts.commands = \
+ cd $$wd; \
+ git add -N src/sdk/translations/*_??.ts && \
+ for f in `git diff-files --name-only src/sdk/translations/*_??.ts`; do \
+ $$LCONVERT -locations none -i \$\$f -o \$\$f; \
+ done; \
+ git add src/sdk/translations/*_??.ts && git commit
+ } else {
+ commit-ts.commands = \
+ cd $$wd && \
+ git add -N src/sdk/translations/*_??.ts && \
+ for /f usebackq %%f in (`git diff-files --name-only src/sdk/translations/*_??.ts`) do \
+ $$LCONVERT -locations none -i %%f -o %%f $$escape_expand(\\n\\t) \
+ cd $$wd && git add src/sdk/translations/*_??.ts && git commit
+ }
+ QMAKE_EXTRA_TARGETS += commit-ts
+
if (!testFiles(QT_TRANSLATIONS)) {
QT_COMPILED_TRANSLATIONS = $$prependAll(QT_LANGUAGES, $$[QT_INSTALL_TRANSLATIONS]/,.qm)
if (testFiles(QT_COMPILED_TRANSLATIONS)) {