yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #78571
[Bug 1804289] Re: LOCALE_PATH causes message mo files not found
*** This bug is a duplicate of bug 1818639 ***
https://bugs.launchpad.net/bugs/1818639
You can find "Mark as duplicate" at the right top menu.
** This bug has been marked a duplicate of bug 1818639
Impossible to change language in user settings to Chinese
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Dashboard (Horizon).
https://bugs.launchpad.net/bugs/1804289
Title:
LOCALE_PATH causes message mo files not found
Status in OpenStack Dashboard (Horizon):
Fix Released
Bug description:
Current default LOCALE_PATH is defined in openstack_dashboard/settings.py, like
LOCALE_PATHS = [
'horizon/locale',
'openstack_dashboard/locale'
]
They work fine in the development environment. However if Horizon path
installed in production is like
/opt/stack/venv/horizon-20180814T161452Z/srv/www/openstack-dashboard/openstack_dashboard
/opt/stack/venv/horizon-20180814T161452Z/lib/python2.7/site-packages/horizon/
when reset locale in the settings, the selected settings won't get
saved and the translation won't happen.
because of the relative locale path in settings.py, without
overwriting the path in local_settings.py.
/openstack_dashboard/dashboards/settings/user/forms.py
check_for_language returns false
if lang_code and translation.check_for_language(lang_code):
response = functions.save_config_value(
request, response, settings.LANGUAGE_COOKIE_NAME, lang_code)
updated settings.py seem to fix the problem, however, still not clear what to do with horizon/locale
Change LOCALE_PATHS = [
'horizon/locale',
# 'openstack_dashboard/locale',
os.path.join(ROOT_PATH, "locale")
]
To manage notifications about this bug go to:
https://bugs.launchpad.net/horizon/+bug/1804289/+subscriptions
References