Actions

Template

Module rating: Difference between revisions

From Convention Master Documentation

Documentation>Shirayuki
m (Reverted edits by Thingofme (talk) to last version by ExE Boss)
 
m (1 revision imported)
 
(No difference)

Latest revision as of 20:01, 18 December 2022

<languages />

Lua error: bad argument #1 to "get" (not a valid title).{{#if:<translate> This template is used to rate Lua modules by quality.</translate> <translate> It is placed at the top of the module's /doc subpage.</translate> <translate> It produces a message informing users about the rating system, and it also places the module into a tracking category.</translate>

<translate>

Usage

Basic usage: </translate> Template:Pre

<translate> Without categories:</translate> Template:Pre

<translate> If <tvar name=1>{{#if:{{safesubst:#switch:

|no
|n
|false
|0        = 
|         = 
|¬        = 
|yes
|y
|true
|1        = yes
|#default = yes

}}|}}{{[[{{#if:|{{{SISTER}}}Template|Template}}:Module rating|Module rating]]{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||...}}}}</tvar> is used outside the Module namespace, an error message is shown: <tvar name=2>{{#switch:

 {{#if:
 |     
 | {{#ifeq:Template|Module
   | module
   | other
   }}
 }}

| module =

| other | #default = Template:Error }}</tvar></translate>

<translate>

Ratings

</translate> <translate> The rating should be placed in the first positional parameter.</translate> <translate> There are five different ratings: <tvar name=1>pre-alpha, alpha, beta, release and protected</tvar>.</translate> <translate> There are also short alias codes for each of the ratings.</translate>

<translate> Rating</translate> <translate> Aliases</translate> <translate> Result</translate>
pre-alpha prealpha
pa
{{#switch:
 {{#if:Module
module Module module other
   }}
 }}
module = other #default = Template:Error

}}

alpha a {{#switch:
 {{#if:module
module Module module other
   }}
 }}
module = other #default = Template:Error

}}

beta b {{#switch:
 {{#if:module
module Module module other
   }}
 }}
module = other #default = Template:Error

}}

release r
general
g
{{#switch:
 {{#if:module
module Module module other
   }}
 }}
module = other #default = Template:Error

}}

protected protect
p
{{#switch:
 {{#if:module
module Module module other
   }}
 }}
module = other #default = Template:Error

}}

<translate> Anything else or if missing</translate> {{#switch:
 {{#if:module
module Module module other
   }}
 }}
module = other #default = Template:Error

}}

TemplateData

Template:Module rating/doc

<translate>

Categories

The template will put modules in one of the following categories, according to the rating specified: </translate>

  • {{#ifeq:Category:Modules in pre-alpha development|
 |

}}[[Special:MyLanguage/Category:Modules in pre-alpha development|{{#if:|{{{2}}}|{{#ifexist:Translations:{{#if:Category|Category:}}Modules in pre-alpha development/Page display title/en

 |{{#if:
   |
   |{{ Template:TNTN }}
 }}
 |{{#if:
   |Modules in pre-alpha development
   |Category:Modules in pre-alpha development
 }}

}}}}]]{{#ifeq:Category:Modules in pre-alpha development|

 |

}}

  • {{#ifeq:Category:Modules in alpha|
 |

}}[[Special:MyLanguage/Category:Modules in alpha|{{#if:|{{{2}}}|{{#ifexist:Translations:{{#if:Category|Category:}}Modules in alpha/Page display title/en

 |{{#if:
   |
   |{{ Template:TNTN }}
 }}
 |{{#if:
   |Modules in alpha
   |Category:Modules in alpha
 }}

}}}}]]{{#ifeq:Category:Modules in alpha|

 |

}}

  • {{#ifeq:Category:Modules in beta|
 |

}}[[Special:MyLanguage/Category:Modules in beta|{{#if:|{{{2}}}|{{#ifexist:Translations:{{#if:Category|Category:}}Modules in beta/Page display title/en

 |{{#if:
   |
   |{{ Template:TNTN }}
 }}
 |{{#if:
   |Modules in beta
   |Category:Modules in beta
 }}

}}}}]]{{#ifeq:Category:Modules in beta|

 |

}}

  • {{#ifeq:Category:Modules for general use|
 |

}}[[Special:MyLanguage/Category:Modules for general use|{{#if:|{{{2}}}|{{#ifexist:Translations:{{#if:Category|Category:}}Modules for general use/Page display title/en

 |{{#if:
   |
   |{{ Template:TNTN }}
 }}
 |{{#if:
   |Modules for general use
   |Category:Modules for general use
 }}

}}}}]]{{#ifeq:Category:Modules for general use|

 |

}}

  • {{#ifeq:Category:Modules subject to page protection|
 |

}}[[Special:MyLanguage/Category:Modules subject to page protection|{{#if:|{{{2}}}|{{#ifexist:Translations:{{#if:Category|Category:}}Modules subject to page protection/Page display title/en

 |{{#if:
   |
   |{{ Template:TNTN }}
 }}
 |{{#if:
   |Modules subject to page protection
   |Category:Modules subject to page protection
 }}

}}}}]]{{#ifeq:Category:Modules subject to page protection|

 |

}}

<translate> These categories are suppressed on pages ending with /doc.</translate> <translate> To suppress categories on all pages, you can use the code <tvar name=1>{{safesubst:#if:|}}{{safesubst:#if:{{safesubst:#switch: 1

|no
|n
|false
|0        = 
|         = 
|¬        = 
|yes
|y
|true
|1        = yes
|#default = yes

}}|}}<{{safesubst:#if:|span class="monospaced {{safesubst:#if:{{safesubst:#switch: 1

|no
|n
|false
|0        = 
|         = 
|¬        = 
|yes
|y
|true
|1        = yes
|#default = yes

}}|nowrap}}"|code {{safesubst:#if:{{safesubst:#switch: 1

|no
|n
|false
|0        = 
|         = 
|¬        = 
|yes
|y
|true
|1        = yes
|#default = yes

}}|class="nowrap"}}}}>|{{safesubst:#if:nocat|nocat=}}true</{{safesubst:#if:|span|code}}></tvar>.</translate>

<translate>

See also

</translate>

[[Category:Template documentation pages{{#translation:}}]] }}