From 928765eacd4ea61ac3f95909a583d8ff86ebf768 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Thu, 13 Oct 2016 19:38:23 +0200 Subject: [PATCH] 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 --- jenkins/jobs/include-build-releasenotes.sh | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/jenkins/jobs/include-build-releasenotes.sh b/jenkins/jobs/include-build-releasenotes.sh index 24f7cddf39..fb5ecccc86 100755 --- a/jenkins/jobs/include-build-releasenotes.sh +++ b/jenkins/jobs/include-build-releasenotes.sh @@ -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