From 7e27910228c60427fa2a6e23ca92bdaeaf923d2d Mon Sep 17 00:00:00 2001 From: Pete Birley Date: Tue, 15 May 2018 13:00:47 -0500 Subject: [PATCH] Horizon: Add support for performing message compilation This PS adds support for message compilation, if the image supports it. Change-Id: Ie15a1a437ff516af697a5bb65c5c7831de872c30 Signed-off-by: Pete Birley --- horizon/templates/bin/_horizon.sh.tpl | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/horizon/templates/bin/_horizon.sh.tpl b/horizon/templates/bin/_horizon.sh.tpl index 3d26534a..473d2354 100644 --- a/horizon/templates/bin/_horizon.sh.tpl +++ b/horizon/templates/bin/_horizon.sh.tpl @@ -34,6 +34,11 @@ function start () { rm -rf /var/run/apache2/* APACHE_DIR="apache2" + # If the image has support for it, compile the translations + if type -p gettext >/dev/null 2>/dev/null; then + cd ${SITE_PACKAGES_ROOT}/openstack_dashboard; /tmp/manage.py compilemessages + fi + # Compress Horizon's assets. /tmp/manage.py collectstatic --noinput /tmp/manage.py compress --force