#!/bin/bash VERSION=`cat ../share/version.txt` # Supported locales #LOCALES="ar ca zh_CN zh_TW da nl en fr de el is ga it ja nb fa pl pt_BR pt_PT ro ru sr@latin es sv te tr uk" LOCALES="en es" # Generate English .po files make gettext rm -rf gettext > /dev/null cp -r build/gettext gettext # Update all .po files for all locales for LOCALE in $LOCALES; do sphinx-intl update -p build/gettext -l $LOCALE done # Build all locales rm -rf build/html build/docs > /dev/null mkdir -p build/docs/$VERSION make html mv build/html build/docs/$VERSION/en for LOCALE in $LOCALES; do make -e SPHINXOPTS="-D language='$LOCALE'" html mv build/html build/docs/$VERSION/$LOCALE done # Redirect to English by default echo '
' > build/docs/$VERSION/index.html # Redirect to latest version echo '' > build/docs/index.html