Template:TemplateDataInfo/i18n/sandbox: Difference between revisions
More actions
No edit summary |
t-unit marker numbers are not assigned manually |
||
| Line 1: | Line 1: | ||
{{TemplateDataInfo/layout | {{TemplateDataInfo/layout | ||
|title=<translate | |title=<translate>TemplateData</translate> | ||
|text=<translate | |text=<translate>[[<tvar name=page>:mw:Special:MyLanguage/Extension:TemplateData</tvar>|TemplateData]] is a way of storing information about a template, such as parameter names, or a description of the template.</translate> <translate>It is used by [[<tvar name=page2>:mw:Special:MyLanguage/:VisualEditor</tvar>|VisualEditor]] and possibly other tools like [[<tvar name=page3>Special:MyLanguage/Commons:Upload Wizard</tvar>|Upload Wizard]].</translate> | ||
---- | ---- | ||
<u><translate | <u><translate>Existing template documentation</translate></u><br/> | ||
<translate | <translate> | ||
At Wikimedia Commons, it is recommended to use <tvar name=tag2>{{tl|TemplateBox}}</tvar> with either <tvar name=param1><code><nowiki>‎useTemplateData=1</nowiki></code></tvar> or <tvar name=param2><code><nowiki>‎useTemplateData=only</nowiki></code></tvar> on the <tvar name=relPage><code><nowiki>‎/doc</nowiki></code></tvar> subpage and transcluding it with <tvar name=template>{{tl|Documentation}}</tvar> into the template. <tvar name=tag3>{{tag|nowiki|o}}</tvar>-tags can be wrapped around the arguments, if required, to avoid templates being expanded.</translate> | At Wikimedia Commons, it is recommended to use <tvar name=tag2>{{tl|TemplateBox}}</tvar> with either <tvar name=param1><code><nowiki>‎useTemplateData=1</nowiki></code></tvar> or <tvar name=param2><code><nowiki>‎useTemplateData=only</nowiki></code></tvar> on the <tvar name=relPage><code><nowiki>‎/doc</nowiki></code></tvar> subpage and transcluding it with <tvar name=template>{{tl|Documentation}}</tvar> into the template. <tvar name=tag3>{{tag|nowiki|o}}</tvar>-tags can be wrapped around the arguments, if required, to avoid templates being expanded.</translate> | ||
<u><translate | <u><translate>Newly created template documentation and imports</translate></u><br/> | ||
<translate | <translate> | ||
Another option, especially for imported templates, or for users with JSON experience, is placing raw <tvar name=tag>{{tag|templatedata|o}}</tvar>-tags into the Wikitext of the template, as described in various Wikipediae.</translate> | Another option, especially for imported templates, or for users with JSON experience, is placing raw <tvar name=tag>{{tag|templatedata|o}}</tvar>-tags into the Wikitext of the template, as described in various Wikipediae.</translate> | ||
<u><translate | <u><translate>Discussion</translate></u><br/> | ||
[[Commons:Requests for comment/How Commons should deal with TemplateData|<translate | [[Commons:Requests for comment/How Commons should deal with TemplateData|<translate>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.</translate>]] | ||
|help=<translate | |help=<translate>Wikipedia's help about TemplateData</translate> | ||
|helppage=<translate nowrap | |helppage=<translate nowrap>:en:Wikipedia:VisualEditor/TemplateData/Tutorial</translate> | ||
|info=<translate | |info=<translate>Commons-specific information</translate> | ||
|lang={{#invoke:Caller title|lang|base=Template:TemplateDataInfo/i18n}} | |lang={{#invoke:Caller title|lang|base=Template:TemplateDataInfo/i18n}} | ||
}} | }} | ||
Revision as of 08:13, 6 January 2024
- TemplateData
TemplateData is a way of storing information about a template, such as parameter names, or a description of the template. It is used by VisualEditor and possibly other tools like Upload Wizard.
Existing template documentation
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 arguments, if required, to avoid templates being expanded.
Newly created template documentation and imports
Another option, especially for imported templates, or for users with JSON experience, is placing raw <templatedata>-tags into the Wikitext of the template, as described in various Wikipediae.
Wikipedia's help about TemplateData • Commons-specific information