diff options
author | Luis A. Garcia <luis@linux.vnet.ibm.com> | 2013-07-18 00:49:49 +0000 |
---|---|---|
committer | Luis A. Garcia <luis@linux.vnet.ibm.com> | 2013-08-03 00:19:17 +0000 |
commit | 9004239b9ffc7d1ef6ae3393a8d500e1d822af4a (patch) | |
tree | 6c7dd692b3577d0f8e60b71f5bb82dea13ce5a90 /bin/heat-api-cfn | |
parent | 0af1565a5eefc2f040e955c1654518c3367758c1 (diff) | |
download | heat-9004239b9ffc7d1ef6ae3393a8d500e1d822af4a.tar.gz |
Enable localizable REST API responses via the Accept-Language header
Add support for doing language resolution for a request, based on the
Accept-Language HTTP header. Using the lazy gettext functionality, from
oslo gettextutils, it is possible to use the resolved language to
translate exception messages to the user requested language and
return that translation from the API.
The patch removes individually imported _() so they don't replace the
one installed service-wide.
Also, it adds the ability to fully re-create a remote error
with the same kwargs with which it was originally created, so that we
can translate it and show it to the user.
Partially implements bp user-locale-api.
Change-Id: I63edc8463836bfff257daa8a2c66ed5d3a444254
Diffstat (limited to 'bin/heat-api-cfn')
-rwxr-xr-x | bin/heat-api-cfn | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/heat-api-cfn b/bin/heat-api-cfn index 8eceb6aef..95a946ca8 100755 --- a/bin/heat-api-cfn +++ b/bin/heat-api-cfn @@ -35,7 +35,7 @@ if os.path.exists(os.path.join(possible_topdir, 'heat', '__init__.py')): from heat.openstack.common import gettextutils -gettextutils.install('heat') +gettextutils.install('heat', lazy=True) from oslo.config import cfg |