summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndy Shaw <andy.shaw@qt.io>2019-02-28 13:42:36 +0100
committerAndy Shaw <andy.shaw@qt.io>2019-05-03 07:23:30 +0000
commitaba1d564ce9f087eaf164c4d0489efa15fd30ce7 (patch)
tree93e9a8a497856587789b595c9043c994ae1110fc
parente10545f37c318bdd5fca0b9b6e7a16a222aa52db (diff)
Pass -sort-contexts when calling lconvert to keep the order for smaller diffs
Change-Id: I4634d54b9bbf0d762a7274ae482f480baed6c0d2 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
-rw-r--r--src/sdk/translations/translations.pro5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/sdk/translations/translations.pro b/src/sdk/translations/translations.pro
index 8a77a0b44..a951a5b53 100644
--- a/src/sdk/translations/translations.pro
+++ b/src/sdk/translations/translations.pro
@@ -21,12 +21,13 @@ for(file, IB_ALL_TRANSLATIONS) {
ts-all.commands = cd $$wd && $$LUPDATE $$lupdate_opts $$sources -ts $$IB_ALL_TRANSLATIONS
QMAKE_EXTRA_TARGETS += ts-all
+lconvert_options = -sort-contexts -locations none -i
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; \
+ $$LCONVERT $$lconvert_options \$\$f -o \$\$f; \
done; \
git add src/sdk/translations/*_??.ts && git commit
} else {
@@ -34,7 +35,7 @@ isEqual(QMAKE_DIR_SEP, /) {
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) \
+ $$LCONVERT $$lconvert_options %%f -o %%f $$escape_expand(\\n\\t) \
cd $$wd && git add src/sdk/translations/*_??.ts && git commit
}
QMAKE_EXTRA_TARGETS += commit-ts