Rename common-rst to common

Change-Id: I2007268dde122edf5437c4905dbb8e9cc3b06529
This commit is contained in:
KATO Tomoyuki 2016-02-14 18:35:14 +09:00
parent 3b21a9b6e5
commit 84758f1e47
10 changed files with 22 additions and 22 deletions

View File

@ -2,6 +2,6 @@ Important note about this directory
=================================== ===================================
Because this directory is synced from openstack-manuals, make any changes in Because this directory is synced from openstack-manuals, make any changes in
openstack-manuals/doc/common-rst. After changes to the synced files merge to openstack-manuals/doc/common. After changes to the synced files merge to
openstack-manuals/doc/common-rst, a patch is automatically proposed for this openstack-manuals/doc/common, a patch is automatically proposed for this
directory. directory.

View File

@ -47,5 +47,5 @@ SPECIAL_BOOKS=(
["api-quick-start"]="RST" ["api-quick-start"]="RST"
["firstapp"]="RST" ["firstapp"]="RST"
# These are translated in openstack-manuals # These are translated in openstack-manuals
["common-rst"]="skip" ["common"]="skip"
) )

View File

@ -1 +1 @@
../../common-rst ../../common

View File

@ -56,7 +56,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

View File

@ -31,14 +31,14 @@ fi
# We're not doing anything for this directory. But we need to handle # We're not doing anything for this directory. But we need to handle
# it by this script so that the common-rst.pot file gets registered. # it by this script so that the common.pot file gets registered.
if [[ "$DOCNAME" = "common-rst" ]] ; then if [[ "$DOCNAME" = "common" ]] ; then
exit 0 exit 0
fi 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
@ -61,18 +61,18 @@ if [ "$REPOSITORY" = "openstack-manuals" ] ; then
sed -i -e 's/^"Project-Id-Version: [a-zA-Z0-9\. ]+\\n"$/"Project-Id-Version: \\n"/' \ sed -i -e 's/^"Project-Id-Version: [a-zA-Z0-9\. ]+\\n"$/"Project-Id-Version: \\n"/' \
${DIRECTORY}/source/locale/common.pot ${DIRECTORY}/source/locale/common.pot
# Create the common pot file # Create the common pot file
msgcat --sort-by-file ${TOPDIR}common-rst/source/locale/common-rst.pot \ msgcat --sort-by-file ${TOPDIR}common/source/locale/common.pot \
${DIRECTORY}/source/locale/common.pot | \ ${DIRECTORY}/source/locale/common.pot | \
sed -e 's/^"Project-Id-Version: [a-zA-Z0-9\. ]+\\n"$/"Project-Id-Version: \\n"/' | \ sed -e 's/^"Project-Id-Version: [a-zA-Z0-9\. ]+\\n"$/"Project-Id-Version: \\n"/' | \
awk '$0 !~ /^\# [a-z0-9]+$/' | awk '$0 !~ /^\# \#-\#-\#-\#-\# /' \ awk '$0 !~ /^\# [a-z0-9]+$/' | awk '$0 !~ /^\# \#-\#-\#-\#-\# /' \
> ${DIRECTORY}/source/locale/common-rst.pot > ${DIRECTORY}/source/locale/common.pot
mv -f ${DIRECTORY}/source/locale/common-rst.pot \ mv -f ${DIRECTORY}/source/locale/common.pot \
${TOPDIR}common-rst/source/locale/common-rst.pot ${TOPDIR}common/source/locale/common.pot
rm -f ${DIRECTORY}/source/locale/common.pot rm -f ${DIRECTORY}/source/locale/common.pot
# Simplify metadata # Simplify metadata
rm -f ${TOPDIR}common-rst/source/locale/dummy.po rm -f ${TOPDIR}common/source/locale/dummy.po
cat << EOF > ${TOPDIR}common-rst/source/locale/dummy.po cat << EOF > ${TOPDIR}common/source/locale/dummy.po
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: \n" "Project-Id-Version: \n"
@ -85,14 +85,14 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
EOF EOF
msgmerge -N ${TOPDIR}common-rst/source/locale/dummy.po \ msgmerge -N ${TOPDIR}common/source/locale/dummy.po \
${TOPDIR}common-rst/source/locale/common-rst.pot \ ${TOPDIR}common/source/locale/common.pot \
> ${TOPDIR}common-rst/source/locale/tmp.pot > ${TOPDIR}common/source/locale/tmp.pot
mv -f ${TOPDIR}common-rst/source/locale/tmp.pot \ mv -f ${TOPDIR}common/source/locale/tmp.pot \
${TOPDIR}common-rst/source/locale/common-rst.pot ${TOPDIR}common/source/locale/common.pot
rm -f ${TOPDIR}common-rst/source/locale/dummy.po rm -f ${TOPDIR}common/source/locale/dummy.po
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.
if [ -f ${DIRECTORY}/source/locale/common.pot ] ; then if [ -f ${DIRECTORY}/source/locale/common.pot ] ; then
rm ${DIRECTORY}/source/locale/common.pot rm ${DIRECTORY}/source/locale/common.pot

View File

@ -168,7 +168,7 @@ commands =
[doc8] [doc8]
# Settings for doc8: # Settings for doc8:
# Ignore target directories # Ignore target directories
ignore-path = firstapp/build*,common-rst/ ignore-path = firstapp/build*,common/
# File extensions to use # File extensions to use
extensions = .rst,.txt extensions = .rst,.txt
# Ignore lines longer than 79 chars # Ignore lines longer than 79 chars