Rename common-rst to common
Keep the sync target repo path "common-rst" as of now. Change-Id: I552d2c0a422c4824632b11fa273629004b889306
@ -25,6 +25,8 @@ DOC_DIR="doc/"
|
|||||||
# Values need to match content in
|
# Values need to match content in
|
||||||
# project-config/jenkins/scripts/common_translation_update.sh
|
# project-config/jenkins/scripts/common_translation_update.sh
|
||||||
declare -A SPECIAL_BOOKS=(
|
declare -A SPECIAL_BOOKS=(
|
||||||
|
# This needs special handling, handle it with the RST tools.
|
||||||
|
["common"]="RST"
|
||||||
["admin-guide-cloud"]="RST"
|
["admin-guide-cloud"]="RST"
|
||||||
["arch-design"]="RST"
|
["arch-design"]="RST"
|
||||||
["config-reference"]="RST"
|
["config-reference"]="RST"
|
||||||
@ -35,10 +37,7 @@ declare -A SPECIAL_BOOKS=(
|
|||||||
["user-guide-admin"]="RST"
|
["user-guide-admin"]="RST"
|
||||||
# Do not translate
|
# Do not translate
|
||||||
["cli-reference"]="skip"
|
["cli-reference"]="skip"
|
||||||
["common"]="skip"
|
|
||||||
["contributor-guide"]="skip"
|
["contributor-guide"]="skip"
|
||||||
# Skip arch design while its being revised
|
# Skip arch design while its being revised
|
||||||
["arch-design-draft"]="skip"
|
["arch-design-draft"]="skip"
|
||||||
# This needs special handling, handle it with the RST tools.
|
|
||||||
["common-rst"]="RST"
|
|
||||||
)
|
)
|
||||||
|
@ -1 +1 @@
|
|||||||
../../common-rst
|
../../common
|
@ -1 +1 @@
|
|||||||
../../common-rst
|
../../common
|
@ -1 +1 @@
|
|||||||
../../common-rst
|
../../common
|
@ -1 +1 @@
|
|||||||
../../common-rst/
|
../../common
|
Before Width: | Height: | Size: 220 KiB After Width: | Height: | Size: 220 KiB |
Before Width: | Height: | Size: 120 KiB After Width: | Height: | Size: 120 KiB |
Before Width: | Height: | Size: 54 KiB After Width: | Height: | Size: 54 KiB |
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 35 KiB |
Before Width: | Height: | Size: 72 KiB After Width: | Height: | Size: 72 KiB |
Before Width: | Height: | Size: 39 KiB After Width: | Height: | Size: 39 KiB |
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 32 KiB |
Before Width: | Height: | Size: 131 KiB After Width: | Height: | Size: 131 KiB |
Before Width: | Height: | Size: 229 KiB After Width: | Height: | Size: 229 KiB |
Before Width: | Height: | Size: 238 KiB After Width: | Height: | Size: 238 KiB |
Before Width: | Height: | Size: 77 KiB After Width: | Height: | Size: 77 KiB |
Before Width: | Height: | Size: 72 KiB After Width: | Height: | Size: 72 KiB |
@ -56,7 +56,7 @@ master_doc = 'index'
|
|||||||
|
|
||||||
# General information about the project.
|
# General information about the project.
|
||||||
project = u'Common documents'
|
project = u'Common documents'
|
||||||
bug_tag = u'common-rst'
|
bug_tag = u'common'
|
||||||
|
|
||||||
copyright = u'2015-2016, OpenStack contributors'
|
copyright = u'2015-2016, OpenStack contributors'
|
||||||
|
|
||||||
@ -74,7 +74,7 @@ release = '1.0.0'
|
|||||||
# gitsha: The SHA checksum of the bug description. Automatically extracted from git log.
|
# gitsha: The SHA checksum of the bug description. Automatically extracted from git log.
|
||||||
# bug_tag: Tag for categorizing the bug. Must be set manually.
|
# bug_tag: Tag for categorizing the bug. Must be set manually.
|
||||||
# These variables are passed to the logabug code via html_context.
|
# These variables are passed to the logabug code via html_context.
|
||||||
giturl = u'http://git.openstack.org/cgit/openstack/openstack-manuals/tree/doc/common-rst/source'
|
giturl = u'http://git.openstack.org/cgit/openstack/openstack-manuals/tree/doc/common/source'
|
||||||
git_cmd = "/usr/bin/git log | head -n1 | cut -f2 -d' '"
|
git_cmd = "/usr/bin/git log | head -n1 | cut -f2 -d' '"
|
||||||
gitsha = os.popen(git_cmd).read().strip('\n')
|
gitsha = os.popen(git_cmd).read().strip('\n')
|
||||||
html_context = {"gitsha": gitsha, "bug_tag": bug_tag,
|
html_context = {"gitsha": gitsha, "bug_tag": bug_tag,
|
@ -1 +1 @@
|
|||||||
../../common-rst
|
../../common
|
@ -1 +1 @@
|
|||||||
../../common-rst/
|
../../common
|
@ -1 +1 @@
|
|||||||
../../common-rst/
|
../../common
|
@ -1 +1 @@
|
|||||||
../../common-rst
|
../../common
|
@ -1 +1 @@
|
|||||||
../../common-rst
|
../../common
|
@ -1 +1 @@
|
|||||||
../../common-rst
|
../../common
|
@ -1 +1 @@
|
|||||||
../../common-rst
|
../../common
|
@ -24,7 +24,7 @@ trap "mv -f ${INDEX}.save ${INDEX}" EXIT
|
|||||||
|
|
||||||
for tag in $TAGS; do
|
for tag in $TAGS; do
|
||||||
GLOSSARY=""
|
GLOSSARY=""
|
||||||
if [[ ! -e doc/common-rst/glossary.rst ]] ; then
|
if [[ ! -e doc/common/glossary.rst ]] ; then
|
||||||
GLOSSARY="--glossary"
|
GLOSSARY="--glossary"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -67,7 +67,7 @@ done
|
|||||||
|
|
||||||
if [ "$GLOSSARY" -eq "1" ] ; then
|
if [ "$GLOSSARY" -eq "1" ] ; then
|
||||||
echo "Generating Glossary"
|
echo "Generating Glossary"
|
||||||
tools/glossary2rst.py doc/common-rst/glossary.rst
|
tools/glossary2rst.py doc/common/glossary.rst
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "$BUILD" ] ; then
|
if [ -z "$BUILD" ] ; then
|
||||||
|
@ -35,16 +35,16 @@ else
|
|||||||
NUMBER_OF_CORES=2
|
NUMBER_OF_CORES=2
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# common-rst is imported from various RST documents, but what files are
|
# common is imported from various RST documents, but what files are
|
||||||
# used varies across RST documents. Thus we need an index file to include
|
# used varies across RST documents. Thus we need an index file to include
|
||||||
# all files under common-rst. To this aim, we create such document called
|
# all files under common. To this aim, we create such document called
|
||||||
# 'common-rst-work' dynamically to generate the POT file of common-rst.
|
# 'common-work' dynamically to generate the POT file of common.
|
||||||
if [[ "$REPOSITORY" = "openstack-manuals" && "$DOCNAME" = "common-rst" ]] ; then
|
if [[ "$REPOSITORY" = "openstack-manuals" && "$DOCNAME" = "common" ]] ; then
|
||||||
DIRECTORY="doc/common-rst-work"
|
DIRECTORY="doc/common-work"
|
||||||
TOPDIR="doc/"
|
TOPDIR="doc/"
|
||||||
mkdir -p $DIRECTORY/source
|
mkdir -p $DIRECTORY/source
|
||||||
cp doc/common-rst/source/conf.py $DIRECTORY/source/conf.py
|
cp doc/common/source/conf.py $DIRECTORY/source/conf.py
|
||||||
ln -sf ../../common-rst $DIRECTORY/source/common
|
ln -sf ../../common $DIRECTORY/source/common
|
||||||
cat <<EOF > $DIRECTORY/source/index.rst
|
cat <<EOF > $DIRECTORY/source/index.rst
|
||||||
.. toctree::
|
.. toctree::
|
||||||
:maxdepth: 2
|
:maxdepth: 2
|
||||||
@ -56,7 +56,7 @@ fi
|
|||||||
|
|
||||||
if [ "$REPOSITORY" = "openstack-manuals" ] ; then
|
if [ "$REPOSITORY" = "openstack-manuals" ] ; then
|
||||||
# Build Glossary
|
# Build Glossary
|
||||||
tools/glossary2rst.py doc/common-rst/glossary.rst
|
tools/glossary2rst.py doc/common/glossary.rst
|
||||||
fi
|
fi
|
||||||
# First remove the old pot file, otherwise the new file will contain
|
# First remove the old pot file, otherwise the new file will contain
|
||||||
# old references
|
# old references
|
||||||
@ -74,16 +74,16 @@ fi
|
|||||||
sphinx-build -j $NUMBER_OF_CORES -b gettext $TAG ${DIRECTORY}/source/ \
|
sphinx-build -j $NUMBER_OF_CORES -b gettext $TAG ${DIRECTORY}/source/ \
|
||||||
${DIRECTORY}/source/locale/
|
${DIRECTORY}/source/locale/
|
||||||
|
|
||||||
if [[ "$REPOSITORY" = "openstack-manuals" && "$DOCNAME" = "common-rst" ]] ; then
|
if [[ "$REPOSITORY" = "openstack-manuals" && "$DOCNAME" = "common" ]] ; then
|
||||||
# In case of common-rst, we use the working directory 'common-rst-work'.
|
# In case of common, we use the working directory 'common-work'.
|
||||||
# Copies the generated POT to common-rst/source/locale
|
# Copies the generated POT to common/source/locale
|
||||||
# and finally removes the working directory.
|
# and finally removes the working directory.
|
||||||
msgcat ${DIRECTORY}/source/locale/common.pot | \
|
msgcat ${DIRECTORY}/source/locale/common.pot | \
|
||||||
awk '$0 !~ /^\# [a-z0-9]+$/' \
|
awk '$0 !~ /^\# [a-z0-9]+$/' \
|
||||||
> ${TOPDIR}common-rst/source/locale/common-rst.pot
|
> ${TOPDIR}common/source/locale/common.pot
|
||||||
rm -rf $DIRECTORY
|
rm -rf $DIRECTORY
|
||||||
else
|
else
|
||||||
# common-rst is translated as part of openstack-manuals, do not
|
# common is translated as part of openstack-manuals, do not
|
||||||
# include the file in the combined tree if it exists.
|
# include the file in the combined tree if it exists.
|
||||||
rm -f ${DIRECTORY}/source/locale/common.pot
|
rm -f ${DIRECTORY}/source/locale/common.pot
|
||||||
# Take care of deleting all temporary files so that
|
# Take care of deleting all temporary files so that
|
||||||
|
@ -26,7 +26,7 @@ function copy_rst_trans {
|
|||||||
for lang in ja ; do
|
for lang in ja ; do
|
||||||
TARGET=$PROJECT_DIR/$target/source/locale/$lang/LC_MESSAGES
|
TARGET=$PROJECT_DIR/$target/source/locale/$lang/LC_MESSAGES
|
||||||
mkdir -p $TARGET
|
mkdir -p $TARGET
|
||||||
cp doc/common-rst/source/locale/$lang/LC_MESSAGES/common-rst.po \
|
cp doc/common/source/locale/$lang/LC_MESSAGES/common.po \
|
||||||
$TARGET
|
$TARGET
|
||||||
done
|
done
|
||||||
(cd $PROJECT_DIR; git add $target/source/locale/)
|
(cd $PROJECT_DIR; git add $target/source/locale/)
|
||||||
@ -39,7 +39,7 @@ function copy_rst {
|
|||||||
tools/glossary2rst.py $PROJECT_DIR/$target/glossary.rst
|
tools/glossary2rst.py $PROJECT_DIR/$target/glossary.rst
|
||||||
|
|
||||||
for filename in app_support.rst conventions.rst; do
|
for filename in app_support.rst conventions.rst; do
|
||||||
cp doc/common-rst/$filename $PROJECT_DIR/$target
|
cp doc/common/$filename $PROJECT_DIR/$target
|
||||||
done
|
done
|
||||||
(cd $PROJECT_DIR; git add $target)
|
(cd $PROJECT_DIR; git add $target)
|
||||||
}
|
}
|
||||||
|
8
tox.ini
@ -90,7 +90,7 @@ commands =
|
|||||||
sitepackages=True
|
sitepackages=True
|
||||||
whitelist_externals = doc-tools-check-languages
|
whitelist_externals = doc-tools-check-languages
|
||||||
commands =
|
commands =
|
||||||
{toxinidir}/tools/glossary2rst.py doc/common-rst/glossary.rst
|
{toxinidir}/tools/glossary2rst.py doc/common/glossary.rst
|
||||||
doc-tools-check-languages doc-tools-check-languages.conf test all
|
doc-tools-check-languages doc-tools-check-languages.conf test all
|
||||||
|
|
||||||
[testenv:buildlang]
|
[testenv:buildlang]
|
||||||
@ -101,7 +101,7 @@ commands =
|
|||||||
sitepackages=True
|
sitepackages=True
|
||||||
whitelist_externals = doc-tools-check-languages
|
whitelist_externals = doc-tools-check-languages
|
||||||
commands =
|
commands =
|
||||||
{toxinidir}/tools/glossary2rst.py doc/common-rst/glossary.rst
|
{toxinidir}/tools/glossary2rst.py doc/common/glossary.rst
|
||||||
doc-tools-check-languages doc-tools-check-languages.conf test {posargs}
|
doc-tools-check-languages doc-tools-check-languages.conf test {posargs}
|
||||||
|
|
||||||
[testenv:publishlang]
|
[testenv:publishlang]
|
||||||
@ -111,7 +111,7 @@ commands =
|
|||||||
sitepackages=True
|
sitepackages=True
|
||||||
whitelist_externals = doc-tools-check-languages
|
whitelist_externals = doc-tools-check-languages
|
||||||
commands =
|
commands =
|
||||||
{toxinidir}/tools/glossary2rst.py doc/common-rst/glossary.rst
|
{toxinidir}/tools/glossary2rst.py doc/common/glossary.rst
|
||||||
doc-tools-check-languages doc-tools-check-languages.conf publish all
|
doc-tools-check-languages doc-tools-check-languages.conf publish all
|
||||||
|
|
||||||
[testenv:generatepot-rst]
|
[testenv:generatepot-rst]
|
||||||
@ -123,7 +123,7 @@ commands = {toxinidir}/tools/generatepot-rst.sh openstack-manuals 1 {posargs}
|
|||||||
# Settings for doc8:
|
# Settings for doc8:
|
||||||
# Ignore target directories
|
# Ignore target directories
|
||||||
# TODO(samos123): remove sriov from ignore when fix for #1487302 is in doc8
|
# TODO(samos123): remove sriov from ignore when fix for #1487302 is in doc8
|
||||||
ignore-path = doc/*/target,doc/*/build*,doc/common-rst/glossary.rst,doc/networking-guide/source/adv-config-sriov.rst
|
ignore-path = doc/*/target,doc/*/build*,doc/common/glossary.rst,doc/networking-guide/source/adv-config-sriov.rst
|
||||||
# File extensions to use
|
# File extensions to use
|
||||||
extensions = .rst,.txt
|
extensions = .rst,.txt
|
||||||
# Maximal line length should be 79 but we have some overlong lines.
|
# Maximal line length should be 79 but we have some overlong lines.
|
||||||
|