Hello,

I submitted bug 56763[1] just now, then realized that this is a part of a larger issue: what is {{#property: }} expected to output.

Theoretically, there could be two extreme answers: raw data as a string, or whatever wikitext which could be rendered as what *readers* love best.

I guess the second answer is the goal, because of ValueFormatter, SnakFormatter::FORMAT_WIKI and $wgContLang->listToText() on final output in our code, but sadly this is never explicitly defined anywhere, including MW.org documentations[2] and development notes[3].

With this goal, I imagine the output for each datatype should be:

* Item: WikiLink to the linked article, or maybe the WikibaseRepo item page when there's not such an article, with label as link text
* Commons media: ImageLink to the specified media file (size and other params TBD)
* String: Wikitext-escaped form of the string data
* Time / Globe coordinate: See bug 48937[4] and bug 49387[5]
* URL: ExternalLink to the specified URL, see bug 56763[1]

However due to lack of the specification and the current behaviors of {{#property: }} which is a mix of raw data and fully-constructed wikitext, template writers have already invented various usages:

* [[{{#property:item-property}}]]
* [[File:{{#property:commons-media-property}}|thumb]]
* [{{#property:url-property}} {{url-protocol-stripper|{{#property:url-property}}}}]
* {{#ifeq:{{#property:commons-media-property}}|A.png|B|C}}

and obviously work towards the goal described above breaks them (of course what they want is still doable with Lua), and less obviously, they're already broken sometimes when multiple statements exist, which are imploded using $wgContLang->listToText().

Is there any plan here, and what's the real goal of {{#property: }} ?