[openstack-dev] [sahara][horizon] translation support in sahara-dashboard and INSTALLED_APPS
Akihiro Motoki
amotoki at gmail.com
Sun Feb 21 17:22:23 UTC 2016
Hi sahara-dashaboard team (perhaps horizon and sahara dev team),
I am working on translation support in sahara-dashboard for feature
parity of Liberty horizon.
TL;DR: Why does not sahara-dashboard use 'sahara_dashboard' as INSTALLED_APPS?
Can't we add 'sahara_dashboard' as INSTALLED_APPS?
Long version:
sahara-dashboard now uses
ADD_INSTALLED_APPS = \
["sahara_dashboard.content.data_processing",
"sahara_dashboard.content.data_processing.clusters", ]
instead of 'sahara_dashboard' as most horizon plugins do.
On the other hand, the translation setup infra scripts uses
sahara_dashboard.locale as the locale directory
and django searches $apps/locale for each directory specified in
$INSTALLED_APPS.
To make translation work for sahara-dashboard, we need to place the
'locale' directory
in one of $INSTALLED_APPS directories.
It seems the easiest way is to add INSTALLED_APPS to 'sahara_dashoard'
without changing others.
As far as I checked sahara-dashboard repo, adding INSTALLED_APPS has no problem.
I proposed https://review.openstack.org/282883 based on my
investigation results.
Note: I am not sure why the current ADD_INSTALLED_APPS were chosen.
However, changing all of them seems a problem because template paths
seem to depend
on INSTALLED_APPS.
If it does not work, I would like to have more ideas from sahara-dashboard team
on how to support translation in Mitaka.
Thanks in advance!
Akihiro
More information about the OpenStack-dev
mailing list