Re: [Wikidata-l] mockups for linking Wikipedia articles up for feedback

2012-05-22 Thread Lydia Pintscher
On Tue, May 8, 2012 at 11:46 AM, Lydia Pintscher
lydia.pintsc...@wikimedia.de wrote:
 Heya folks :)

 We've worked on mockups for how we think linking of articles between
 different Wikipedias should work with Wikidata. You can find the
 mock-ups and explanations here:
 https://meta.wikimedia.org/wiki/Wikidata/Notes/Storyboard_for_linking_Wikipedia_articles
 It'd be great if you could have a look and give feedback either here
 or on the discussion page on meta.

Just for your information: We will have to rework these mock-ups now
that the universal language selector is coming:
http://blog.wikimedia.org/2012/05/21/introducing-designs-for-the-universal-language-selector/
  I'll let you know when we have new mock-ups to show and discuss.


Cheers
Lydia

-- 
Lydia Pintscher - http://about.me/lydia.pintscher
Community Communications for Wikidata

Wikimedia Deutschland e.V.
Obentrautstr. 72
10963 Berlin
www.wikimedia.de

Wikimedia Deutschland - Gesellschaft zur Förderung Freien Wissens e. V.

Eingetragen im Vereinsregister des Amtsgerichts Berlin-Charlottenburg
unter der Nummer 23855 Nz. Als gemeinnützig anerkannt durch das
Finanzamt für Körperschaften I Berlin, Steuernummer 27/681/51985.

___
Wikidata-l mailing list
Wikidata-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-l


[Wikidata-l] Request for comments: syntax for including data on client wikis (aka how to make infoboxes)

2012-05-22 Thread Daniel Kinzler
Hello all

I have created a first preliminary draft of how data items from the Wikidata
repository may be accessed and rendered on the client wiki, e.g. to make 
infoboxes.

https://meta.wikimedia.org/wiki/Wikidata/Notes/Inclusion_syntax

It would be great if you could have a look and let us know about any
unclarities, omissions, or other flaws - and of course about your ideas of how
to do this.

Getting this right is an important part of implementing phase 2 of the Wikidata
project, and so I feel it's important to start drafting and discussing early.
Having a powerful but not overly complex way to create infoboxes etc from
Wikidata items is very important for the acceptance of Wikidata on the clinet
wikis, I believe.

Thanks,
Daniel


-- 
Daniel Kinzler, Softwarearchitekt

Wikimedia Deutschland e.V. | Eisenacher Straße 2 | 10777 Berlin
http://wikimedia.de  | Tel. (030) 219 158 260

Wikimedia Deutschland - Gesellschaft zur Förderung Freien Wissens e.V.
Eingetragen im Vereinsregister des Amtsgerichts Berlin-Charlottenburg
unter der Nummer 23855 B. Als gemeinnützig anerkannt durch das Finanzamt
für Körperschaften I Berlin, Steuernummer 27/681/51985.

___
Wikidata-l mailing list
Wikidata-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-l


Re: [Wikidata-l] Request for comments: syntax for including data on client wikis (aka how to make infoboxes)

2012-05-22 Thread Jérémie Roquet
Hi Daniel, everyone,

2012/5/22 Daniel Kinzler daniel.kinz...@wikimedia.de:
 I have created a first preliminary draft of how data items from the Wikidata
 repository may be accessed and rendered on the client wiki, e.g. to make 
 infoboxes.

 https://meta.wikimedia.org/wiki/Wikidata/Notes/Inclusion_syntax

Great!

 It would be great if you could have a look and let us know about any
 unclarities, omissions, or other flaws - and of course about your ideas of how
 to do this.

 Getting this right is an important part of implementing phase 2 of the 
 Wikidata
 project, and so I feel it's important to start drafting and discussing early.
 Having a powerful but not overly complex way to create infoboxes etc from
 Wikidata items is very important for the acceptance of Wikidata on the clinet
 wikis, I believe.

I've some questions about the design proposed in this draft. I'm not
sure these are actual issues, but I prefer to be sure ;-)

i. It seems to me that the proposed design implies that any access to
data is done through a template transclusion, which could be fine for
the given example (ie. infoboxes — though I'll raise another issue
below, see ii.) but AFAIU forbids direct use of data in an article. Is
this a desirable limitation? Or did I miss something?

ii. I understand that only one item can be included at once (either by
using the data_item attribute or the article links). What if for some
reason we want a template that accesses several items? Is it
reasonable to assume that there will always be an item that links to
every needed item for a given template?

iii. Articles on current wikis use templates named (eg.) “{{Infobox…”.
Shouldn't it be a prerequisite for templates using Wikidata to (be
able to) keep the same name, so that:
 - we don't have to run bots on every single article only to prepend
“#data-template:” but just have to update the template? Arguably, we
would have to edit the articles anyway to remove attributes that are
handled by Wikidata; just to be sure.
 - people don't massively reject the transition to Wikidata because of
the /visible/ syntax change.

iv. Per i., ii. and iii., wouldn't it be desirable to have some syntax
to access an item without relying on template transclusion? This would
enable us to:
 - use data in an article without having to write a template first (solves i.);
 - write templates that can get as many items as they need, either
from the transcluding page or /by themselves/ (solves ii.);
 - update the existing templates to Wikidata without having to edit
the articles and without visible changes from the template user's
perspective — except for what is handled by Wikidata, of course
(solves iii.).

v. What about lua? :)

Best regards,

-- 
Jérémie

___
Wikidata-l mailing list
Wikidata-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-l


Re: [Wikidata-l] Request for comments: syntax for including data on client wikis (aka how to make infoboxes)

2012-05-22 Thread Nikola Smolenski

On 22/05/12 13:47, Daniel Kinzler wrote:

I have created a first preliminary draft of how data items from the Wikidata
repository may be accessed and rendered on the client wiki, e.g. to make 
infoboxes.

https://meta.wikimedia.org/wiki/Wikidata/Notes/Inclusion_syntax

It would be great if you could have a look and let us know about any
unclarities, omissions, or other flaws - and of course about your ideas of how
to do this.


As could perhaps be guessed, I have a lot of comments :)

Including Items in an Article:

{{#data-template:Infobox
|data_item=q332211
|data_param=stuff
|foo=some value
|stuff.color=green
}}

I see no reason for creating a new parser function for inclusion of 
templates. Also, this syntax would not allow a template to draw data 
from more than one item, which would probably be a requirement in phase3.


Rather, I would include a template normally and use a parser function 
within the template to access the data.


So, instead of {{{data}}} there would be {{#data:}}, instead of 
{{{data.color}}} there would be {{#data:color}}, instead of 
{{{data.color(ACME_SURVEY_2010)}}} there would be 
{{#data:color|ref=ACME_SURVEY_2010}} and so on.


One advantage is that commonly used syntax is always used, instead of 
inventing new syntax (as for the reference in this example).


Another advantage, this way would make data usable directly in article 
text, if that is wanted.


The parser function should be able to override itself by template 
parameters - I believe it is possible to do this.


Unrelated to the above,

This will return the value of the color property, in the page's content 
language, as plain text.


I see that there is need to also select desired content language (for 
example, a lot of infoboxes display name of the topic in the content 
language and in the topic's language(s)). This has the potential to 
introduce additional problems, of course.


Formatting Functions:

{{#data-value:data.color}}

form
Specifies in what form rendered, that is, in which HTML element the 
value should be wrapped.


span: wrap in span tags, use span tags for parts
div: wrap in div tags, use span tags for parts
li: wrap in li tags, use span tags for parts

I don't like this at all, since it limits the number of possibilities, 
introduces yet another syntax parallel to HTML.


Yet, I don't see anything much better. A half-baked idea is to leave it 
to the client wikis to create their data display templates that could be 
used to format data appropriately.


(I see Jérémie's email now, and see that we came independently to some 
of the same conclusions :) )


{{#data-values}}:

But this is of course an even worse problem.

{{#data-link:data|the data item}}

Why not the usual interwiki syntax of [[wikidata:data|the data item]]?



smime.p7s
Description: S/MIME Cryptographic Signature
___
Wikidata-l mailing list
Wikidata-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-l


Re: [Wikidata-l] [wikidata-intern] Re: Request for comments: syntax for including data on client wikis (aka how to make infoboxes)

2012-05-22 Thread Neil Harris

On 22/05/12 15:49, Daniel Kinzler wrote:

On 22.05.2012 16:37, Nikola Smolenski wrote:

Of course not, however, for example, I believe a major use of Wikidata would be
for citation templates, so
ref{{cite|id=q1234}}/refref{{cite|id=q2345}}/ref  is better than
ref{{#data-template:cite|id=q1234}}/refref{{#data-template:cite|id=q2345}}/ref.

The bibliography use case is on our minds, but not in our road map. It's beyond
phase 3. So i'm reluctant to spend too much thought on it right now.

However, you can always just wrap another template around
{{#data-template:cite|id={{{id}, respectively just make {{cite}} call
{{#data-template:cite-format|id={{{id}

-- daniel




Which is absolutely the right way to do it. In general, I think that 
access to the semantic layer should always be done in this way: the 
extra layer of indirection is a form of implementation hiding, allowing 
the semantic parts of the system to be maintained and redefined without 
having to change the user interface and thus have to ripple edits 
through into thousands of articles.


-- Neil



___
Wikidata-l mailing list
Wikidata-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-l


Re: [Wikidata-l] [wikidata-intern] Re: Request for comments: syntax for including data on client wikis (aka how to make infoboxes)

2012-05-22 Thread Daniel Kinzler
Hi Dennis

On 22.05.2012 16:58, Dennis Tobar wrote:
 Hi everyone:
 
 I have an issue related with permissions and template syntaxes
 
 I read in the draft on Meta about data_item
[...]
 Is this data input available for everyone users?, pe: if any user adds
 or changes this parameter, are there any problem with the link to data
 parameters?.

It's just a template parameter. Anyone can change it. Changing it can do
whatever to the page, depending on the template and the parameters.

 Sorry if I misunderstand this parameter, but I'm thinking on sysop's
 work... only revert vandalism and the consequences of change some
 linked data :(

Vandalizing the data_item parameter would be the equivalent of vandalizing the
language links or infobox parameters. Easy to detect and revert.

Relying information about changes performed directly in the wikidata repository,
so that vandalism there can be detected, is a much more tricky problem... but a
different topic.

-- daniel

-- 
Daniel Kinzler, Softwarearchitekt

Wikimedia Deutschland e.V. | Eisenacher Straße 2 | 10777 Berlin
http://wikimedia.de  | Tel. (030) 219 158 260

Wikimedia Deutschland - Gesellschaft zur Förderung Freien Wissens e.V.
Eingetragen im Vereinsregister des Amtsgerichts Berlin-Charlottenburg
unter der Nummer 23855 B. Als gemeinnützig anerkannt durch das Finanzamt
für Körperschaften I Berlin, Steuernummer 27/681/51985.

___
Wikidata-l mailing list
Wikidata-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-l


Re: [Wikidata-l] Request for comments: syntax for including data on client wikis (aka how to make infoboxes)

2012-05-22 Thread Gabriel Wicke
On 05/22/2012 03:16 PM, Nikola Smolenski wrote:
 I see no reason for creating a new parser function for inclusion of
 templates. Also, this syntax would not allow a template to draw data
 from more than one item, which would probably be a requirement in phase3.
 
 Rather, I would include a template normally and use a parser function
 within the template to access the data.
 
 So, instead of {{{data}}} there would be {{#data:}}, instead of
 {{{data.color}}} there would be {{#data:color}}, instead of
 {{{data.color(ACME_SURVEY_2010)}}} there would be
 {{#data:color|ref=ACME_SURVEY_2010}} and so on.

This could even be simplified further to

{{#data:{{{data_item}}}|color}}

The syntax is admittedly longer, but would work as-is with alternate
parsers such as Parsoid or a generic parser function API in Lua. It
would also preserve referential transparency as far as possible, which
is good for finer-grained caching.

 The parser function should be able to override itself by template
 parameters - I believe it is possible to do this.

I'd strongly recommend against any magic like this, as it makes
templates even harder to understand and also harder to cache.

Gabriel


___
Wikidata-l mailing list
Wikidata-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-l


Re: [Wikidata-l] Request for comments: syntax for including data on client wikis (aka how to make infoboxes)

2012-05-22 Thread Daniel Kinzler
On 22.05.2012 21:27, Gabriel Wicke wrote:
 So, instead of {{{data}}} there would be {{#data:}}, instead of
 {{{data.color}}} there would be {{#data:color}}, instead of
 {{{data.color(ACME_SURVEY_2010)}}} there would be
 {{#data:color|ref=ACME_SURVEY_2010}} and so on.
 
 This could even be simplified further to
 
 {{#data:{{{data_item}}}|color}}
 
 The syntax is admittedly longer, but would work as-is with alternate
 parsers such as Parsoid or a generic parser function API in Lua. It
 would also preserve referential transparency as far as possible, which
 is good for finer-grained caching.

That's pretty much what I was doing with {{#data-value:data.color}}. Turning
that into {{#data-value:{{{data}}}|color}} would actually be fine, though a bit
ugly. Perhaps it would even be nice to turn it around:
{{#property:color|{{{data}.

However, I'd still like to support the plain template parameter syntax with
pseudo-parameters, e.g. {{{data.color}}} for retrieving the flat wikitext value
of the property.

Do you think that's ok? Or does it introduce complications with respect to Lua, 
etc?

-- daniel

-- 
Daniel Kinzler, Softwarearchitekt

Wikimedia Deutschland e.V. | Eisenacher Straße 2 | 10777 Berlin
http://wikimedia.de  | Tel. (030) 219 158 260

Wikimedia Deutschland - Gesellschaft zur Förderung Freien Wissens e.V.
Eingetragen im Vereinsregister des Amtsgerichts Berlin-Charlottenburg
unter der Nummer 23855 B. Als gemeinnützig anerkannt durch das Finanzamt
für Körperschaften I Berlin, Steuernummer 27/681/51985.

___
Wikidata-l mailing list
Wikidata-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-l


Re: [Wikidata-l] [wikidata-intern] Request for comments: syntax for including data on client wikis (aka how to make infoboxes)

2012-05-22 Thread Gabriel Wicke
On 05/22/2012 03:49 PM, Daniel Kinzler wrote:
 On 22.05.2012 15:15, Nikola Smolenski wrote:
 2) alternatively, don't pass item from the article to the template at all.
 Instead, use parser functions for every access to an item property, and 
 specify
 the item id as a parameter if necessary. That would create a lot of 
 rundundancy
 and wouldn't allow normal template parameter syntax to be used to access 
 data
 properties.

You could still pass the data item to the template:

{{Infobox|di=q556677}}

and inside Template:Infobox:

{{#data:{{{di}}}|color}}

This is admittedly slightly more verbose.

On the other hand, It would also work in articles, and supports multiple
items in a single template. More importantly (to me), it is familiar to
current editors, compatible with alternate parsers (e.g. Parsoid) or a
generic Lua - parser function API and makes it easier to implement
generic fragment caching.

Overall I'd prefer any magic-free and forward-compatible solution even
if it comes at the cost of small syntactic inconveniences.

Gabriel


___
Wikidata-l mailing list
Wikidata-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-l


Re: [Wikidata-l] Request for comments: syntax for including data on client wikis (aka how to make infoboxes)

2012-05-22 Thread Gabriel Wicke
On 05/22/2012 09:39 PM, Daniel Kinzler wrote:
 the {{#data-value}} function lets you output all of these parts all at
 once (or separately, if you like), and lets you control aspects like the 
 format
 of the output using parameters. If you choose to output multiple parts at 
 once,
 {{#data-value}} can use its knowledge about the desired HTML form to do this
 nicely. E.g.
 
  
 span{{#data-value:data.population|show=label,value,timestamp,source,indicators,edit|form=tr}}/span
 
 would be rendered as
 
   tr
 tdPopulation/td
 td523,411/td
 td2010/td
 tda href=#src23[1]/a,a href=#src23[2]/a/td
 tda title=disputed href=...img src=...//a/td
 td[a title=edit href=...edit/a]/td
   /tr
 
 Its hard to imagine how to achieve this nicely without using parser
 functions. -- Duesentrieb (talk) 19:37, 22 May 2012 (UTC)

An alternative might be to return JSON from the parser function and let
a Lua module, some other parser function or even a new templating
construct handle the formatting.

Gabriel


___
Wikidata-l mailing list
Wikidata-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-l


Re: [Wikidata-l] Request for comments: syntax for including data on client wikis (aka how to make infoboxes)

2012-05-22 Thread Gregor Hagedorn
I added some comments on the wiki

___
Wikidata-l mailing list
Wikidata-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-l