Page MenuHomePhabricator

getLanguageCode() differ from wgContentLanguage of the target wiki
Closed, ResolvedPublic

Description

simplewiki has wgContentLanguage "en" and
nowiki has wgContentLanguage "nb".

See wgLanguageCode in https://noc.wikimedia.org/conf/InitialiseSettings.php.txt

But
wb.sites.getSite( 'nowiki' ).getLanguageCode() evaluates to "no" and
wb.sites.getSite( 'simplewiki' ).getLanguageCode() evaluates to "simple".

JavaScript gets the values from the PHP function getLanguageCode() in module wikibase.sites:
https://git.wikimedia.org/blob/mediawiki%2Fextensions%2FWikibase.git/HEAD/lib%2Fincludes%2Fmodules%2FSitesModule.php

getLanguageCode() should evaluate to wgContentLanguage of the target wiki.


Version: wmf-deployment
Severity: normal

Details

Reference
bz57706

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 2:27 AM
bzimport added a project: Wikidata.org.
bzimport set Reference to bz57706.
bzimport added a subscriber: Unknown Object (MLST).
  • Bug 41723 has been marked as a duplicate of this bug. ***
  • This bug has been marked as a duplicate of bug 41723 ***
Fomafix set Security to None.

Note that if that will be the case then there would be no way to distinguish language of simplewiki from language of enwiki even though these have different sitelinks, but languages would both be "en". This may lead for some trouble for tools processing the content as they would not be able to distinguish if they're dealing with English or Simple English content. This may be undesirable.

The primary identifier to distinguish the content is ´simplewiki´ and ´enwiki´.