Page MenuHomePhabricator

Need a way to turn wikidata item references into wiki links on the client.
Closed, ResolvedPublic

Description

Let's say Q5 has property P11 which refers to Q23; Q5 is linked to local page [[Foo]] and has label "Foo", and Q23 is linked to local page [[The Thing (movie)]] and has label "The Thing".

Then, when using {{#property:P11}} on the page [[Foo]], the result should be The Thing (movie), not just The Thing, so this can be used as a link.

Perhaps this should be optional: return labels, return titles, or return full links (using titles as the target and labels as the link text).

It might be sufficient to cover this with Lua, but as far as I'm aware, this isn't currently possible with Lua either.


Version: unspecified
Severity: normal
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=46788

Details

Reference
bz48742

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 1:26 AM
bzimport set Reference to bz48742.
bzimport added a subscriber: Unknown Object (MLST).

It's also necessary to handle the case where there is no sitelink for that language.

According to the documentation, you can use the Page function to access the sitelink. Described here: http://www.mediawiki.org/wiki/Extension:WikibaseClient/Lua

https://test2.wikipedia.org/wiki/Atlanta for example works, creating a link like [[Georgia (U.S. state)|Georgia]] with lua.