Page MenuHomePhabricator

action=parse&prop=langlinks should provide language names
Closed, ResolvedPublic

Description

Currently action=parse&prop=langlinks returns something like

{
"lang": "de",
"url": "https://de.wikipedia.org/wiki/Foo",
"*": "Foo"
}

which is not a real substitute for the deprecated languageshtml, as you need a second request or a static list to get a useful text/tooltip for the link. The API should add the name of the language (in that language and in the user's language) to the result, i.e.

{
"lang": "de",
"langname": "German",
"autonym": "Deutsch",
"url": "https://de.wikipedia.org/wiki/Foo",
"*": "Foo"
}


Version: 1.23.0
Severity: enhancement

Details

Reference
bz58627

Event Timeline

bzimport raised the priority of this task from to Low.
bzimport set Reference to bz58627.
Schnark created this task.Dec 18 2013, 8:21 AM

With action=query&meta=siteinfo&siprop=interwikimap you can fetch the native language names and with action=query&meta=siteinfo&siprop=interwikimap&siinlanguagecode=de the languge names in the requested language.

But having this as extra data on action=parse sounds better to avoid multiply requests.

Not requeted, but I added the both params to prop=langlinks with gerrit 112245, because there it can also be helpful.

Change 112332 had a related patch set uploaded by Umherirrender:
Provide language names on action=parse&prop=langlinks

https://gerrit.wikimedia.org/r/112332

Change 112332 merged by jenkins-bot:
Provide language names on action=parse&prop=langlinks

https://gerrit.wikimedia.org/r/112332

Change should be deployed to WMF wikis with 1.23wmf14, see https://www.mediawiki.org/wiki/MediaWiki_1.23/Roadmap for the schedule.