From 46c3eadc7c500f8bba43025525c5d10cf0beacb2 Mon Sep 17 00:00:00 2001 From: daisy-ycguo Date: Fri, 21 Jun 2013 09:18:23 +0800 Subject: [PATCH] Fixed the issue: missed pot files cause translation scripts error. Missed pot files will cause an error in manuals translation scripts. So move the "tx set --auto-local" command backwards after the command to generate pot files. bug 1193127 Change-Id: I57553a9b295796a70eaf8b54e2c9037f928cdc06 Reviewed-on: https://review.openstack.org/33909 Reviewed-by: Clark Boylan Approved: James E. Blair Reviewed-by: James E. Blair Tested-by: Jenkins --- .../propose_translation_update_manuals.sh | 12 ++++++++---- .../upstream_translation_update_manuals.sh | 11 +++++++---- 2 files changed, 15 insertions(+), 8 deletions(-) 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 0fc3eefe39..bd8bfecceb 100755 --- a/modules/jenkins/files/slave_scripts/propose_translation_update_manuals.sh +++ b/modules/jenkins/files/slave_scripts/propose_translation_update_manuals.sh @@ -12,6 +12,9 @@ # License for the specific language governing permissions and limitations # under the License. +# The script is to pull the translations from Transifex, +# and push to Gerrit. + PROJECT="openstack-manuals" DocNameList="basic-install cli-guide common openstack-block-storage-admin \ openstack-compute-admin openstack-ha openstack-install \ @@ -51,10 +54,6 @@ fi # generate pot one by one for DOCNAME in ${DocNameList} do - tx set --auto-local -r openstack-manuals-i18n.${DOCNAME} \ -"doc/src/docbkx/${DOCNAME}/locale/.po" --source-lang en \ ---source-file doc/src/docbkx/${DOCNAME}/locale/${DOCNAME}.pot \ --t PO --execute # openstack-ha needs to create new DocBook files if [ "$DOCNAME" == "openstack-ha" ] then @@ -68,6 +67,11 @@ do ./tools/generatepot ${DOCNAME} # Add all changed files to git git add doc/src/docbkx/${DOCNAME}/locale/* + # Set auto-local + tx set --auto-local -r openstack-manuals-i18n.${DOCNAME} \ +"doc/src/docbkx/${DOCNAME}/locale/.po" --source-lang en \ +--source-file doc/src/docbkx/${DOCNAME}/locale/${DOCNAME}.pot \ +-t PO --execute done if [ ! `git diff --cached --quiet HEAD --` ] diff --git a/modules/jenkins/files/slave_scripts/upstream_translation_update_manuals.sh b/modules/jenkins/files/slave_scripts/upstream_translation_update_manuals.sh index 58907c3e81..0e7f2d9f99 100755 --- a/modules/jenkins/files/slave_scripts/upstream_translation_update_manuals.sh +++ b/modules/jenkins/files/slave_scripts/upstream_translation_update_manuals.sh @@ -12,6 +12,8 @@ # License for the specific language governing permissions and limitations # under the License. +# The script is to push the updated PoT to Transifex. + DocNameList="basic-install cli-guide common openstack-block-storage-admin \ openstack-compute-admin openstack-ha openstack-install \ openstack-network-connectivity-admin openstack-object-storage-admin \ @@ -32,10 +34,6 @@ git config user.email "jenkins@openstack.org" # generate pot one by one for DOCNAME in ${DocNameList} do - tx set --auto-local -r openstack-manuals-i18n.${DOCNAME} \ -"doc/src/docbkx/${DOCNAME}/locale/.po" --source-lang en \ ---source-file doc/src/docbkx/${DOCNAME}/locale/${DOCNAME}.pot \ --t PO --execute # openstack-ha needs to create new DocBook files if [ "$DOCNAME" == "openstack-ha" ] then @@ -49,6 +47,11 @@ do ./tools/generatepot ${DOCNAME} # Add all changed files to git git add doc/src/docbkx/${DOCNAME}/locale/* + # Set auto-local + tx set --auto-local -r openstack-manuals-i18n.${DOCNAME} \ +"doc/src/docbkx/${DOCNAME}/locale/.po" --source-lang en \ +--source-file doc/src/docbkx/${DOCNAME}/locale/${DOCNAME}.pot \ +-t PO --execute done if [ ! `git diff --cached --quiet HEAD --` ]