Merge pull request #395 from maxking/compile-messages

Compile all the i18n files installed in the container.
This commit is contained in:
Abhilash Raj
2020-08-22 16:19:40 -07:00
committed by GitHub

View File

@@ -115,6 +115,16 @@ fi
# Collect static for the django installation.
python3 manage.py collectstatic --noinput --clear --verbosity 0
# Compile all the installed po files to mo.
SITE_DIR=$(python3 -c 'import site; print(site.getsitepackages()[0])')
echo "Compiling locale files in $SITE_DIR"
cd $SITE_DIR && /opt/mailman-web/manage.py compilemessages && cd -
# Compress static files.
python3 manage.py compress --force
# Migrate all the data to the database if this is a new installation, otherwise
# this command will upgrade the database.
python3 manage.py migrate