Page MenuHomePhabricator

[Bug] Sites table language code for be_x_oldwiki should be be-tarask
Closed, DuplicatePublic

Description

Author: p.selitskas

Description:
For be-x-old.wikipedia.org (lang. code: be-tarask), when a site-link is added for the Wikidata item, 'lang' attribute for site-link page title is set to 'be-x-old' which is wrong (it should be 'be-tarask').

As I see, it's either Repo not aware of the true wiki language, or it's a configuration concern and the language was set according to the domain (see Bug 9823).

To conclude, I think for now it's mostly a minor layout issue, but who knows... It's better to have real internal data.

Details

Reference
bz41723

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 1:08 AM
bzimport set Reference to bz41723.
bzimport added a subscriber: Unknown Object (MLST).
bzimport created this task.Nov 3 2012, 3:05 AM

The "be-x-old" comes from the site id, and is not really a language code. I think people gets slightly confused because -wiki is stripped off and then it looks like a language code, which it is not, it is the initial part of the site id.

Note also that the site id can be for something completely else than Wikipedia, and as such the code will not reflect a language at all.

We could although change this somehow so it is clearer that this is part of the site id, and only by accident is similar to the language code.

Reopening - What the original reporter was talking about and what I want to report is the lang attribute of text (links). Now that you know site id is not essentially identical to its language code, you shouldn't put site id into lang="" directly and should fetch its language code instead.

This affects both Repo (on item pages) and Client (in sidebar).

jeblad added a comment.Feb 4 2013, 7:25 AM

Fetching the language code from the Language object for ~300 different languages will not work without changes to how the Language objects are handled.

p.selitskas wrote:

(In reply to comment #3)

Fetching the language code from the Language object for ~300 different
languages will not work without changes to how the Language objects are
handled.

Is sites table somehow used in Wikibase? It has a site_language field. Can we use it? (Although, now it has the wrong code for some wikis.)

Well if this can't be resolved easily and you don't dare to use globals, you may try to map your prefix part in site ID through $wgDummyLanguageCodes.

  • This bug has been marked as a duplicate of bug 57706 ***
  • Bug 57706 has been marked as a duplicate of this bug. ***

p.selitskas wrote:

(In reply to comment #3)

Fetching the language code from the Language object for ~300 different
languages will not work without changes to how the Language objects are
handled.

Adding bug 41103 as dependence here.

Lydia_Pintscher removed a subscriber: Unknown Object (MLST).
Lydia_Pintscher removed a subscriber: Unknown Object (MLST).
thiemowmde renamed this task from Wikidata should distinguish site IDs and language codes to [Bug] Sites table language code for be_x_oldwiki should be be-tarask.Aug 13 2015, 2:35 PM
thiemowmde lowered the priority of this task from High to Low.
thiemowmde updated the task description. (Show Details)
thiemowmde set Security to None.

I retargeted and renamed this ticket and removed it from the Wikidata board because there is nothing the Wikidata team can and should do about this. We are getting the language code from the Sites table object. We should not hide such an issue by adding our own "wrong language code to correct language code" mapping.