Page MenuHomePhabricator

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

Description

Right now [[https://www.mediawiki.org/wiki/Extension:Wikibase_Client/Lua#mw.wikibase.entity:getLabel|mw.wikibase.entity:getLabel]] and [[https://www.mediawiki.org/wiki/Extension:Wikibase_Client/Lua#mw.wikibase.entity:getDescription|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 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)

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?

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

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

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

daniel moved this task from Review to Done on the Wikidata-Sprint-2016-10-12 board.