Support Accept-Language for API messages
Currently, error messages coming back from the API are translated using the same locale as the system the Cinder 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:/
Most of the work in Oslo and Nova should be easily transferable to the Cinder API.
Blueprint information
- Status:
- Complete
- Approver:
- John Griffith
- 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
- Sean McGinnis
Whiteboard
(smcginnis): Marking obsolete as this has been sitting out there for a long time. If this is still needed, please submit a new bp.
Gerrit topic: https:/
Addressed by: https:/
Externalize error messages in the API
Addressed by: https:/
Sync gettextutils from oslo
Addressed by: https:/
Add support for API message localization
Addressed by: https:/
Add common methods required to allow translation of REST API responses
---
Unfortunately, this was disabled late in the havana cycle. See https:/
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: TODO
Add translatable error messages for API exceptions that did not have one: TODO