diff options
author | Luis A. Garcia <luis@linux.vnet.ibm.com> | 2013-07-19 22:18:59 +0000 |
---|---|---|
committer | Luis A. Garcia <luis@linux.vnet.ibm.com> | 2013-07-30 19:40:14 +0000 |
commit | 319888102f970b09255025d1b7bd9326c0446fa1 (patch) | |
tree | 55ab7af72807887243b51b82182a7db587e17d92 /requirements.txt | |
parent | f58c936582a17cffcdcdb5bf624f24d574abaf0a (diff) | |
download | oslo-incubator-319888102f970b09255025d1b7bd9326c0446fa1.tar.gz |
Add common methods required to allow translation of REST API responses
REST API responses (particularly errors) are always returned to
consumers in the locale of the operating system. This change adds common
methods that will be required by other components in the process of
translating the API responses to a locale requested by the API consumer.
The patch set includes the following changes:
1) An installer for the lazy _() function is provided. Services that
want to use the Message class to do delayed translation will just have
to set the new 'lazy' flag in the existing gettext.install().
2) A method to retrieve all available languages in a given translation
domain in order to pick one that will be used to translate the
response to the user.
3) A utility method to translate a Message.
Co-authored-by: Mathew Odden <mrodden@us.ibm.com>
Co-authored-by: Ben Nemec <openstack@nemebean.com>
This partially implements bp user-locale-api.
Change-Id: I27640a3c8b255be51bc6396d238098bd25af61ec
Diffstat (limited to 'requirements.txt')
-rw-r--r-- | requirements.txt | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/requirements.txt b/requirements.txt index dec880cb..656241ba 100644 --- a/requirements.txt +++ b/requirements.txt @@ -18,6 +18,7 @@ qpid-python six netaddr pycrypto>=2.6 +Babel>=0.9.6 -f http://tarballs.openstack.org/oslo.config/oslo.config-1.2.0a3.tar.gz#egg=oslo.config-1.2.0a3 oslo.config>=1.2.0a3 |