From d69c742245cb550672b178f2debacf0f3cfab2de Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Mon, 23 Nov 2015 09:06:36 +0100 Subject: [PATCH] Really skip directories for translation sync This fixes a problem on stable/liberty for openstack-manuals where only 2 out of 12 directories should be translated. But we currently push all 12 source files to the server. If we have directories that contain locale files, we need to explicitly exclude them. Add the skip directories to the exclude list for manual projects. Change-Id: I1eb481772545261c293baa0eb35731a8ac92d53c --- jenkins/scripts/common_translation_update.sh | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/jenkins/scripts/common_translation_update.sh b/jenkins/scripts/common_translation_update.sh index 91355989a4..4731916098 100644 --- a/jenkins/scripts/common_translation_update.sh +++ b/jenkins/scripts/common_translation_update.sh @@ -67,6 +67,13 @@ function setup_manuals { # Grab all of the rules for the documents we care about ZANATA_RULES= + # List of directories to skip + if [ "$project" == "openstack-manuals" ]; then + EXCLUDE='.*/**,**/source/common/**' + else + EXCLUDE='.*/**,**/source/common/**,**/glossary/**' + fi + # Generate pot one by one for FILE in ${DocFolder}/*; do # Skip non-directories @@ -89,6 +96,7 @@ function setup_manuals { IS_RST=1 ;; skip) + EXCLUDE="$EXCLUDE,${DocFolder}/${DOCNAME}/**" continue ;; esac @@ -107,11 +115,6 @@ function setup_manuals { fi fi done - if [ "$project" == "openstack-manuals" ]; then - EXCLUDE='.*/**,**/source/common/**' - else - EXCLUDE='.*/**,**/source/common/**,**/glossary/**' - fi /usr/local/jenkins/slave_scripts/create-zanata-xml.py -p $project \ -v $version --srcdir . --txdir . $ZANATA_RULES -e "$EXCLUDE" \ -f zanata.xml