Page MenuHomePhabricator

'Add link' function in Wikipedia creates items with wrong language code
Open, MediumPublic

Description

If a new item is created with the 'Add links' function in Wikipedia, labels are set with language codes equal project prefix.
e.g. item is created with sitelink to simple.wikipedia.org -> label is set for language 'simple'.

See Also:
T39459: [Task] Don't try to add labels in non-existing languages: restrict to Language::isKnownLanguageTag

Details

Reference
bz64649

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 3:19 AM
bzimport set Reference to bz64649.
bzimport added a subscriber: Unknown Object (MLST).

WikidataClient should not *try* to add such a label, but WikidataRepo should reject them anyway (bug 37459); marking as dependent.

A site's real language (eg. simple isn't a language) should be added to the sites table and then be propagated to JS (via PHP). With that information, this bug could be fixed.

Lydia_Pintscher removed a subscriber: Unknown Object (MLST).
Lydia_Pintscher removed a subscriber: Unknown Object (MLST).

What about WikibaseRepo->getSettings()->getSetting( 'canonicalLanguageCodes' )?