Background information
/page/summary doesn't return displaytitle in the correct language variant
How
It looks like action=parse&prop=displaytitle returns the correct displaytitle.
For example, with Accept-Language: en, zh-Hans; q=0.9, zh-Hant; q=0.8 header set for all requests listed
https://zh.wikipedia.org/api/rest_v1/page/summary/中國
incorrectly returns 中國
https://zh.wikipedia.org/w/api.php?format=json&titles=中國&action=query&ppprop=displaytitle&prop=pageprops
incorrectly returns 中國
https://zh.wikipedia.org/w/api.php?format=json&page=中國&action=parse&prop=displaytitle
correctly returns 中国
Open questions
Could we add a request to action=parse&prop=displaytitle to get the displaytitle with the correct formatting and in the correct language variant based on the Accept-Language header?
Acceptance criteria
- For wikis that have language variants, the correct displaytitle is returned from /page/summary based on the Accept-Language header. For example, https://zh.wikipedia.org/api/rest_v1/page/summary/中國 with Accept-Language: zh-Hans would return 中国