From 12cd2090b69b2df73ef31d71d40ce9c78958d780 Mon Sep 17 00:00:00 2001 From: Ivan Kolodyazhny Date: Tue, 18 Feb 2020 15:24:03 +0000 Subject: [PATCH] Revert "Explicitly set LOCALE_PATHS for Horizon apps" This reverts commit 4e911e2889ebe7f0a577a0323649dceb9cef363c. We don't need this change on the latest master. I'm unable to reproduce an original bug without this patch. Closes-Bug: #1834167 Change-Id: Iaffdb64fb0bc58525554ac9d40d2aeadb0876ffd --- doc/source/configuration/settings.rst | 17 ----------------- openstack_dashboard/settings.py | 14 +------------- 2 files changed, 1 insertion(+), 30 deletions(-) diff --git a/doc/source/configuration/settings.rst b/doc/source/configuration/settings.rst index bf3a215399..921063034d 100644 --- a/doc/source/configuration/settings.rst +++ b/doc/source/configuration/settings.rst @@ -2544,23 +2544,6 @@ After the whole settings process has gone through, TEMPLATE_LOADERS will be: ('django.template.loaders.cached.Loader', CACHED_TEMPLATE_LOADERS), ) + tuple(ADD_TEMPLATE_LOADERS) -LOCALE_PATHS ------------- - -.. versionadded:: 16.0.0(Train) - -.. seealso:: - - `Django's LOCALE_PATHS documentation - `_ - -Default: Absolute paths for `horizon/locale`, `openstack_auth/locale` and -`openstack_dashboard/locale` directories. - -Django uses relative paths by default so it causes localization issues -depending on your runtime settings. To avoid this we recommend to use absolute -paths for directories with locales. - Other Settings ============== diff --git a/openstack_dashboard/settings.py b/openstack_dashboard/settings.py index 849df1c139..e3fea040d4 100644 --- a/openstack_dashboard/settings.py +++ b/openstack_dashboard/settings.py @@ -24,12 +24,8 @@ import warnings from django.utils.translation import ugettext_lazy as _ -import openstack_auth - -import horizon from horizon.utils.escape import monkeypatch_escape -import openstack_dashboard from openstack_dashboard import enabled from openstack_dashboard import exceptions from openstack_dashboard.local import enabled as local_enabled @@ -370,15 +366,7 @@ HORIZON_COMPRESS_OFFLINE_CONTEXT_BASE = { if DEBUG: logging.basicConfig(level=logging.DEBUG) -# NOTE(e0ne): Set absolute paths for directories with localization. -# Django doesn't work well for Taiwanese locale with relative paths -# wich are used by default and I can't figure out at the moment why it -# works in this way. We don't use default Django templates, so it should -# be safe to have such defaults -LOCALE_PATHS = [ - os.path.join(os.path.dirname(os.path.abspath(m.__file__)), 'locale') - for m in (horizon, openstack_dashboard, openstack_auth) -] + # Here comes the Django settings deprecation section. Being at the very end # of settings.py allows it to catch the settings defined in local_settings.py # or inside one of local_settings.d/ snippets.