On 22.05.2012 17:49, Helder Wiki wrote:
The section
https://meta.wikimedia.org/w/index.php?title=Wikidata/Notes/Inclusion_synta…
says "{{{data}}}...would evaluate to the label and description of the
item... in the **page's content** language". But it should be noted
that on some it will be necessary to allow a different language to be
used (e.g. on ptwiki some data is written in Portuguese from Brazil
and other is in Portuguese from Portugal, Angola, and so on). So it
would be necessary to provide a way to specify the appropriate
language.
Yes, of course. {{{data}}} is just a shorthand. If you want e.g. just the
description in Dutch, falling back to German, you could use #data-value to get it:
{{#data-value:data.description|language=nl,de|form=plain}}
Another thing: will we be able to translate the name
"data" (e.g. to
"dados") which appear on "{{#data-value:"
"{{{data.color}}}",
"data_item", "data_param" etc..?
There are three different things to translate here.
1) the name of the parameter used to pass the item to the template ("data" in
the example). You are free so choose it using the data_param option. The default
could indeed be localized, though changing that (be editing the respective
system message) is likely to break a lot of things in a very hard to understand way.
2) the name of the (well-known) parameters (options) for the proposed parser
functions, like data_item and data_param for the #data-template function. Since
#data-template is a parser function, it will use MediaWikis standard mechanisms
for localizing parser functions. I'm pretty sure the name of the function can be
localized, and perhaps also the names of the parameters, I don't know. In any
case, this is a general mediawiki issue, not specific to wikidata.
3) the names of item properties, e.g. "color" in the "data.color"
example. These
are properties defined and described on pages on the wikidata repository, and
they have localized names for display. If these localized names can also be used
to access the respective property, or if a stable, unique, unlocalized
identifier must be used, is still up for discussion. The problem with localized
identifiers is - if they change, they break a *lot* of things.
Would it be possible to create a link having
"action=edit" as text? E.g.:
{{#data-link:data|action=edit|action=edit}}
or
{{#data-link:data|action=edit|action{{=}}edit}}
This is the general problem of passing a positional parameters that contain a
"=" to templates and parser functions. There are two common solutions:
{{#data-link:data|action=edit|2=action=edit}}
and
{{#data-link:data|action=edit|action=edit}}
Regards,
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.