Difference between revisions of "Template:MOS-TRANS/doc"

From blackwiki
Jump to navigation Jump to search
imported>Callanecc
(Add note re hiding DS and Not a forum templates)
imported>TheDragonFire
(Documentation overhaul.)
Line 1: Line 1:
 +
 
{{Documentation subpage}}
 
{{Documentation subpage}}
 +
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
 +
== Usage ==
 +
 +
: {{tlx|MOS-TRANS}}
 +
: or
 +
: {{tlx|MOS-TRANS|f|DS&#61;no|Forum&#61;no}}
  
== Usage ==
+
=== Hardcoded versions ===
===Parameters===
 
* First parameter (optional) - specifies whether the subject's preferred gender is m (male) or f (female)
 
* Second parameter (optional) - specifies additional topics that might produce heated discussions
 
* {{para|DS|no}} - hides the [[WP:AC/DS|discretionary sanctions]] template (shown by default)
 
* {{para|Forum|no}} - hides the {{tl|Not a forum}} template (shown by default)
 
  
===Test cases===
+
: {{tlx|MOS-TW}} – equivalent to {{tlx|MOS-TRANS|f|Forum&#61;no}}
* The basic, generic usage for articles about transgender people. '''<nowiki>{{MOS-TRANS}}</nowiki>''' produces:
+
: {{tlx|MOS-TM}} – equivalent to {{tlx|MOS-TRANS|m|Forum&#61;no}}
{{MOS-TRANS}}
+
: {{tlx|MOS-NB}} – equivalent to {{tlx|MOS-TRANS|nb|Forum&#61;no}}
  
* If you wish to specify the preferred gender of the subject, you can ''add a parameter specifying f (for female) or m (for male)''. '''<nowiki>{{MOS-TRANS|m}}</nowiki>''' produces:
+
== Parameters ==
{{MOS-TRANS|m}}
 
  
* If you wish to provide additional topics that may produce heated discussions, you can ''add a parameter listing such topics''. '''<nowiki>{{MOS-TRANS|f|heroism, or the US military}}</nowiki>''' produces:
+
{{TemplateData header}}
{{MOS-TRANS|f|heroism, or the US military}}
+
<templatedata>
 +
{
 +
"params": {
 +
"1": {
 +
"label": "Gender",
 +
"type": "string",
 +
"suggested": true,
 +
"example": "f",
 +
"description": "The self-designated gender of the article subject."
 +
},
 +
"2": {
 +
"label": "Contentious topics",
 +
"description": "Additional topics that may produce heated discussions.",
 +
"type": "string"
 +
},
 +
"Forum": {
 +
"description": "Display the {{Not a forum}} template.",
 +
"type": "boolean",
 +
"default": "yes"
 +
},
 +
"nocat": {},
 +
"small": {},
 +
"DS": {
 +
"description": "Display the discretionary sanctions warning.",
 +
"type": "boolean",
 +
"default": "yes"
 +
}
 +
},
 +
"paramOrder": [
 +
"1",
 +
"2",
 +
"DS",
 +
"Forum",
 +
"small",
 +
"nocat"
 +
],
 +
"format": "inline",
 +
"description": "Manual of Style identity guideline talk-page warning."
 +
}
 +
</templatedata>
  
<includeonly>
+
<includeonly>{{sandbox other||
<!-- Categories go here, and interwikis go in Wikidata -->
+
<!-- Categories below this line, please; interwikis at Wikidata -->
 
[[Category:LGBT templates]]
 
[[Category:LGBT templates]]
</includeonly>
+
}}</includeonly>

Revision as of 08:00, 16 February 2018

Usage

{{MOS-TRANS}}
or
{{MOS-TRANS|f|DS=no|Forum=no}}

Hardcoded versions

{{MOS-TW}} – equivalent to {{MOS-TRANS|f|Forum=no}}
{{MOS-TM}} – equivalent to {{MOS-TRANS|m|Forum=no}}
{{MOS-NB}} – equivalent to {{MOS-TRANS|nb|Forum=no}}

Parameters

This is the TemplateData documentation for this template used by VisualEditor and other tools; see the monthly parameter usage report for this template.

TemplateData for MOS-TRANS

Manual of Style identity guideline talk-page warning.

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Gender1

The self-designated gender of the article subject.

Example
f
Stringsuggested
Contentious topics2

Additional topics that may produce heated discussions.

Stringoptional
DSDS

Display the discretionary sanctions warning.

Default
yes
Booleanoptional
ForumForum

Display the {{Not a forum}} template.

Default
yes
Booleanoptional
Smallsmall

no description

Unknownoptional
Nocatnocat

no description

Unknownoptional