Enable lazy translation

This change makes it so that if the user makes a request with an
Accept-Language header and the response is an error where the
message is translatable, then the message will be translated to
the requested language (or the most appropriate language
available).

completes bp user-locale-api

Change-Id: I5b0b02e0459a6a444baa12f8722adb829b7e152b
This commit is contained in:
Brant Knudson
2014-01-14 14:01:22 -06:00
parent 71b1bfed7e
commit 2167e3612c
4 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -40,7 +40,7 @@ from keystone.openstack.common import gettextutils
# NOTE(blk-u):
# gettextutils.install() must run to set _ before importing any modules that
# contain static translated strings.
gettextutils.install('keystone')
gettextutils.install('keystone', lazy=True)
from keystone.common import dependency
from keystone.common import environment
+1 -1
View File
@@ -32,7 +32,7 @@ from keystone.openstack.common import gettextutils
# NOTE(blk-u): gettextutils.install() must run to set _ before importing any
# modules that contain static translated strings.
gettextutils.install('keystone')
gettextutils.install('keystone', lazy=True)
from keystone import cli
from keystone.common import environment
+1 -1
View File
@@ -24,7 +24,7 @@ from keystone.openstack.common import gettextutils
# NOTE(blk-u):
# gettextutils.install() must run to set _ before importing any modules that
# contain static translated strings.
gettextutils.install('keystone')
gettextutils.install('keystone', lazy=True)
from keystone.common import dependency
from keystone.common import environment
+1 -1
View File
@@ -21,7 +21,7 @@ from wsgiref import simple_server
from keystone.openstack.common import gettextutils
PROJECT = 'kds'
gettextutils.install(PROJECT)
gettextutils.install(PROJECT, lazy=True)
from keystone.contrib.kds.api import app
from keystone.contrib.kds.common import service