Remove temporary hack for translated releasenotes
The releasenotes conf.py files are fine now, we can remove the hack. Instead test that the file is setup correctly and fail if not - that way new projects *with* translations are forced to do this properly. Change-Id: I38fdfac852c0b3007814d66f3c7cab87d6207c8c
This commit is contained in:
parent
f4843c3171
commit
928765eacd
@ -41,13 +41,14 @@ if [ ! -e ${DIRECTORY}/source/locale/ ]; then
|
|||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# TODO(amotoki): releasenote conf.py files in most projects do not
|
# Check that locale_dirs is really set, otherwise translations
|
||||||
# define 'locale_dirs' setting which is required for i18n.
|
# will not work.
|
||||||
# Remove this once repositories are changed.
|
|
||||||
if ! grep -q -E '^locale_dirs *=' $DIRECTORY/source/conf.py; then
|
if ! grep -q -E '^locale_dirs *=' $DIRECTORY/source/conf.py; then
|
||||||
echo "locale_dirs = ['locale/']" >> $DIRECTORY/source/conf.py
|
echo "Translations exist and locale_dirs missing in source/conf.py"
|
||||||
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
REFERENCES=`mktemp`
|
REFERENCES=`mktemp`
|
||||||
trap "rm -f -- '$REFERENCES'" EXIT
|
trap "rm -f -- '$REFERENCES'" EXIT
|
||||||
|
|
||||||
@ -127,8 +128,3 @@ $script_path/run-tox.sh releasenotes
|
|||||||
|
|
||||||
# Revert any changes to the index file.
|
# Revert any changes to the index file.
|
||||||
git checkout -- ${DIRECTORY}/source/index.rst
|
git checkout -- ${DIRECTORY}/source/index.rst
|
||||||
|
|
||||||
# TODO(amotoki): Revert conf.py now as we might have changed this to
|
|
||||||
# enable internationalization.
|
|
||||||
# Remove this again later.
|
|
||||||
git checkout -- ${DIRECTORY}/source/conf.py
|
|
||||||
|
Loading…
Reference in New Issue
Block a user