Talk:Wikidata/Notes/Inclusion syntax v0.3

From Meta, a Wikimedia project coordination wiki

I love it[edit]

That's it. I love it. (In case you wonder, here is some context.) --TMg 23:32, 10 January 2013 (UTC)[reply]

Yay! :) --Lydia Pintscher (WMDE) (talk) 19:37, 11 January 2013 (UTC)[reply]

It seems good[edit]

Simpler than previous propositions. But a more complex exeample or a more detailed explanation about options in calling qualifiers can help to have a better overview of the new proposition. Snipre (talk) 11:56, 26 January 2013 (UTC)[reply]

Iterative parser calls[edit]

Is it planned that iterative parser calls are possible? E.g., given the following statement:

Berlin


is incountryGermany[1 source]

Germany


is incontinentEurope[1 source]
Chancellorhead of governmentAngela Merkel[2 sources]
since 2005
Party CDU

In Article Berlin: {{#property:is in|of={{#property:is in}}}} will display Europe or {{#property:Chancellor|of={{#property:is in}}}} Angela Merkel, respectively? FelixReimann (talk) 14:43, 8 February 2013 (UTC)[reply]

One thing that would be very nice is to do some simple navigation, like css-selectors or Xpath or something. The final set should identify a set of properties that are of the same type and the processing should then proceed as usual. 93.220.72.39 15:25, 8 February 2013 (UTC)[reply]
There are no "is in" and "Chancellor" properties currently defined, so I suppose the code would be
{{#property:Continent|of={{#property:country}}}}
to show Europe, and
{{#property:head of government|of={{#property:country}}}}
to show Angela Merkel.Mange01 (talk) 23:26, 13 February 2013 (UTC)[reply]
Yes. not in wikidata currently. However, I tried to resemble the examples of this inclusion syntax page. See Wikidata/Notes/Inclusion_syntax_v0.3#Example_1. There is a property Chancellor defined. But nonetheless, the question remains: Are iterative parser calls like {{#property=foo|of={{#property=bar}}}} supported? FelixReimann (talk) 09:38, 18 February 2013 (UTC)[reply]
Simple ones like this yes. For more complicated things there will be Lua. --Lydia Pintscher (WMDE) (talk) 10:31, 18 February 2013 (UTC)[reply]

Correct examples?[edit]

Please check the examples of inclusion syntax that I added to d:wikidata:Infoboxes task force/organizations. Have I understood it correctly?

If we always want geoboxes to show the coordinates from Wikidata, should the inclusion code be placed in the template namespace, in en:template:geobox, or in each infobox using that generic template, e.g. en:template:infobox country, or in each article, inside the template calling code. Mange01 Mange01 (talk) 22:14, 14 February 2013 (UTC)[reply]

I just checked and it looks good at first sight. As for geoboxes: as far as I can tell all of that would be fine. It probably makes most sense to make it as generic as possible so to move it to the most high-level one. It really depends on how these templates are set up exactly though. --Lydia Pintscher (WMDE) (talk) 10:20, 15 February 2013 (UTC)[reply]

Alternate languages[edit]

Can we have some syntax to allow use to use a property, but from another language? I found that some of the info boxes will include names in both English and the native language.

As an example, take a look at Banqiao District in New Taipei City: [1]

It lists the city as "New Taipei City (新北市)".

I put in the property 131 for the city name ("is in the administrative unit"), but to add the Chinese, I had to directly insert that directly. Perhaps can we have another template argument "language" like:

{{#property:p131|language=zh}}

So that it would display the given property using the specified language? S-1-5-7 (talk) 08:17, 27 April 2013 (UTC)[reply]

Requested at bugzilla:55998. Helder 16:31, 22 October 2013 (UTC)

#property[edit]

#property seems to have stopped working today. --Redaktor (talk) 16:19, 13 June 2013 (UTC)[reply]

That would be very bad... Where do you notice it? Can you give me a link please so I can investigate? --Lydia Pintscher (WMDE) (talk) 17:02, 13 June 2013 (UTC)[reply]
It was on at least two Wikipedias, and here on Meta. Now working again. If it happens again I shall post a link. --Redaktor (talk) 08:29, 14 June 2013 (UTC)[reply]

geographical coords[edit]

I'm new to this, so maybe I need to read around some more. But, problem is with coordinate location. As I see it, it will supply complete dms coords, but that is not what eg infobox settlement wants - that wants each value separately, eight in all. Is there an easy way to do this, or do I need to find (request) a template that will break the full coord into parts? Or have I grasped the stick by the wrong end, and am now beating about the bush with it? 112.198.82.1 05:09, 11 October 2014 (UTC)[reply]