Page MenuHomePhabricator

mw.wikibase.entity:getLabel/:getDescription should obey allowDataAccessInUserLanguage
Closed, ResolvedPublic

Description

Right now mw.wikibase.entity:getLabel and mw.wikibase.entity:getDescription default to the wiki's content language, even if allowDataAccessInUserLanguage is set to true. They should probably use the user's language in that case.

Event Timeline

hoo created this task.Aug 17 2016, 10:21 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptAug 17 2016, 10:21 PM
hoo renamed this task from mw.wikibase.entity:getLabel should obey if allowDataAccessInUserLanguage is enabled to mw.wikibase.entity:getLabel should obey allowDataAccessInUserLanguage.Aug 17 2016, 11:15 PM
hoo renamed this task from mw.wikibase.entity:getLabel should obey allowDataAccessInUserLanguage to mw.wikibase.entity:getLabel/:getDescription should obey allowDataAccessInUserLanguage.Sep 29 2016, 9:55 PM
hoo updated the task description. (Show Details)
daniel added a subscriber: daniel.Sep 29 2016, 10:27 PM

Sounds reasonable. But we should make sure that we don't split the parser cache on Wikipedia pages. IIRC allowDataAccessInUserLanguage is only enabled on Commons. Is that right?

hoo added a comment.Sep 29 2016, 10:30 PM

Sounds reasonable. But we should make sure that we don't split the parser cache on Wikipedia pages. IIRC allowDataAccessInUserLanguage is only enabled on Commons. Is that right?

If we're one a multilingual wiki (commons, wikidata, meta and test variants), the cache is already split by then (as mw.wikibase.getEntity* splits it), so we can safely use the user's language.

If we're not on a multilingual wiki, the behavior wont change at all.

Change 313926 had a related patch set uploaded (by Hoo man):
Make mw.wikibase.entity:getLabel/:getDescription obey allowDataAccessInUserLanguage

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

hoo claimed this task.Oct 3 2016, 10:28 PM

Change 313926 merged by jenkins-bot:
Make mw.wikibase.entity:getLabel/:getDescription obey allowDataAccessInUserLanguage

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

daniel closed this task as Resolved.