From 44f2d3a3c26f291b558cbff638fdecd2c5c87936 Mon Sep 17 00:00:00 2001 From: Jonathan White Date: Mon, 6 Jul 2020 19:08:30 -0400 Subject: [PATCH] Remove old translation files before pull --- release-tool | 2 +- share/translations/update.sh | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/release-tool b/release-tool index b95b0ddb8..d8fc1cf0b 100755 --- a/release-tool +++ b/release-tool @@ -520,7 +520,7 @@ merge() { fi git diff-index --quiet HEAD -- if [ $? -ne 0 ]; then - git add ./share/translations/* + git add -A ./share/translations/ logInfo "Committing changes..." if [ "" == "$GPG_GIT_KEY" ]; then git commit -m "Update translations" diff --git a/share/translations/update.sh b/share/translations/update.sh index c8b7da40c..fab07fb00 100755 --- a/share/translations/update.sh +++ b/share/translations/update.sh @@ -53,12 +53,17 @@ if $UPDATE; then fi if $PUSH; then - echo "Pushing English source files to Transifex..." + echo "Pushing source files to Transifex..." tx push -s $@ echo fi if $PULL; then + echo "Removing stale translations..." + mv share/translations/keepassx_en.ts share/translations/keepassx_en.ts.bak + rm share/translations/*.ts + mv share/translations/keepassx_en.ts.bak share/translations/keepassx_en.ts + echo "Pulling translations from Transifex..." tx pull -af --minimum-perc=40 $@ echo