Add switcher for common directory
To migrate common directory for rst files from common-rst to common, Add a switcher for common directory as a temporary trick. When find a rst file in common directory, we use "common" directory as priority. This switcher will be removed after all migration works finish. Change-Id: I7ba517136807513f982e66010906b97621f844fc
This commit is contained in:
parent
8d1b667c44
commit
83a7248a32
|
@ -67,7 +67,13 @@ done
|
|||
|
||||
if [ "$GLOSSARY" -eq "1" ] ; then
|
||||
echo "Generating Glossary"
|
||||
tools/glossary2rst.py doc/common-rst/glossary.rst
|
||||
# Use "common" directory as common if exists while migration
|
||||
if [[ -e doc/common/conventions.rst ]] ; then
|
||||
COMMON="common"
|
||||
else
|
||||
COMMON="common-rst"
|
||||
fi
|
||||
tools/glossary2rst.py doc/${COMMON}/glossary.rst
|
||||
fi
|
||||
|
||||
if [ -z "$BUILD" ] ; then
|
||||
|
|
|
@ -57,16 +57,25 @@ function build_rst {
|
|||
if [ ${book} = "install-guide" ] ; then
|
||||
TAG="-t obs -t rdo -t ubuntu -t debian"
|
||||
fi
|
||||
|
||||
# Use "common" directory as common if exists while migration
|
||||
if [[ -e ${DOC_DIR}common/conventions.rst ]] ; then
|
||||
COMMON="common"
|
||||
else
|
||||
COMMON="common-rst"
|
||||
fi
|
||||
LOCALE_DIR="${DOC_DIR}${book}/source/locale/"
|
||||
COMMON_DIR="${DOC_DIR}common-rst/source/locale/"
|
||||
COMMON_DIR="${DOC_DIR}${COMMON}/source/locale/"
|
||||
|
||||
tox -evenv "sphinx-build -j $NUMBER_OF_CORES -q -E -W -b gettext $TAG \
|
||||
${DOC_DIR}${book}/source/ ${LOCALE_DIR}"
|
||||
|
||||
|
||||
# Merge the common-rst po file in
|
||||
if [[ -e ${COMMON_DIR}${language}/LC_MESSAGES/common-rst.po ]] ; then
|
||||
if [[ -e ${COMMON_DIR}${language}/LC_MESSAGES/${COMMON}.po ]] ; then
|
||||
msgcat --use-first -o ${LOCALE_DIR}${language}/${book}.po \
|
||||
${LOCALE_DIR}${language}/LC_MESSAGES/${book}.po \
|
||||
${COMMON_DIR}${language}/LC_MESSAGES/common-rst.po
|
||||
${COMMON_DIR}${language}/LC_MESSAGES/${COMMON}.po
|
||||
mv -f ${LOCALE_DIR}${language}/${book}.po \
|
||||
${LOCALE_DIR}${language}/LC_MESSAGES/${book}.po
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue