Hoi Remember that the stings need to be identifief for their language and by implication script. They can be a mix and match from multiple languages.. Thanks, GerardM Op 8 nov. 2013 09:13 schreef "Liangent" <liang...@gmail.com>:
> 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: }} ? > > [1] https://bugzilla.wikimedia.org/show_bug.cgi?id=56763 > [2] https://www.mediawiki.org/wiki/Wikibase_Client#Data_transclusion > [3] > https://meta.wikimedia.org/wiki/Wikidata/Notes/Inclusion_syntax#Accessing_Item_Data > [4] https://bugzilla.wikimedia.org/show_bug.cgi?id=48937 > [5] https://bugzilla.wikimedia.org/show_bug.cgi?id=49387 > > -Liangent > > _______________________________________________ > Wikidata-l mailing list > Wikidata-l@lists.wikimedia.org > https://lists.wikimedia.org/mailman/listinfo/wikidata-l > >
_______________________________________________ Wikidata-l mailing list Wikidata-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata-l