diff --git a/bin/doc-tools-check-languages b/bin/doc-tools-check-languages index 6b39b4fd..611c037b 100755 --- a/bin/doc-tools-check-languages +++ b/bin/doc-tools-check-languages @@ -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 } diff --git a/releasenotes/notes/i18n-bug-report-b1031955789ee343.yaml b/releasenotes/notes/i18n-bug-report-b1031955789ee343.yaml new file mode 100644 index 00000000..70c8d1aa --- /dev/null +++ b/releasenotes/notes/i18n-bug-report-b1031955789ee343.yaml @@ -0,0 +1,4 @@ +--- +features: + - Set the bug report project to openstack-i18n + for the translated documents.