Page MenuHomePhabricator

Allow alternative (interwiki) site ids in mw.wikibase.{label,sitelink} Lua API
Closed, InvalidPublic

Description

[[Module:Infobox gene]] in enwiki generates an infobox by pulling data directly from Wikidata. However, editors porting this module to zhwiki can't find a proper way of falling back to enwiki articles for missing links (and yes, the labels are often missing as well). A dirty way that I have personally come up with is to fetch the whole entity and then use entity methods, but apparently this is expensive per the docs.

An additional optional argument to these two language-dependent methods which defaults to the current language/site (thus maintaining current behavior) will be useful for such cases.

Event Timeline

Restricted Application added subscribers: Stang, Aklapper. · View Herald Transcript
Arthur2e5 renamed this task from Allow alternative site ids (interwiki) in mw.wikibase.{label,sitelink} Lua API to Allow alternative (interwiki) site ids in mw.wikibase.{label,sitelink} Lua API.Oct 14 2016, 4:04 AM
hoo subscribed.

Getting arbitrary sitelinks is handled in T142903: Get sitelink from Item without loading the full Item (via Lua)., getting arbitrary labels in T173262: Get arbitrary label from Item without loading the full Item (via Lua).. This should supersede this task.

Restricted Application edited subscribers, added: PokestarFan; removed: Liuxinyu970226. · View Herald TranscriptAug 13 2017, 3:43 PM
hoo changed the task status from Declined to Invalid.Aug 13 2017, 3:43 PM