Support Accept-Language for API messages
Currently, error messages coming back from the API are translated using the same locale as the system the Neutron API is running on. Ideally, we would like to have the messages translated to the request senders locale, which we can support using the HTTP Accept-Language header to determine before sending back the translated response. Alternatively, there is the possibility of using the tenant/user data from Keystone to store a preferred locale.
There is a similar blueprint for Nova that can be used to track the implementation work there:
https:/
Blueprint information
- Status:
- Complete
- Approver:
- Mark McClain
- Priority:
- Low
- Drafter:
- Mathew Odden
- Direction:
- Approved
- Assignee:
- Luis A. Garcia
- Definition:
- Obsolete
- Series goal:
- None
- Implementation:
- Good progress
- Milestone target:
- next
- Started by
- Mathew Odden
- Completed by
- Armando Migliaccio
Related branches
Related bugs
Sprints
Whiteboard
Dec-16-2015(armax): If someone is interested in pursuing it, this must be re-submitted according to guidelines defined in [1].
[1] http://
---------------
Neutron has a Fault class in the wsgi layer that would be good for doing the translation for error messages in.
https:/
Gerrit topic: https:/
Addressed by: https:/
Sync latest gettextutils from oslo-incubator
Addressed by: https:/
Add common methods required to allow translation of REST API responses
Addressed by: https:/
Enable localizable REST API responses via the Accept-Language header
Addressed by: https:/
Externalize error messages in the API
---
Unfortunately, this was disabled late in the havana cycle. See https:/
Addressed by: https:/
Do not append to messages with +
Work Items
Work items:
Integrate common gettext utilities for delayed translations from oslo-incubator: DONE
Implement support Accept-Language header support and API layer translations: DONE
Additional translated messages for API error responses: DONE