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
This commit is contained in:
David Stanek 2014-03-26 15:58:32 +00:00
parent a4eda7ada7
commit 7a1c13aec3
1 changed files with 7 additions and 0 deletions

View File

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