summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@nokia.com>2010-07-16 14:51:37 +0200
committerOswald Buddenhagen <oswald.buddenhagen@nokia.com>2010-07-16 16:39:51 +0200
commitabf94a6cddc502e14a8760cb12bc542315683a24 (patch)
tree12d35e6719e3695dffa2840d4fbd770532cb41bc
parenta3cd6e7923deee74745b790c66e687d79668e5c6 (diff)
downloadqt-creator-abf94a6cddc502e14a8760cb12bc542315683a24.tar.gz
add fine-grained ts-<lang> targets
the old ts target is now named ts-all, and it will update even the files which are disabled from compilation/release.
-rw-r--r--.gitignore1
-rw-r--r--share/qtcreator/translations/translations.pro24
2 files changed, 21 insertions, 4 deletions
diff --git a/.gitignore b/.gitignore
index b171475b04..376aadb40a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -53,6 +53,7 @@ Thumbs.db
*.Release
# translation related:
+share/qtcreator/translations/*_tr.h
# Directories to ignore
# ---------------------
diff --git a/share/qtcreator/translations/translations.pro b/share/qtcreator/translations/translations.pro
index 8e1b9f7290..9e3389bf1d 100644
--- a/share/qtcreator/translations/translations.pro
+++ b/share/qtcreator/translations/translations.pro
@@ -24,11 +24,27 @@ MIMETYPES_FILES = \"$$join(MIMETYPES_FILES, |)\"
for(dir, $$list($$files($$IDE_SOURCE_TREE/share/qtcreator/templates/wizards/*))):CUSTOMWIZARD_FILES += $$files($$dir/wizard.xml)
CUSTOMWIZARD_FILES = \"$$join(CUSTOMWIZARD_FILES, |)\"
-ts.commands += \
+extract.commands += \
$$XMLPATTERNS -output $$MIME_TR_H -param files=$$MIMETYPES_FILES $$PWD/extract-mimetypes.xq $$escape_expand(\\n\\t) \
- $$XMLPATTERNS -output $$CUSTOMWIZARD_TR_H -param files=$$CUSTOMWIZARD_FILES $$PWD/extract-customwizards.xq $$escape_expand(\\n\\t) \
- (cd $$IDE_SOURCE_TREE && $$LUPDATE src share/qtcreator/qmldesigner $$MIME_TR_H $$CUSTOMWIZARD_TR_H -ts $$TRANSLATIONS) && \
- $$QMAKE_DEL_FILE $$MIME_TR_H
+ $$XMLPATTERNS -output $$CUSTOMWIZARD_TR_H -param files=$$CUSTOMWIZARD_FILES $$PWD/extract-customwizards.xq
+QMAKE_EXTRA_TARGETS += extract
+
+files = $$files($$PWD/*_??.ts)
+for(file, files) {
+ lang = $$replace(file, .*_(.*)\\.ts, \\1)
+ v = ts-$${lang}.commands
+ $$v = cd $$IDE_SOURCE_TREE && $$LUPDATE src share/qtcreator/qmldesigner $$MIME_TR_H $$CUSTOMWIZARD_TR_H -ts $$file
+ v = ts-$${lang}.depends
+ $$v = extract
+ QMAKE_EXTRA_TARGETS += ts-$$lang
+}
+ts-all.commands = cd $$IDE_SOURCE_TREE && $$LUPDATE src share/qtcreator/qmldesigner $$MIME_TR_H $$CUSTOMWIZARD_TR_H -ts $$files
+ts-all.depends = extract
+QMAKE_EXTRA_TARGETS += ts-all
+
+ts.commands = \
+ @echo \"The \'ts\' target has been removed in favor of more fine-grained targets.\" && \
+ echo \"Use \'ts-<lang>\' instead.\"
QMAKE_EXTRA_TARGETS += ts
TEMPLATE = app