summaryrefslogtreecommitdiffstats
path: root/translations
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@nokia.com>2010-07-13 18:39:37 (GMT)
committerOswald Buddenhagen <oswald.buddenhagen@nokia.com>2010-07-15 20:00:28 (GMT)
commit468eb186427067549191f3b921c9f9d75a6947ef (patch)
tree5303b845cc588fb3d508698037dee67676a76589 /translations
parent511a838afdb1d028bf184bb56c9ead39312987ca (diff)
downloadQt-468eb186427067549191f3b921c9f9d75a6947ef.zip
Qt-468eb186427067549191f3b921c9f9d75a6947ef.tar.gz
Qt-468eb186427067549191f3b921c9f9d75a6947ef.tar.bz2
add commit-ts target to commit ts files without line number info
it is pretty pointless to commit the extracted line number information, as it needs to be refreshed after pulling source code changes anyway. on top of it, it bloats the repository.
Diffstat (limited to 'translations')
-rw-r--r--translations/translations.pri19
1 files changed, 18 insertions, 1 deletions
diff --git a/translations/translations.pri b/translations/translations.pri
index 735411e..c27e955 100644
--- a/translations/translations.pri
+++ b/translations/translations.pri
@@ -1,3 +1,4 @@
+qtPrepareTool(LCONVERT, lconvert)
qtPrepareTool(LUPDATE, lupdate)
LUPDATE += -locations relative -no-ui-lines
@@ -58,9 +59,25 @@ addTsTargets(qvfb, ../tools/qvfb/qvfb.pro)
check-ts.commands = (cd $$PWD && perl check-ts.pl)
check-ts.depends = ts-all
+isEqual(QMAKE_DIR_SEP, /) {
+ commit-ts.commands = \
+ cd $$PWD/..; \
+ for f in `git diff-files --name-only translations/*_??.ts`; do \
+ $$LCONVERT -locations none -i \$\$f -o \$\$f; \
+ done; \
+ git add translations/*_??.ts && git commit
+} else {
+ wd = $$replace(PWD, /, \\)\\..
+ commit-ts.commands = \
+ cd $$wd && \
+ for /f usebackq %%f in (`git diff-files --name-only translations/*_??.ts`) do \
+ $$LCONVERT -locations none -i %%f -o %%f $$escape_expand(\\n\\t) \
+ cd $$wd && git add translations/*_??.ts && git commit
+}
+
ts.commands = \
@echo \"The \'ts\' target has been removed in favor of more fine-grained targets.\" && \
echo \"Use \'ts-<target>-<lang>\' or \'ts-<lang>\' instead. To add a language,\" && \
echo \"use \'untranslated\' for <lang>, rename the files and re-run \'qmake\'.\"
-QMAKE_EXTRA_TARGETS += $$unique(TS_TARGETS) ts check-ts
+QMAKE_EXTRA_TARGETS += $$unique(TS_TARGETS) ts commit-ts check-ts