Page MenuHomePhabricator

Return extract and extract_html in the correct language variant from /page/summary
Closed, ResolvedPublic

Description

Background information

/page/summary doesn't return extract and extract_html in the correct language variant

How

https://sr.wikipedia.org/w/api.php?action=query&format=json&titles=Србија&prop=extracts&exlimit=1 with a properly formed Accept-Language header returns the extract in the correct variant

Acceptance criteria

  • For wikis that have language variants, the correct extract and extract_html are returned from /page/summary based on the Accept-Language header

Notes

https://sr.wikipedia.org/api/rest_v1/page/summary/Србија with Accept-Language: sr-el does return the correct extract, however, the standard sr-Latn code doesn't work and the full Accept-Language header spec isn't supported similar to how it is with https://sr.wikipedia.org/w/api.php?action=query&format=json&titles=Србија&prop=extracts&exlimit=1

Event Timeline

JoeWalsh created this task.Jul 11 2019, 8:33 PM
Restricted Application added subscribers: Cosine02, Aklapper. · View Herald TranscriptJul 11 2019, 8:33 PM
JoeWalsh updated the task description. (Show Details)Jul 12 2019, 4:36 PM
JoeWalsh updated the task description. (Show Details)Jul 12 2019, 4:44 PM
LGoto triaged this task as Normal priority.Jul 17 2019, 3:37 PM
LGoto moved this task from Needs triage to Upcoming on the Product-Infrastructure-Team-Backlog board.
JoeWalsh closed this task as Resolved.Jul 31 2019, 5:58 PM
JoeWalsh claimed this task.

This works already