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 <clark.boylan@gmail.com> Approved: James E. Blair <corvus@inaugust.com> Reviewed-by: James E. Blair <corvus@inaugust.com> Tested-by: Jenkins
This commit is contained in:
parent
0e92272de1
commit
46c3eadc7c
@ -12,6 +12,9 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
|
# The script is to pull the translations from Transifex,
|
||||||
|
# and push to Gerrit.
|
||||||
|
|
||||||
PROJECT="openstack-manuals"
|
PROJECT="openstack-manuals"
|
||||||
DocNameList="basic-install cli-guide common openstack-block-storage-admin \
|
DocNameList="basic-install cli-guide common openstack-block-storage-admin \
|
||||||
openstack-compute-admin openstack-ha openstack-install \
|
openstack-compute-admin openstack-ha openstack-install \
|
||||||
@ -51,10 +54,6 @@ fi
|
|||||||
# generate pot one by one
|
# generate pot one by one
|
||||||
for DOCNAME in ${DocNameList}
|
for DOCNAME in ${DocNameList}
|
||||||
do
|
do
|
||||||
tx set --auto-local -r openstack-manuals-i18n.${DOCNAME} \
|
|
||||||
"doc/src/docbkx/${DOCNAME}/locale/<lang>.po" --source-lang en \
|
|
||||||
--source-file doc/src/docbkx/${DOCNAME}/locale/${DOCNAME}.pot \
|
|
||||||
-t PO --execute
|
|
||||||
# openstack-ha needs to create new DocBook files
|
# openstack-ha needs to create new DocBook files
|
||||||
if [ "$DOCNAME" == "openstack-ha" ]
|
if [ "$DOCNAME" == "openstack-ha" ]
|
||||||
then
|
then
|
||||||
@ -68,6 +67,11 @@ do
|
|||||||
./tools/generatepot ${DOCNAME}
|
./tools/generatepot ${DOCNAME}
|
||||||
# Add all changed files to git
|
# Add all changed files to git
|
||||||
git add doc/src/docbkx/${DOCNAME}/locale/*
|
git add doc/src/docbkx/${DOCNAME}/locale/*
|
||||||
|
# Set auto-local
|
||||||
|
tx set --auto-local -r openstack-manuals-i18n.${DOCNAME} \
|
||||||
|
"doc/src/docbkx/${DOCNAME}/locale/<lang>.po" --source-lang en \
|
||||||
|
--source-file doc/src/docbkx/${DOCNAME}/locale/${DOCNAME}.pot \
|
||||||
|
-t PO --execute
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ ! `git diff --cached --quiet HEAD --` ]
|
if [ ! `git diff --cached --quiet HEAD --` ]
|
||||||
|
@ -12,6 +12,8 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
|
# The script is to push the updated PoT to Transifex.
|
||||||
|
|
||||||
DocNameList="basic-install cli-guide common openstack-block-storage-admin \
|
DocNameList="basic-install cli-guide common openstack-block-storage-admin \
|
||||||
openstack-compute-admin openstack-ha openstack-install \
|
openstack-compute-admin openstack-ha openstack-install \
|
||||||
openstack-network-connectivity-admin openstack-object-storage-admin \
|
openstack-network-connectivity-admin openstack-object-storage-admin \
|
||||||
@ -32,10 +34,6 @@ git config user.email "jenkins@openstack.org"
|
|||||||
# generate pot one by one
|
# generate pot one by one
|
||||||
for DOCNAME in ${DocNameList}
|
for DOCNAME in ${DocNameList}
|
||||||
do
|
do
|
||||||
tx set --auto-local -r openstack-manuals-i18n.${DOCNAME} \
|
|
||||||
"doc/src/docbkx/${DOCNAME}/locale/<lang>.po" --source-lang en \
|
|
||||||
--source-file doc/src/docbkx/${DOCNAME}/locale/${DOCNAME}.pot \
|
|
||||||
-t PO --execute
|
|
||||||
# openstack-ha needs to create new DocBook files
|
# openstack-ha needs to create new DocBook files
|
||||||
if [ "$DOCNAME" == "openstack-ha" ]
|
if [ "$DOCNAME" == "openstack-ha" ]
|
||||||
then
|
then
|
||||||
@ -49,6 +47,11 @@ do
|
|||||||
./tools/generatepot ${DOCNAME}
|
./tools/generatepot ${DOCNAME}
|
||||||
# Add all changed files to git
|
# Add all changed files to git
|
||||||
git add doc/src/docbkx/${DOCNAME}/locale/*
|
git add doc/src/docbkx/${DOCNAME}/locale/*
|
||||||
|
# Set auto-local
|
||||||
|
tx set --auto-local -r openstack-manuals-i18n.${DOCNAME} \
|
||||||
|
"doc/src/docbkx/${DOCNAME}/locale/<lang>.po" --source-lang en \
|
||||||
|
--source-file doc/src/docbkx/${DOCNAME}/locale/${DOCNAME}.pot \
|
||||||
|
-t PO --execute
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ ! `git diff --cached --quiet HEAD --` ]
|
if [ ! `git diff --cached --quiet HEAD --` ]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user