From 6a846ecfe8e4123b73c76714a422efecf2f9696f Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Wed, 17 Jun 2015 16:42:55 +0200 Subject: [PATCH] Handle common-rst pot file Merge in content from separate common-rst pot file for translations. Change-Id: I2b530ea7dad5dc77a72ed8d4bfcf52fa7aef6c46 Co-Authored-By: KATO Tomoyuki --- RELEASE_NOTES.rst | 5 +++++ bin/doc-tools-check-languages | 8 ++++++++ 2 files changed, 13 insertions(+) diff --git a/RELEASE_NOTES.rst b/RELEASE_NOTES.rst index 30d1c6b4..18885326 100644 --- a/RELEASE_NOTES.rst +++ b/RELEASE_NOTES.rst @@ -1,6 +1,11 @@ Release notes ============= +0.29.0 +------ + +* ``doc-tools-check-languages``: Handle common-rst directory. + 0.28 ---- diff --git a/bin/doc-tools-check-languages b/bin/doc-tools-check-languages index 87da77e9..2d4958bb 100755 --- a/bin/doc-tools-check-languages +++ b/bin/doc-tools-check-languages @@ -49,6 +49,14 @@ function build_rst { TAG="-t libcloud -t fog" fi tox -evenv "sphinx-build -W -b gettext $TAG ${DOC_DIR}${book}/source/ ${DOC_DIR}${book}/source/locale/" + # Merge the common-rst po file in + if [[ -e ${DOC_DIR}common-rst/source/locale/${language}/LC_MESSAGES/common-rst.po ]] ; then + msgcat -o ${DOC_DIR}${book}/source/locale/${language}/${book}.po \ + ${DOC_DIR}common-rst/source/locale/${language}/LC_MESSAGES/common-rst.po \ + ${DOC_DIR}${book}/source/locale/${language}/LC_MESSAGES/${book}.po + mv -f ${DOC_DIR}${book}/source/locale/${language}/${book}.po \ + ${DOC_DIR}${book}/source/locale/${language}/LC_MESSAGES/${book}.po + fi # Now run msgmerge on all files for f in ${DOC_DIR}${book}/source/locale/*.pot ; do # Skip the master file