Template:Userbox gender/doc: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
(→‎Translations: - Added strings notice, support Strings translation now.)
 
(10 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{Doc/subpage}}
{{Doc/subpage}}
Userbox used for specifying the user's gender.
Userbox used for specifying the user's gender.
{{Note|To change user gender, go to your account Preferences > How do you prefer to be described? > Select Male or Female.}}
{{Note|To change user gender automatically, go to your account [[Special:Preferences#mw-prefsection-personal|Preferences]] > How do you prefer to be described? > Select '''Male''' or '''Female'''.<br>Or you can specify it manually below using parameters.}}


== Translations ==
== Translations ==
{{Note|Coming soon!}}
{{Sn}}
<!-- The used strings are on the [[/strings|strings subpage]]. Please follow the format to add translations for them. -->


== Copy and Paste ==
== Copy and Paste ==
{{CodeBlock|<nowiki>{{Userbox gender
{{CodeBlock|<nowiki>{{Userbox gender
| enablecustomname = <yes/true> or <no/false> (default)
| enablecustomname = <yes/true> or <no/false> (default)
| customname    = <username on this wiki, without "User:" part>
| customname    = <username on this wiki, without "User:" part. "enablecustomname" must be enabled first! Example: "Gabe Newell">
| gender = <auto/male/female/unspecified>
}}</nowiki>}}
}}</nowiki>}}


Line 21: Line 21:
|-
|-
| align="center" | {{Code|style=2|{{Param|type}}}}
| align="center" | {{Code|style=2|{{Param|type}}}}
| Default appearance, defaults to unspecified if not specified on User Preferences.
| Default appearance, gender defaults to unspecified if not specified on User Preferences. <br>Username is set to {{code|<nowiki>{{PAGENAME}}</nowiki>}}, aka the user page that you are currently on.
| {{CodeBlock|margin=5px|<nowiki>None</nowiki>}}
| {{CodeBlock|margin=5px|<nowiki>None</nowiki>}}
| align="center" | {{Userbox gender|nocat=1}}
| align="center" | {{Userbox gender|nocat=1}}
|-
|-
| align="center" | {{Code|style=2|{{Param|enablecustomname}}}} and {{Code|style=2|{{Param|customname}}}}
| align="center" | {{Code|style=2|{{Param|enablecustomname}}}} and {{Code|style=2|{{Param|customname}}}}
| Enable and use custom username. Most users may not have their gender specified in User Preferences.
| Enable and specify custom username. Most users may not have their gender specified in User Preferences.
| {{CodeBlock|margin=5px|<nowiki>| enablecustomname = <yes/true> or <no/false> (default)</nowiki>}}
| {{CodeBlock|margin=5px|<nowiki>| enablecustomname = <yes/true> or <no/false> (default)</nowiki>}}
| align="center" | [[User:Gabe Newell]]: {{Userbox gender| enablecustomname = true|customname=Gabe Newell}}<br>[[User:kr0tchet]]: {{Userbox gender| enablecustomname = true|customname=kr0tchet}}
| align="center" | [[User:Gabe Newell]]: {{Userbox gender| enablecustomname = true|customname=Gabe Newell|nocat=1}}<br>[[User:kr0tchet]]: {{Userbox gender| enablecustomname = true|customname=kr0tchet|nocat=1}}
|-
| align="center" | {{Code|style=2|{{Param|gender}}}}
| Manually set user gender without changing user preferences, and without specify custom username. <br>By default this is automatic based off user's preferences.
| {{CodeBlock|margin=5px|<nowiki>| gender = <auto/male/female/unspecified> (default is "auto")</nowiki>}}
| align="center" | Male:{{Userbox gender| gender = male}}<br>Female: {{Userbox gender| gender = female|nocat=1}}
|-
| align=center | {{Code|{{Param|nocat}}}}
| Prevent the template from adding category. Does not change anything visibly. Only use this if you want to preview the template.
| {{CodeBlock|margin=5px|<nowiki>{{Banned user|nocat=1}}</nowiki>}}
|}
|}


<includeonly>[[Category:Templates]][[Category:Userbox Templates]]</includeonly>
<includeonly>[[Category:Templates]][[Category:Userbox Templates]]</includeonly>

Latest revision as of 03:38, 30 August 2023

Edit-copy.png
This is a documentation subpage for Template:Userbox gender.
Don't forget to purge the contents of the base page upon creating or editing this subpage.

Userbox used for specifying the user's gender.

Note.pngNote:To change user gender automatically, go to your account Preferences > How do you prefer to be described? > Select Male or Female.
Or you can specify it manually below using parameters.

Translations

Icon-translate.png
This template uses a strings subpage
Please follow the format on this subpage(s) to add translations.

Copy and Paste

{{Userbox gender | enablecustomname = <yes/true> or <no/false> (default) | customname = <username on this wiki, without "User:" part. "enablecustomname" must be enabled first! Example: "Gabe Newell"> | gender = <auto/male/female/unspecified> }}

Parameters and Examples

Parameter Description Example Preview
{{{type}}} Default appearance, gender defaults to unspecified if not specified on User Preferences.
Username is set to {{PAGENAME}}, aka the user page that you are currently on.
None
⚧️

This user's gender is Unspecified.

{{{enablecustomname}}} and {{{customname}}} Enable and specify custom username. Most users may not have their gender specified in User Preferences.
| enablecustomname = <yes/true> or <no/false> (default)
User:Gabe Newell:
⚧️

This user's gender is Unspecified.


User:kr0tchet:
♂️

This user's gender is Male.

{{{gender}}} Manually set user gender without changing user preferences, and without specify custom username.
By default this is automatic based off user's preferences.
| gender = <auto/male/female/unspecified> (default is "auto")
Male:
♂️

This user's gender is Male.


Female:
♀️

This user's gender is Female.

{{{nocat}}} Prevent the template from adding category. Does not change anything visibly. Only use this if you want to preview the template.
{{Banned user|nocat=1}}