Template:Policy/doc: Difference between revisions
Tacsipacsi (talk | contribs) add documentation for parameter, stress that it isn’t autotranslated and should not be translated at all, move category from main template page |
No edit summary |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{Uses TemplateStyles|Template:Policy/styles.css}} |
|||
{{TemplateBox |
{{TemplateBox |
||
|1=talkpage |
|1=talkpage |
||
Line 11: | Line 12: | ||
It shouldn't be autotranslated (the pages themselves will have translation links). When translating, please change the category to a localized one or use {{tl|TNT}} for pages following the structure <code><nowiki>SourcePage/langcode</nowiki></code> for translations. |
It shouldn't be autotranslated (the pages themselves will have translation links). When translating, please change the category to a localized one or use {{tl|TNT}} for pages following the structure <code><nowiki>SourcePage/langcode</nowiki></code> for translations. |
||
|desc-td-en=This template marks official Commons policies. It should be used only on English version, that is considered the official version. |
|||
|namespace=Commons |
|namespace=Commons |
||
|usergroup=all |
|usergroup=all |
||
Line 24: | Line 26: | ||
|shorthand= |
|shorthand= |
||
|relieson= |
|relieson= |
||
|useTemplateData=only |
|||
}}<includeonly> |
}}<includeonly> |
||
[[Category:Commons header templates]]</includeonly> |
[[Category:Commons header templates]]</includeonly> |
Latest revision as of 06:33, 2 August 2024
This template uses TemplateStyles: |
This template marks official Commons policies. It should be used only on English version, that is considered the official version. For translated version, please use {{Translated policy}} instead.
It shouldn't be autotranslated (the pages themselves will have translation links). When translating, please change the category to a localized one or use {{TNT}} for pages following the structure SourcePage/langcode
for translations.
The template automatically sets the following categories: Category:Commons policies
Usage
{{Policy}}
Template parameters
- 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
This template marks official Commons policies. It should be used only on English version, that is considered the official version.
Parameter | Description | Type | Status | |
---|---|---|---|---|
discussion page | talkpage | Title of the discussion page where change proposals can be made, if not the associated talk page.
| Page name | optional |
Additional information
The template is intended to be used in the following namespaces: the Commons namespace
The template is intended to be used by the following user groups: all users
See also
Localization
This template is localized through {{Autotranslate}}. The layout of the template can be found under Template:Policy/layout.
To add your language to the list of languages supported by this template, please copy the code of Template:Policy/en (or any other language version you prefer to translate) and replace the text strings in there (the form below can be used to create a translation, the English version is preloaded in the edit box). Please change the parameter lang
from en
(or whatever language you are translating) to the language code of your language.
It doesn’t use {{Autotranslate}} in reality, but the translated versions follow this scheme. It should not be translated anyways, as this template should only be used on English pages.