diff options
author | David Stanek <dstanek@dstanek.com> | 2014-03-26 15:58:32 +0000 |
---|---|---|
committer | David Stanek <dstanek@dstanek.com> | 2014-03-26 16:09:40 +0000 |
commit | 7a1c13aec30496abca8ba1fd8223b3d00f8cb912 (patch) | |
tree | 66d82ef3c95ebd98ad975ffc0bd57d50f3cd5413 /httpd | |
parent | a4eda7ada7e3157d826a41fd33f0b503936647ab (diff) | |
download | keystone-7a1c13aec30496abca8ba1fd8223b3d00f8cb912.tar.gz |
Enable lazy translations in httpd/keystone.py
This allows strings being returned in an HTTP response to be translated
into the language specified in the HTTP requests headers.
Closes-bug: #1297922
Change-Id: I8a671277f861075deddd1ee4cf5daca62a43fff7
Diffstat (limited to 'httpd')
-rw-r--r-- | httpd/keystone.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/httpd/keystone.py b/httpd/keystone.py index b5da6ac12..21761fd6b 100644 --- a/httpd/keystone.py +++ b/httpd/keystone.py @@ -17,6 +17,13 @@ import os from paste import deploy +from keystone.openstack.common import gettextutils +# NOTE(dstanek): gettextutils.enable_lazy() must be called before +# gettextutils._() is called to ensure it has the desired lazy lookup +# behavior. This includes cases, like keystone.exceptions, where +# gettextutils._() is called at import time. +gettextutils.enable_lazy() + from keystone.common import dependency from keystone.common import environment from keystone.common import sql |