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:
Andreas Jaeger 2016-10-13 19:38:23 +02:00
parent f4843c3171
commit 928765eacd

View File

@ -41,13 +41,14 @@ if [ ! -e ${DIRECTORY}/source/locale/ ]; then
exit 0
fi
# TODO(amotoki): releasenote conf.py files in most projects do not
# define 'locale_dirs' setting which is required for i18n.
# Remove this once repositories are changed.
# Check that locale_dirs is really set, otherwise translations
# will not work.
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
REFERENCES=`mktemp`
trap "rm -f -- '$REFERENCES'" EXIT
@ -127,8 +128,3 @@ $script_path/run-tox.sh releasenotes
# Revert any changes to the index file.
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