From fe09040a32e8394146eed2281bc6d3fded3d43d1 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Sun, 3 May 2015 09:55:00 +0200 Subject: [PATCH] Minor translation cleanups Remove .tx file at the end to have a clean repository. Run setup.py with parameter --quiet, the long list of "extracting messages from file XXX" are not needed. Change-Id: I735f02a968aed8b362803781498ccc8085fa0e03 --- jenkins/scripts/common_translation_update.sh | 9 +++++++-- jenkins/scripts/propose_translation_update.sh | 3 ++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/jenkins/scripts/common_translation_update.sh b/jenkins/scripts/common_translation_update.sh index 8622351cce..e5c1333ea3 100644 --- a/jenkins/scripts/common_translation_update.sh +++ b/jenkins/scripts/common_translation_update.sh @@ -14,6 +14,9 @@ # License for the specific language governing permissions and limitations # under the License. +# Used for setup.py babel commands +QUIET="--quiet" + # Initial transifex setup function setup_translation { # Track in HAS_CONFIG whether we run "tx init" since calling it @@ -228,6 +231,8 @@ function send_patch { if [ $HAS_CONFIG -eq 1 ]; then git reset -q .tx/config git checkout -- .tx/config + else + rm -rf .tx fi # Don't send a review if nothing has changed. @@ -281,9 +286,9 @@ function extract_messages_log { project=$1 # Update the .pot files - python setup.py extract_messages + python setup.py $QUIET extract_messages for level in $LEVELS ; do - python setup.py extract_messages --no-default-keywords \ + python setup.py $QUIET extract_messages --no-default-keywords \ --keyword ${LKEYWORD[$level]} \ --output-file ${project}/locale/${project}-log-${level}.pot done diff --git a/jenkins/scripts/propose_translation_update.sh b/jenkins/scripts/propose_translation_update.sh index f439fdd51a..8b31328fbd 100755 --- a/jenkins/scripts/propose_translation_update.sh +++ b/jenkins/scripts/propose_translation_update.sh @@ -47,7 +47,8 @@ extract_messages_log "$PROJECT" PO_FILES=`find ${PROJECT}/locale -name "${PROJECT}.po"` if [ -n "$PO_FILES" ]; then # Use updated .pot file to update translations - python setup.py update_catalog --no-fuzzy-matching --ignore-obsolete=true + python setup.py $QUIET update_catalog \ + --no-fuzzy-matching --ignore-obsolete=true fi # We cannot run update_catalog for the log files, since there is no # option to specify the keyword and thus an update_catalog run would