hoo added a comment.

Maybe modify existing mw.wikibase.entity:getLabel(lang) (or write new mw.wikibase.entity:getLabel&Sitelink) so in addition to returning a label in the most relevant language, it would also returned a link to most relevant wikipedia. At the moment that is THE main use of Wikidata on Commons (we hope to write code or other uses) and it should be optimized. Calls to get label+sitelink in the user language are used in many templates which are then transcluded into great many files. A single file could have up to dozen such links.

That sounds tough, as we don't really have data to decided which Wikipedia fits best when. Building a lookup for a specific site (Wikipedia) or site group is doable.

I guess we could also provide a lookup mw.wikibase.getSiteLinkForLanguage( 'wikipedia', 'optionalLanguageOrUserLang' ).


TASK DETAIL
https://phabricator.wikimedia.org/T142903

EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: hoo
Cc: hoo, Jarekt, Zolo, Aklapper, D3r1ck01, Izno, Wikidata-bugs, aude, Mbch331
_______________________________________________
Wikidata-bugs mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs

Reply via email to