Opened 8 years ago
Closed 8 years ago
#38528 closed enhancement (fixed)
Add 'locale' as an attribute on the User Resource
Reported by: | danielbachhuber | Owned by: | joehoyle |
---|---|---|---|
Milestone: | 4.7 | Priority: | normal |
Severity: | normal | Version: | |
Component: | REST API | Keywords: | has-unit-tests needs-patch |
Focuses: | Cc: |
Description
Now that users can pick their own locales, this data should be exposed through the REST API.
Attachments (3)
Change History (11)
#4
@
8 years ago
- Keywords has-unit-tests added; needs-unit-tests removed
New patch with support for updating the user's local. Also, I changed to use an ENUM of available languages, so this means there's no need for sanitization as only values in get_available_languages()
are then allowed.
Added a couple more tests too.
#6
@
8 years ago
- Keywords needs-patch added; has-patch removed
- Resolution fixed deleted
- Status changed from closed to reopened
get_available_languages()
doesn't return en_US
, see 38528.3.diff for a failing test. I'm currently not sure if an empty string (to force using get_locale()
in get_user_locale()
) should be supported as well.
cc: @swissspidy
This ticket was mentioned in Slack in #core-restapi by joehoyle. View the logs.
8 years ago
Note: See
TracTickets for help on using
tickets.
First pass in 38528.patch.