From 0429fb0a39d86567f0adb12e99e7236cff824c8a Mon Sep 17 00:00:00 2001 From: vsaienko Date: Thu, 4 Jun 2015 10:51:16 +0300 Subject: [PATCH] Compile l10n strings at post-install phase Doing this should enable changing language in Horizon. add new dependency: gettext fix tabs Change-Id: I75d0eac50943eddc3ec8acc9378726c4ecc61985 Closes-Bug: #1460613 --- trusty/debian/changelog | 7 ++++++ trusty/debian/control | 1 + trusty/debian/openstack-dashboard.postinst | 27 ++++++++++++++-------- 3 files changed, 26 insertions(+), 9 deletions(-) diff --git a/trusty/debian/changelog b/trusty/debian/changelog index 03f9433..52adf1d 100644 --- a/trusty/debian/changelog +++ b/trusty/debian/changelog @@ -1,3 +1,10 @@ +horizon (1:2015.1.0-1~u14.04+mos4) mos7.0; urgency=medium + + * Compile l10n strings at post-install + add new dependency: gettext + + -- Vasyl Saienko Thu, 04 Jun 2015 22:27:30 +0200 + horizon (1:2015.1.0-1~u14.04+mos3) mos7.0; urgency=medium * Fix python-oslo-* naming scheme diff --git a/trusty/debian/control b/trusty/debian/control index f7a726d..560e442 100644 --- a/trusty/debian/control +++ b/trusty/debian/control @@ -24,6 +24,7 @@ Depends: python-pbr (>= 0.10), python-babel (>= 1.3), python-django (>= 1.4.2), + gettext, python-pint (>= 0.5), python-cloudfiles, python-compressor (>= 1.4), diff --git a/trusty/debian/openstack-dashboard.postinst b/trusty/debian/openstack-dashboard.postinst index 702422b..ac79cc2 100644 --- a/trusty/debian/openstack-dashboard.postinst +++ b/trusty/debian/openstack-dashboard.postinst @@ -17,15 +17,15 @@ if [ "$1" = "configure" ]; then /etc/apache2/conf-available/$CONF \ 1:2013.2~b2-0ubuntu3 -- "$@" - if ! getent group horizon > /dev/null 2>&1 - then - addgroup --system horizon >/dev/null - fi - if ! getent passwd horizon > /dev/null 2>&1 - then - adduser --system --home /usr/share/openstack-dashboard/ --ingroup horizon \ - --no-create-home --shell /bin/false horizon - fi + if ! getent group horizon > /dev/null 2>&1 + then + addgroup --system horizon >/dev/null + fi + if ! getent passwd horizon > /dev/null 2>&1 + then + adduser --system --home /usr/share/openstack-dashboard/ --ingroup horizon \ + --no-create-home --shell /bin/false horizon + fi ( cd /usr/share/openstack-dashboard @@ -40,6 +40,15 @@ if [ "$1" = "configure" ]; then /usr/share/openstack-dashboard/openstack_dashboard/static fi + if [ -d /usr/share/openstack-dashboard/openstack_dashboard/locale -a -e /usr/share/openstack-dashboard/manage.py ] ; then + curdir=$(pwd) + cd /usr/share/openstack-dashboard/openstack_dashboard + python ../manage.py compilemessages + cd "${curdir}" + else + echo "Couldn't compile Django l10n strings (.mo files)" + fi + if [ -d /etc/openstack-dashboard/ ] ; then chown horizon:horizon /etc/openstack-dashboard/ fi -- 2.45.2