RexxS added a comment.

  I've added the maxvals functionality to `getValueByLang `and the infobox in 
https://en.wikipedia.org/wiki/GNU_Bison now only shows one value.
  
  It should also be possible to mark one value as preferred in Wikidata (as has 
been done) and use the `|rank=best` parameter to select that one. There's a 
demo at https://en.wikipedia.org/wiki/User:RexxS/sandbox#getValueByLang.
  
  I should caution that the `WikidataIB |url2` function expects only one value. 
It is a simpler version of the `URL |url2` function that is in 
https://en.wikipedia.org/wiki/Module:URL (which has a wrapper template 
https://en.wikipedia.org/wiki/Template:URL2) and handles difficult urls better. 
I would recommend replacing {{#invoke:WikidataIB |url2 ... with {{URL2 | ... if 
there is any likelihood of malformed urls being supplied. The downside is that 
the infobox then has another two dependencies if you want to export it to 
another wiki.

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

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

To: RexxS
Cc: Lydia_Pintscher, RexxS, Mike_Peel, matej_suchanek, Aklapper, akim, 
Akuckartz, Nandana, Lahi, Gq86, GoranSMilovanovic, QZanden, LawExplorer, 
_jensen, rosalieper, Scott_WUaS, Wikidata-bugs, aude, Mbch331
_______________________________________________
Wikidata-bugs mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs

Reply via email to