Template:Template rating/doc: Difference between revisions

From Xenharmonic Wiki
Jump to navigation Jump to search
Ganaram inukshuk (talk | contribs)
No edit summary
Ganaram inukshuk (talk | contribs)
No edit summary
Line 1: Line 1:
{{dochead}}
{{dochead|mod=aaa}}{{wikipedia}}
'''Template:Template rating''' is used to denote one of several states for a template or module:
'''{{ARTICLEROOTPAGENAME}}''' is used to denote the rating of a template or module, namely denoting whether or not it can be used.


* Draft - the template or module is a work-in-progress or is a mockup of a proposed template. Unless otherwise stated, it should not be used
Despite the name, this template can also be used on Lua modules.
* Ready - the template or module is ready to be used.
* Broken - the template or module is currently broken and is currently being fixed, and should not be used unless it's for testing.
* Replaced - the template or module has been deprecated, and has a replacement.
* Deprecated - the template or module has been deprecated, and has no replacement.


Despite the name, this template can also be used on lua modules.
=== Parameters ===


'''Draft template''' - for testing new templates and, sometimes, rewriting existing templates.
; <code>rating</code> (required; default <code>draft</code>)
: The rating of template or module.
 
; <code>namespace</code> (required; default is based on <code><nowiki>{{ARTICLESPACE}}</nowiki></code>)
: The namespace of the page. For normal use, this should be either Template or Module.
 
; <code>details</code> (optional)
: Any details about the template or module in question.
 
; <code>replacement</code> (required if <code>rating=replaced</code>)
: The name of the replacement template or module.
 
; <code>delete</code> (optional; default <code>false</code>)
: Whether to delete the template or module.
 
; <code>debug</code> (optional; default <code>false</code>)
: Whether to disable categories for [[Template:Category handler]].
 
=== Usage ===
 
The following examples assumes use for a template.
 
'''Draft template'''
 
'''Ready''' denotes a template that is work-in-progress, or templates that are being rewritten or refactored.
 
<code><nowiki>{{Template rating|Sometemplate|rating=draft|details=Other details go here.}}</nowiki></code>
{{Template rating|Sometemplate|rating=draft|namespace=Template|details=Other details go here.|debug=1}}
{{Template rating|Sometemplate|rating=draft|namespace=Template|details=Other details go here.|debug=1}}


'''Ready template''' - for templates that are ready; the absence of this template implies a template is ready, so this isn't strictly required.
'''Ready template'''
 
'''Ready''' denotes a template that is ready for use on the wiki. The use of this template is not necessary for most templates, as a template without any other indicators is assumed to be a ready tempalte.
 
<code><nowiki>{{Template rating|Sometemplate|rating=ready|details=Other details go here.}}</nowiki></code>
{{Template rating|Sometemplate|rating=ready|namespace=Template|details=Other details go here.}}
{{Template rating|Sometemplate|rating=ready|namespace=Template|details=Other details go here.}}


'''Broken template''' - for templates with broken functionality that requires rewriting
'''Broken template'''
 
'''Broken''' denotes a template that is not functioning properly and is currently being fixed.
 
<code><nowiki>{{Template rating|Sometemplate|rating=broken|details=Other details go here.}}</nowiki></code>
{{Template rating|Sometemplate|rating=broken|namespace=Template|details=Other details go here.|debug=1}}
{{Template rating|Sometemplate|rating=broken|namespace=Template|details=Other details go here.|debug=1}}


'''Replaced template, archived''' - for templates that have been replaced by another, and shouldn't be deleted. Deprecated templates that have been used extensively should NOT be deleted as it makes viewing past revisions of pages harder to do.
'''Replaced template'''
 
'''Replaced''' denotes a template that should no longer be used and have been superseded by a new template. By default, deprecated templates are ''not'' nominated for deletion, as deleting a deprecated template makes viewing past revisions of transcluding pages much more difficult.
 
<code><nowiki>{{Template rating|Sometemplate|rating=replaced|replacement=Somenewtemplate|details=Other details go here.}}</nowiki></code>
{{Template rating|Sometemplate|rating=replaced|namespace=Template|replacement=Somenewtemplate|details=Other details go here.|debug=1}}
{{Template rating|Sometemplate|rating=replaced|namespace=Template|replacement=Somenewtemplate|details=Other details go here.|debug=1}}


'''Replaced template, delete''' - for templates that have been replaced by another, but the original should be deleted. This is meant for templates that were never used extensively (or a draft template that was never made ready) and can be safely deleted.
If a template has not been extensively used, it may be nominated for deletion by adding <code>delete=1</code>.
 
<code><nowiki>{{Template rating|Sometemplate|rating=replaced|replacement=Somenewtemplate|details=Other details go here.|delete=1}}</nowiki></code>
{{Template rating|Sometemplate|rating=replaced|namespace=Template|replacement=Somenewtemplate|details=Other details go here.|debug=1|delete=1}}
{{Template rating|Sometemplate|rating=replaced|namespace=Template|replacement=Somenewtemplate|details=Other details go here.|debug=1|delete=1}}


'''Deprecated template, archived''' - for templates that have been deprecated without a replacement, and shouldn't be deleted.
'''Deprecated template'''
 
'''Deprecated''' denotes a template that should no longer be used and has no replacement.
 
<code><nowiki>{{Template rating|Sometemplate|rating=deprecated|details=Other details go here.}}</nowiki></code>
{{Template rating|Sometemplate|rating=deprecated|namespace=Template|details=Other details go here.|debug=1}}
{{Template rating|Sometemplate|rating=deprecated|namespace=Template|details=Other details go here.|debug=1}}


'''Deprecated template, delete''' - for templates that have been deprecated without a replacement, and should be deleted.
As with replaced templates, deprecated templates are ''not'' nominated for deletion by default. To nominate it for deletion, add <code>delete=1</code>.
 
<code><nowiki>{{Template rating|Sometemplate|rating=deprecated|details=Other details go here.|delete=1}}</nowiki></code>
{{Template rating|Sometemplate|rating=deprecated|namespace=Template|details=Other details go here.|debug=1|delete=1}}
{{Template rating|Sometemplate|rating=deprecated|namespace=Template|details=Other details go here.|debug=1|delete=1}}


'''Incorrect options'''
'''Incorrect options and categories'''
 
This template uses [[Template:Category handler]], which categories templates and modules using this template in the appropriate categories, except those with a rating of ''ready''. Categories are not enabled on /doc or /sandbox pages.
 
In addition to this, this template detects whether it's in the incorrect namespace, such as when used on User namespace pages, and can detect whether it has an unrecognized rating.
 
<code><nowiki>{{Template rating|Sometemplate|rating=aaa}}</nowiki></code>
{{Template rating|Sometemplate|rating=aaa|namespace=User}}
{{Template rating|Sometemplate|rating=aaa|namespace=User}}


{{Todo|inline=1|add documentation}}
=== See also ===
* [[Template:Deprecated template]], a template added to a deprecated template's code, to be used in conjunction with this template

Revision as of 09:54, 29 October 2025

English Wikipedia has an article on:

Template:Template rating is used to denote the rating of a template or module, namely denoting whether or not it can be used.

Despite the name, this template can also be used on Lua modules.

Parameters

rating (required; default draft)
The rating of template or module.
namespace (required; default is based on {{ARTICLESPACE}})
The namespace of the page. For normal use, this should be either Template or Module.
details (optional)
Any details about the template or module in question.
replacement (required if rating=replaced)
The name of the replacement template or module.
delete (optional; default false)
Whether to delete the template or module.
debug (optional; default false)
Whether to disable categories for Template:Category handler.

Usage

The following examples assumes use for a template.

Draft template

Ready denotes a template that is work-in-progress, or templates that are being rewritten or refactored.

{{Template rating|Sometemplate|rating=draft|details=Other details go here.}}

This documentation is for a draft template. It is incomplete and may not be in active development. If possible, editors are encouraged to help with its development. In the meantime, editors should avoid using this template across the Xenharmonic Wiki, except for testing.

Details: Other details go here.

Ready template

Ready denotes a template that is ready for use on the wiki. The use of this template is not necessary for most templates, as a template without any other indicators is assumed to be a ready tempalte.

{{Template rating|Sometemplate|rating=ready|details=Other details go here.}}

This documentation is for a ready template. This message indicates that a template is ready for use, or has recently been repaired. This message may be removed once this template has been used on several pages or once it is verified to work as intended.

Details: Other details go here.

Broken template

Broken denotes a template that is not functioning properly and is currently being fixed.

{{Template rating|Sometemplate|rating=broken|details=Other details go here.}}

This documentation is for a broken template. If possible, editors are encouraged to improve it or nominate it for deletion or deprecation if it cannot be fixed. In the meantime, editors should avoid using this template across the Xenharmonic Wiki, except for testing.

Details: Other details go here.

Replaced template

Replaced denotes a template that should no longer be used and have been superseded by a new template. By default, deprecated templates are not nominated for deletion, as deleting a deprecated template makes viewing past revisions of transcluding pages much more difficult.

{{Template rating|Sometemplate|rating=replaced|replacement=Somenewtemplate|details=Other details go here.}}

This documentation is for a deprecated template, which has been replaced by Template:Somenewtemplate. Further use of this template is not advised. This template is kept for historical purposes and should not be deleted.

Details: Other details go here.

If a template has not been extensively used, it may be nominated for deletion by adding delete=1.

{{Template rating|Sometemplate|rating=replaced|replacement=Somenewtemplate|details=Other details go here.|delete=1}}

This documentation is for a deprecated template, which has been replaced by Template:Somenewtemplate. Further use of this template is not advised. This template is a candidate for deletion.

Details: Other details go here.

Deprecated template

Deprecated denotes a template that should no longer be used and has no replacement.

{{Template rating|Sometemplate|rating=deprecated|details=Other details go here.}}

This documentation is for a deprecated template, which has no replacement. Further use of this template is not advised. This template is kept for historical purposes and should not be deleted.

Details: Other details go here.

As with replaced templates, deprecated templates are not nominated for deletion by default. To nominate it for deletion, add delete=1.

{{Template rating|Sometemplate|rating=deprecated|details=Other details go here.|delete=1}}

This documentation is for a deprecated template, which has no replacement. Further use of this template is not advised. This template is a candidate for deletion.

Details: Other details go here.

Incorrect options and categories

This template uses Template:Category handler, which categories templates and modules using this template in the appropriate categories, except those with a rating of ready. Categories are not enabled on /doc or /sandbox pages.

In addition to this, this template detects whether it's in the incorrect namespace, such as when used on User namespace pages, and can detect whether it has an unrecognized rating.

{{Template rating|Sometemplate|rating=aaa}}

This template has an unrecognized rating or is in the incorrect namespace.

Details: Valid ratings are draft, ready, broken, replaced, and deprecated. Valid namespaces are Module and Template. This template's rating is aaa and is currently in the User namespace.

See also