From c541e1ec5c2a3937e9d90cc106a4727c6c2b47db Mon Sep 17 00:00:00 2001 From: prashkre Date: Fri, 24 Mar 2017 13:44:00 -0400 Subject: [PATCH] Error messages are not translating with locale. Fixed issue with translation of keystone error messages which was not happening in case of any error messages from identity API with locale being set. Change-Id: Idc73e86647f2adce9e39387b0c3124431dcac255 Closes-Bug: #1674415 (cherry picked from commit 2126bd576550a68284e05fc8eadedce072531563) --- keystone/server/wsgi.py | 9 +++------ releasenotes/notes/bug_1674415-e8a7345aa2b05ab7.yaml | 7 +++++++ 2 files changed, 10 insertions(+), 6 deletions(-) create mode 100644 releasenotes/notes/bug_1674415-e8a7345aa2b05ab7.yaml diff --git a/keystone/server/wsgi.py b/keystone/server/wsgi.py index 0e4711369d..b8ea530b80 100644 --- a/keystone/server/wsgi.py +++ b/keystone/server/wsgi.py @@ -17,18 +17,15 @@ import os import oslo_i18n from oslo_log import log -from keystone.common import profiler -import keystone.conf -from keystone import exception - - # NOTE(dstanek): i18n.enable_lazy() must be called before # keystone.i18n._() is called to ensure it has the desired lazy lookup # behavior. This includes cases, like keystone.exceptions, where # keystone.i18n._() is called at import time. oslo_i18n.enable_lazy() - +from keystone.common import profiler +import keystone.conf +from keystone import exception from keystone.server import common from keystone.version import service as keystone_service diff --git a/releasenotes/notes/bug_1674415-e8a7345aa2b05ab7.yaml b/releasenotes/notes/bug_1674415-e8a7345aa2b05ab7.yaml new file mode 100644 index 0000000000..ffcd451560 --- /dev/null +++ b/releasenotes/notes/bug_1674415-e8a7345aa2b05ab7.yaml @@ -0,0 +1,7 @@ +--- +fixes: + - | + [`bug 1674415 `_] + Fixed issue with translation of keystone error messages which was not + happening in case of any error messages from identity API with locale + being set.