← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1804289] Re: LOCALE_PATH causes message mo files not found

 

Thanks @Akihiro, I provided work-around for our customer and then forgot
about this. I tried to change invalid to duplicate status, but can not
found it. Since it was fixed in
https://bugs.launchpad.net/horizon/+bug/1818639, so marked it released.

** Changed in: horizon
       Status: Invalid => Confirmed

** Changed in: horizon
     Assignee: Gloria Gu (gloria-gu) => (unassigned)

** Changed in: horizon
       Status: Confirmed => Fix Released

-- 
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