Opened 10 years ago
Closed 10 years ago
#38528 closed enhancement (fixed)
Add 'locale' as an attribute on the User Resource
| Reported by: | danielbachhuber | Owned by: | joehoyle |
|---|---|---|---|
| Priority: | normal | Milestone: | 4.7 |
| Component: | REST API | Version: | |
| Severity: | normal | Keywords: | has-unit-tests needs-patch |
| Cc: | Focuses: |
Description
Now that users can pick their own locales, this data should be exposed through the REST API.
Attachments (3)
Change History (11)
#4
@
10 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
@
10 years ago
- Keywords needs-patch added; has-patch removed
- Resolution fixed
- Status closed → 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
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
First pass in 38528.patch.