Support Accept-Language for API messages
Currently, error messages coming back from the API are translated using the same locale as the system the Glance 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:
- None
- Priority:
- Undefined
- Drafter:
- Mathew Odden
- Direction:
- Needs approval
- Assignee:
- None
- Definition:
- Superseded
- Series goal:
- None
- Implementation:
- Unknown
- Milestone target:
- None
- Started by
- Completed by
- Mark Washenberger
Related branches
Related bugs
Sprints
Whiteboard
Example of where messages are being translated in the Glance API to the system local:
https:/
Gerrit topic: https:/
Addressed by: https:/
Sync gettextutils from oslo
Addressed by: https:/
Add support for API message localization
Addressed by: https:/
Sync gettextutils from oslo
Addressed by: https:/
Add support for API message localization
Addressed by: https:/
Preserve Exception Message objects
It still seems like we might need something like this feature, but those reviews look like they met resistance and were abandoned. Is there a new approach we are hoping to try?
markwash more-info 2014-02-15
Work Items
Work items:
Integrate common gettext utilities for delayed translations from oslo-incubator: TODO
Implement support Accept-Language header support and API layer translations: TODO