Template:Policy/doc: Difference between revisions

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search
Content deleted Content added
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 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>JSON</templatedata> ./. {{TemplateBox}}
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 TemplateDataCommons-specific information

This template marks official Commons policies. It should be used only on English version, that is considered the official version.

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
discussion pagetalkpage

Title of the discussion page where change proposals can be made, if not the associated talk page.

Default
{{TALKPAGENAME}}
Page nameoptional

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

Alemannisch  azərbaycanca  Boarisch  беларуская (тарашкевіца)  беларуская (тарашкевіца)  বাংলা  català  čeština  dansk  Deutsch  Ελληνικά  English  Esperanto  español  euskara  فارسی  suomi  français  עברית  hrvatski  magyar  Bahasa Indonesia  italiano  日本語  한국어  македонски  മലയാളം  मराठी  Nederlands  norsk  polski  português  português do Brasil  română  русский  sicilianu  slovenčina  slovenščina  svenska  українська  Tiếng Việt  简体中文  繁體中文  +/−

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.