Skip to content
Snippets Groups Projects
Commit 2d9c9cc8 authored by Oswald Buddenhagen's avatar Oswald Buddenhagen
Browse files

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.
parent c7bd870e
No related branches found
No related tags found
No related merge requests found
......@@ -12,6 +12,7 @@ defineReplace(prependAll) {
XMLPATTERNS = $$targetPath($$[QT_INSTALL_BINS]/xmlpatterns)
LUPDATE = $$targetPath($$[QT_INSTALL_BINS]/lupdate) -locations relative -no-ui-lines -no-sort
LRELEASE = $$targetPath($$[QT_INSTALL_BINS]/lrelease)
LCONVERT = $$targetPath($$[QT_INSTALL_BINS]/lconvert)
TRANSLATIONS = $$prependAll(LANGUAGES, $$PWD/qtcreator_,.ts)
......@@ -42,6 +43,23 @@ ts-all.commands = cd $$IDE_SOURCE_TREE && $$LUPDATE src share/qtcreator/qmldesig
ts-all.depends = extract
QMAKE_EXTRA_TARGETS += ts-all
isEqual(QMAKE_DIR_SEP, /) {
commit-ts.commands = \
cd $$IDE_SOURCE_TREE; \
for f in `git diff-files --name-only share/qtcreator/translations/*_??.ts`; do \
$$LCONVERT -locations none -i \$\$f -o \$\$f; \
done; \
git add share/qtcreator/translations/*_??.ts && git commit
} else {
wd = $$replace(IDE_SOURCE_TREE, /, \\)
commit-ts.commands = \
cd $$wd && \
for /f usebackq %%f in (`git diff-files --name-only share/qtcreator/translations/*_??.ts`) do \
$$LCONVERT -locations none -i %%f -o %%f $$escape_expand(\\n\\t) \
cd $$wd && git add share/qtcreator/translations/*_??.ts && git commit
}
QMAKE_EXTRA_TARGETS += commit-ts
ts.commands = \
@echo \"The \'ts\' target has been removed in favor of more fine-grained targets.\" && \
echo \"Use \'ts-<lang>\' instead. To add a language, use \'ts-untranslated\',\" && \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment