Template:TemplateDataInfo/i18n: Difference between revisions
More actions
m best practices |
attempting to make the explanation a bit more clear |
||
| Line 5: | Line 5: | ||
|text=<translate><!--T:1--> | |text=<translate><!--T:1--> | ||
[[<tvar|page>:mw:Special:MyLanguage/Extension:TemplateData</>|TemplateData]] is a way to store information about template parameters (the description of those and of the whole template) for both, humans and machines.</translate> <translate><!--T:2--> | [[<tvar|page>:mw:Special:MyLanguage/Extension:TemplateData</>|TemplateData]] is a way to store information about template parameters (the description of those and of the whole template) for both, humans and machines.</translate> <translate><!--T:2--> | ||
It is used by [[<tvar|page2>:mw:Special:MyLanguage/:VisualEditor</>|VisualEditor]] and possibly other tools like [[<tvar|page3>Special:MyLanguage/Commons:Upload Wizard</>|Upload Wizard]].</translate> <translate><!--T:8--> | It is used by [[<tvar|page2>:mw:Special:MyLanguage/:VisualEditor</>|VisualEditor]] and possibly other tools like [[<tvar|page3>Special:MyLanguage/Commons:Upload Wizard</>|Upload Wizard]].</translate> | ||
At Wikimedia Commons, | ---- | ||
<u>Recommended use</u><br/> | |||
<translate><!--T:8--> | |||
At Wikimedia Commons, it is recommended to use <tvar|tag2>{{tl|TemplateBox}}</> with either <tvar|param1><code><nowiki>useTemplateData=1</nowiki></code></> or <tvar|param2><code><nowiki>useTemplateData=only</nowiki></code></> on the <tvar|relPage><code><nowiki>/doc</nowiki></code></> subpage and transcluding it with <tvar|template>{{tl|Documentation}}</> into the template. <tvar|tag3><code><nowiki><nowiki></nowiki></code></>-tags can be wrapped around the the arguments, if required, to avoid templates being expanded.</translate><br/> | |||
<u>Optional use</u><br/> | |||
<translate><!--T:3--> | |||
Another option, especially for imported templates, or for users with JSON experience, is placing raw <tvar|tag><nowiki><templatedata></nowiki></>-tags into the Wikitext or the template.</translate> | Another option, especially for imported templates, or for users with JSON experience, is placing raw <tvar|tag><nowiki><templatedata></nowiki></>-tags into the Wikitext or the template.</translate> | ||
<u>Discussion</u><br/> | |||
[[Commons:Requests for comment/How Commons should deal with TemplateData|There is an ongoing discussion about that matter. Feel invited to comment if you are experienced in either way, your time permits and if you like to share your opinion or to make a suggestion.]] | [[Commons:Requests for comment/How Commons should deal with TemplateData|There is an ongoing discussion about that matter. Feel invited to comment if you are experienced in either way, your time permits and if you like to share your opinion or to make a suggestion.]] | ||
|help=<translate><!--T:4--> | |help=<translate><!--T:4--> | ||
Revision as of 04:35, 14 September 2013
- TemplateData
TemplateData is a way to store information about template parameters (the description of those and of the whole template) for both, humans and machines. It is used by VisualEditor and possibly other tools like Upload Wizard.
Recommended use
At Wikimedia Commons, it is recommended to use {{TemplateBox}} with either useTemplateData=1 or useTemplateData=only on the /doc subpage and transcluding it with {{Documentation}} into the template. <nowiki>-tags can be wrapped around the the arguments, if required, to avoid templates being expanded.
Optional use
Another option, especially for imported templates, or for users with JSON experience, is placing raw <templatedata>-tags into the Wikitext or the template.
Wikipedia's help about TemplateData • Commons-specific information