]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Add support for API message localization
authorLuis A. Garcia <luis@linux.vnet.ibm.com>
Mon, 8 Jul 2013 23:11:05 +0000 (23:11 +0000)
committerLuis A. Garcia <luis@linux.vnet.ibm.com>
Fri, 9 Aug 2013 04:57:36 +0000 (04:57 +0000)
commit2086a91059f022344f74143ffb2ce9d0c2d6691c
treefe957b80ef2e80e25da4e55e6bbf57c4c7ef961e
parent881c73263c0fea4fd76aa88fe25284b60e3ec35f
Add support for API message localization

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 now
possible to use the resolved language to translate an exception message
to the user requested language and return that translation from the API.

Partially implements bp user-locale-api

Change-Id: Ib2c8360372996d53b50542df54a52d92b07295ca
bin/cinder-all
bin/cinder-api
cinder/api/openstack/wsgi.py
cinder/tests/api/middleware/test_faults.py
cinder/tests/api/openstack/test_wsgi.py
cinder/utils.py
cinder/wsgi.py