From a8c63858715ad552b5696fc03805080cca782903 Mon Sep 17 00:00:00 2001 From: Clark Boylan Date: Mon, 31 Mar 2014 10:52:01 -0700 Subject: [PATCH] Make transifex the only source of translations Prior to this change we attempted to push translations made direclty in the git tree to transifex allowing translations to be made via git directly or in transifex. Simplify the process to avoid cases where the transifex client will refuse to update local translations because they are newer than those in transifex. This makes transifex the only source of translation updates. In addition to simplifying the process force tx pull -a operations as a way to force the updates if we end up in this state. Change-Id: I171b3b1a29cbeaab0c4d9de3ab1bd3a6b933ea53 --- .../slave_scripts/propose_translation_update.sh | 12 +----------- .../propose_translation_update_manuals.sh | 8 +------- .../slave_scripts/upstream_translation_update.sh | 9 --------- 3 files changed, 2 insertions(+), 27 deletions(-) diff --git a/modules/jenkins/files/slave_scripts/propose_translation_update.sh b/modules/jenkins/files/slave_scripts/propose_translation_update.sh index da567cc09d..32b026d068 100755 --- a/modules/jenkins/files/slave_scripts/propose_translation_update.sh +++ b/modules/jenkins/files/slave_scripts/propose_translation_update.sh @@ -47,7 +47,7 @@ fi tx set --auto-local -r ${PROJECT}.${PROJECT}-translations "${PROJECT}/locale//LC_MESSAGES/${PROJECT}.po" --source-lang en --source-file ${PROJECT}/locale/${PROJECT}.pot -t PO --execute # Pull all upstream translations -tx pull -a +tx pull -a -f # Update the .pot file python setup.py extract_messages PO_FILES=`find ${PROJECT}/locale -name '*.po'` @@ -68,14 +68,4 @@ then $COMMIT_MSG EOF git review -t transifex/translations - - # Push .pot changes to transifex - tx --debug --traceback push -s - # Push translation changes to transifex - # Disable -e as we can live with failed translation pushes (failures - # occur when a translation file has no translations in it not really - # error worthy but they occur) - set +e - tx --debug --traceback push -t --skip - set -e fi diff --git a/modules/jenkins/files/slave_scripts/propose_translation_update_manuals.sh b/modules/jenkins/files/slave_scripts/propose_translation_update_manuals.sh index cf5e16f4a9..6f60f0793b 100755 --- a/modules/jenkins/files/slave_scripts/propose_translation_update_manuals.sh +++ b/modules/jenkins/files/slave_scripts/propose_translation_update_manuals.sh @@ -82,14 +82,8 @@ do fi done -if [ ! `git diff --cached --quiet HEAD --` ] -then - # Push .pot changes to transifex - tx --debug --traceback push -s -fi - # Pull all upstream translations -tx pull -a +tx pull -a -f for FILE in ${DocFolder}/* do diff --git a/modules/jenkins/files/slave_scripts/upstream_translation_update.sh b/modules/jenkins/files/slave_scripts/upstream_translation_update.sh index 59e5928ac3..d8bca8c123 100755 --- a/modules/jenkins/files/slave_scripts/upstream_translation_update.sh +++ b/modules/jenkins/files/slave_scripts/upstream_translation_update.sh @@ -28,8 +28,6 @@ if [ ! -d .tx ] ; then fi tx set --auto-local -r ${PROJECT}.${PROJECT}-translations "${PROJECT}/locale//LC_MESSAGES/${PROJECT}.po" --source-lang en --source-file ${PROJECT}/locale/${PROJECT}.pot -t PO --execute -# Pull all upstream translations -tx pull -a # Update the .pot file python setup.py extract_messages PO_FILES=`find ${PROJECT}/locale -name '*.po'` @@ -45,11 +43,4 @@ if [ ! `git diff-index --quiet HEAD --` ] then # Push .pot changes to transifex tx --debug --traceback push -s - # Push translation changes to transifex - # Disable -e as we can live with failed translation pushes (failures - # occur when a translation file has no translations in it not really - # error worthy but they occur) - set +e - tx --debug --traceback push -t --skip - set -e fi