Add the same locales that OnionShare is translated into

This commit is contained in:
Micah Lee 2020-08-26 21:13:53 -07:00
parent 84fc623e99
commit 5e8a64cb7c
No known key found for this signature in database
GPG key ID: 403C2657CD994F73
220 changed files with 39919 additions and 1 deletions

27
docs/build.sh Executable file
View file

@ -0,0 +1,27 @@
#!/bin/bash
# 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"
# Generate English .po files
make 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/localized_html > /dev/null
mkdir -p build/localized_html
make html
mv build/html build/localized_html/en
for LOCALE in $LOCALES; do
make -e SPHINXOPTS="-D language='$LOCALE'" html
mv build/html build/localized_html/$LOCALE
done
# Redirect to English by default
echo '<html><head><meta http-equiv="refresh" content="0; url=en/" /><script>document.location="en/"</script></head></html>' > build/localized_html/index.html