Jump to content

Template:High-risk: Difference between revisions

m
no edit summary
m (1 revision imported)
 
en>Tomybrz
mNo edit summary
Line 1: Line 1:
<noinclude>
<languages/>
</noinclude>{{#switch:<translate></translate>
| =
{{ombox
{{ombox
| type = content
| type = content
| image = [[File:Ambox warning orange.svg|40px|alt=]]
| image = [[File:OOjs UI icon alert-warning.svg|40px|alt=]]
| imageright =
| imageright =
| text =  
| text = '''<translate><!--T:3--> This {{<tvar|1>#switch:{{NAMESPACE}}</>|<tvar|2>Module</>=Lua module|<tvar|3>#default</>=template}} is used on <span class="plainlinks">[<tvar|url>https://tools.wmflabs.org/templatecount/index.php?lang=en&namespace={{NAMESPACENUMBER:{{FULLPAGENAME}}}}&name={{urlencode:{{#switch:{{SUBPAGENAME}}|doc|sandbox={{BASEPAGENAME}}|#default={{PAGENAME}} }}}}</> {{<tvar|4>#if:{{{1|}}}|{{formatnum:{{{1}}}}}</>|a very large number of}} pages]</span>.</translate>'''<br />
'''This {{
<translate>
#switch:{{NAMESPACE}}
<!--T:2-->
|Module=Lua module
To avoid large-scale disruption and unnecessary server load, any changes to this {{<tvar|1>#switch:{{NAMESPACE}}</>|<tvar|2>Module</>=module|<tvar|3>#default</>=template}} should first be tested in its [[<tvar|4>{{#switch:{{SUBPAGENAME}}|doc|sandbox={{SUBJECTSPACE}}:{{BASEPAGENAME}}|#default={{SUBJECTPAGENAME}}}}/sandbox</>|/sandbox]] or [[<tvar|5>{{#switch:{{SUBPAGENAME}}|doc|sandbox={{SUBJECTSPACE}}:{{BASEPAGENAME}}|#default={{SUBJECTPAGENAME}}}}/testcases</>|/testcases]] subpages{{<tvar|6>#switch:{{NAMESPACE}}</>|<tvar|7>Module</>=.|<tvar|8>#default</>=&#32;or in your own [[w:Wikipedia:Subpages#How to create user subpages|user subpage]].}}</translate>
|#default=template
<translate>
}} is used on <span class="plainlinks">[https://tools.wmflabs.org/templatecount/index.php?lang=en&namespace={{NAMESPACENUMBER:{{FULLPAGENAME}}}}&name={{urlencode:{{
<!--T:1-->
#switch: {{SUBPAGENAME}}
The tested changes can then be added to this page in one single edit.</translate>
| doc | sandbox = {{BASEPAGENAME}}
<translate>
| #default     = {{PAGENAME}}
<!--T:4-->
}}}} {{#if:{{{1|}}}|{{formatnum:{{{1}}}}}|a very large number of}} pages].'''</span><br />To avoid large-scale disruption and unnecessary server load, any changes to this {{
Please consider discussing any changes {{<tvar|1>#if:{{{2|}}}</>|at <tvar|2>[[{{{2}}}]]</>|on the [[<tvar|3>{{#switch:{{SUBPAGENAME}}|doc|sandbox={{TALKSPACE}}:{{BASEPAGENAME}}|#default={{TALKPAGENAME}}}}</>|talk page]]}} before implementing them.</translate>
#switch:{{NAMESPACE}}
}}
|Module=module
| #default=
|#default=template
  {{ {{#ifexist:Template:High-risk/{{int:lang}}
}} should first be tested in its [[{{
    |Template:High-risk/{{int:lang}}
#switch: {{SUBPAGENAME}}
    |{{TNTN|High-risk}}
| doc | sandbox = {{SUBJECTSPACE}}:{{BASEPAGENAME}}
    }}
| #default     = {{SUBJECTPAGENAME}}
  }}
}}/sandbox|/sandbox]] or [[{{
#switch: {{SUBPAGENAME}}
| doc | sandbox = {{SUBJECTSPACE}}:{{BASEPAGENAME}}
| #default     = {{SUBJECTPAGENAME}}
}}/testcases|/testcases]] subpages{{
#switch:{{NAMESPACE}}
|Module=.
|#default=&#32;or in your own [[Wikipedia:Subpages#How to create user subpages|user subpage]].
}} The tested changes can then be added to this page in one single edit. Please consider discussing any changes {{#if:{{{2|}}}|at [[{{{2}}}]]|on the [[{{
#switch: {{SUBPAGENAME}}
| doc | sandbox = {{TALKSPACE}}:{{BASEPAGENAME}}
| #default     = {{TALKPAGENAME}}
}}|talk page]]}} before implementing them.
}}<noinclude>
}}<noinclude>
{{Documentation}}
{{Documentation|content=
 
This is the {{tl|high-risk}} message box. It is meant to be put at the top of the documentation page on the most high-use (high-risk) templates and Lua modules (the template detects the name space), i.e., for templates used on 100,000 pages or more. For templates used on 2,000–100,000 pages, it is recommended to use the {{tl|high-use}} template instead, which has a softer wording.
 
'''''Note:''''' It is normal that some of the links in the message box are red.
 
=== Usage ===
The template can be used as is. But it can also take some parameters:
* First parameter is the number of pages. See [[Wikipedia:Database reports/Templates transcluded on the most pages]] (archived) or [[toollabs:templatecount/]] to find out how many pages use the template.
* Second parameter is the name of some other talk page if you want discussion to be made there instead. But a better option might be to redirect the talkpage of your template to that other talkpage.
 
===Examples===
<pre>
{{high-risk| 300,000+ | Wikipedia talk:High-risk templates }}
</pre>
 
{{high-risk| 300,000+ | Wikipedia talk:High-risk templates }}
 
<pre>
{{high-risk| 300,000+ }}
</pre>
 
{{high-risk| 300,000+ }}
 
<pre>
{{high-risk| | Wikipedia talk:High-risk templates }}
</pre>
 
{{high-risk| | Wikipedia talk:High-risk templates }}
 
The full code for a /doc page top may look like this:
 
<pre>
{{documentation subpage}}
<!-- Categories go where indicated at the bottom of this page, please; interwikis go to Wikidata (see also: [[Wikipedia:Wikidata]]). -->
{{high-risk| 300,000+ }}
</pre>
 
=== Technical details ===
The [[{{translatable}}/sandbox|/sandbox]] and [[{{translatable}}/testcases|/testcases]] links are the standard names for such subpages. If those pages are created then the green /doc box for the template will detect them and link to them in its heading. For instance see the top of this documentation.
 
=== See also ===
* {{tl|high-risk}} – For the most high-use (high-risk) templates.
* {{tl|high-use}} – For the slightly less high-risk templates.
* {{tl|intricate template}} – For the intricate, i.e., complex templates.
* {{tl|pp-template}} – The protection template that usually is put on high-risk templates.
* {{tl|used in system}} – For templates used in the Wikipedia user interface.
* [[Wikipedia:High-risk templates]]
* [[Wikipedia:Template sandbox and test cases]]
 
}}
<!-- Add categories to the /doc subpage; interwikis go to Wikidata, thank you! -->
<!-- Add categories to the /doc subpage; interwikis go to Wikidata, thank you! -->
</noinclude>
</noinclude>
Anonymous user