Browse Source

Fix translation building and publishing

The translated RST guides were not moved to the publish directories,
move them over for publishing.

Also fix draft publishing for guides that use /draft like install-guide
and config-reference.

Change-Id: Ia80ffc2ab1825d4c1a6b16eef0df39ae28e0c77c
changes/21/179021/1
Andreas Jaeger 6 years ago
parent
commit
779f474a53
  1. 6
      RELEASE_NOTES.rst
  2. 23
      bin/doc-tools-check-languages

6
RELEASE_NOTES.rst

@ -1,6 +1,12 @@
Release notes
=============
0.26
----
* Fix ``doc-tools-check-languages`` handling of RST guides and
publishing to translated draft guides.
0.25
----

23
bin/doc-tools-check-languages

@ -67,12 +67,18 @@ function build_rst {
tox -evenv "sphinx-build -t user_only -D language=${language} \
doc/${book}/source/ \
doc/${book}/build/html"
mkdir -p publish-docs/${language}/user-guide/
rsync -a doc/user-guides/build/html/ publish-docs/${language}/user-guide/
tox -evenv "sphinx-build -t admin_only -D language=${language} \
doc/${book}/source/ \
doc/${book}/build-admin/html"
mkdir -p publish-docs/${language}/user-guide-admin/
rsync -a doc/user-guides/build-admin/html/ publish-docs/${language}/user-guide-admin/
else
tox -evenv "sphinx-build -D language=${language} doc/${book}/source/ \
doc/${book}/build/html"
mkdir -p publish-docs/${language}/${book}/
rsync -a doc/${book}/build-admin/html/ publish-docs/${language}/${book}/
fi
}
@ -132,8 +138,23 @@ function handle_draft_language {
mkdir -p publish-docs/draft/$language
for book in ${DRAFTS["$language"]}; do
mv publish-docs/$language/$book publish-docs/draft/$language/$book
case "${book}" in
user-guides)
mv publish-docs/$language/user-guide publish-docs/draft/$language/user-guide
mv publish-docs/$language/user-guide-admin publish-docs/draft/$language/user-guide-admin
;;
install-guide|config-reference)
mv publish-docs/$language/draft/$book publish-docs/draft/$language/$book
# Remove directory if it's empty and do not fail if it's non-empty
rmdir publish-docs/$language/draft || true
;;
*)
mv publish-docs/$language/$book publish-docs/draft/$language/$book
;;
esac
done
}

Loading…
Cancel
Save