Set the bug project to i18n for the translated docs

Change-Id: Ia86334649990a09c02a379c10adae55594a68c1d
Closes-Bug: #1277544
This commit is contained in:
KATO Tomoyuki 2015-12-13 14:46:32 +09:00
parent 00e4f6e3d5
commit 6f4a9758b5
2 changed files with 21 additions and 0 deletions

View File

@ -84,6 +84,20 @@ function build_rst {
-o ${DOC_DIR}${book}/source/locale/${language}/LC_MESSAGES/${bfname}.mo
done
# Set the bug project to I18n project
grep 'bug_project' ${DOC_DIR}${book}/source/conf.py > /dev/null
if [ "$?" -eq 0 ] ; then
# Replace the existing "bug_project" html context
sed -i -e \
's/"bug_project" *: *[^ ,}]*/"bug_project": "openstack-i18n"/' \
${DOC_DIR}${book}/source/conf.py
else
# Add the "bug_project" html context
sed -i -e \
's/html_context *= *{/html_context = {"bug_project": "openstack-i18n", /' \
${DOC_DIR}${book}/source/conf.py
fi
# Build all books
if [ ${book} = "firstapp" ] ; then
# Firstapp has several variations, build all of them
@ -185,6 +199,9 @@ function build_rst {
# Revert changes to po file
git reset -q ${DOC_DIR}${book}/source/locale/${language}/LC_MESSAGES/${book}.po
git checkout -- ${DOC_DIR}${book}/source/locale/${language}/LC_MESSAGES/${book}.po
# Revert changes to conf.py
git reset -q ${DOC_DIR}${book}/source/conf.py
git checkout -- ${DOC_DIR}${book}/source/conf.py
}

View File

@ -0,0 +1,4 @@
---
features:
- Set the bug report project to openstack-i18n
for the translated documents.