Page MenuHomePhabricator

Add localized name of Wikipedia in result set
Closed, ResolvedPublic

Description

Author: preilly

Description:
We need an authoritative localized version of the name of various Wikipedia returned in the result set.


Version: unspecified
Severity: enhancement

Details

Reference
bz35511

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 12:18 AM
bzimport added a project: SiteMatrix.
bzimport set Reference to bz35511.
bzimport added a subscriber: Unknown Object (MLST).

The $wgSitename for each site? Or something else?

And where do you want it outputting? The API? The special page?

preilly wrote:

e.g., we should have the string Википедия in the {"code":"ru","name":"\u0420\u0443\u0441\u0441\u043a\u0438\u0439","site":[{"url":"http:\/\/ru.wikipedia.org","dbname":"ruwiki","code":"wiki"}, entry of http://en.wikipedia.org/w/api.php?action=sitematrix&format=json

preilly wrote:

It appears that:
$wgConf->loadFullData();
echo $wgConf->get( 'wgSitename', 'ruwiki' );
returns: Википедия

So, this should be helpful.

(In reply to comment #2)

e.g., we should have the string Википедия in the
{"code":"ru","name":"\u0420\u0443\u0441\u0441\u043a\u0438\u0439","site":[{"url":"http:\/\/ru.wikipedia.org","dbname":"ruwiki","code":"wiki"},
entry of http://en.wikipedia.org/w/api.php?action=sitematrix&format=json

Created attachment 10333
Patch

attachment 35511.patch ignored as obsolete

Created attachment 10334
Slightly better patch

Attached:

I'll probably commit this after sleep