Template:TemplateDataInfo/i18n: Difference between revisions
More actions
m Use new <tvar> syntax |
|||
| Line 10: | Line 10: | ||
Existing template documentation</translate></u><br/> | Existing template documentation</translate></u><br/> | ||
<translate><!--T:8--> | <translate><!--T:8--> | ||
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> | 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><br/> | ||
<u><translate><!--T:10--> | <u><translate><!--T:10--> | ||
Newly created template documentation and imports</translate></u><br/> | Newly created template documentation and imports</translate></u><br/> | ||
<translate><!--T:3--> | <translate><!--T:3--> | ||
Another option, especially for imported templates, or for users with JSON experience, is placing raw <tvar name=tag> | 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><!--T:11--> | <u><translate><!--T:11--> | ||
Revision as of 05:43, 20 June 2021
- 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.
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