Template:Uw/doc: Difference between revisions
More actions
m +explanation |
m +parm |
||
| Line 8: | Line 8: | ||
|2stat=optional- | |2stat=optional- | ||
|4=4 | |4=4 | ||
|4d= | |4d= + or - to precede the user name with the namespace <code>{{ns:2}}:</code> | ||
:'''+''' ("plus" sign) to make <tt>User:</tt> a part of the link, | |||
:'''-''' ("minus" sign) to precede <tt>User:</tt> as plain text;<br> | |||
(if ''both'' signs are specified, "+" is used and "-" is ignored)<br> | |||
The +/- parameter can as well be specified with parameter 2 or 3. | |||
|4def= | |||
|4stat=optional- | |4stat=optional- | ||
|5=link | |5=link | ||
|5d | |5d=specify <code>link=no</code> to suppress the link | ||
|5stat=optional- | |5stat=optional- | ||
|name={{ | |6={{0}} | ||
|6d=<br>''more parameters to format the namespace (when "+" or "-" is specified)'' | |||
: <small>» not every possible combination of parameter values is useful «</small> | |||
|6def={{0}} | |||
|6stat=optional- | |||
|7=case | |||
|7d=for formatting of the namespace: | |||
* <code>case=l</code> display "{{lcfirst:{{ns:2}}}}" instead of "{{ns:2}}" | |||
* <code>case=i</code> display the national translation, in general a link | |||
* <code>case=n</code> display the national translation without linking it | |||
|7stat=optional- | |||
|8=lang | |||
|8d=an {{W|ISO 630-1|ISO 639}} language code, to follow another translation then yours | |||
:when parameter setting is <tt>case=i</tt> or <tt>case=n</tt> | |||
|8def={{int:lang}} | |||
|8stat=optional- | |||
|name=<includeonly>{{PAGENAME}}</includeonly><noinclude>U</noinclude> | |||
|desc=<big>User page link</big>, only within Commons, when user names are trailed with "~commonswiki" | |desc=<big>User page link</big>, only within Commons, when user names are trailed with "~commonswiki" | ||
|namespace= | |namespace= | ||
| Line 33: | Line 54: | ||
__NOTOC__ | __NOTOC__ | ||
==== More examples ==== | ==== More examples ==== | ||
{{Tle|t=Uw|Username|-}} gives {{Uw|Username|-}} <br> | {{Tle|t=Uw|Username|-}} gives {{Uw|Username|-}} <br> | ||
{{Tle|t=Uw|Username|+}} gives {{Uw|Username|+}} <br> | {{Tle|t=Uw|Username|+}} gives {{Uw|Username|+}} <br> | ||
{{Tle|t=Uw|Username|commons|-}} gives {{Uw|Username|commons|-}} <br> | {{Tle|t=Uw|Username|commons|-}} gives {{Uw|Username|commons|-}} <br> | ||
{{Tle|t=Uw|User|Comm~user|-|p4=link|no}} gives {{Uw|Username|Comm~user|-|link=no}} <br> | {{Tle|t=Uw|User|Comm~user|-|p4=link|no}} gives {{Uw|Username|Comm~user|-|link=no}} <br> | ||
{{Tle|t=Uw|User|Comm~user|-|p4=link|no|p5=case|l}} gives {{Uw|Username|Comm~user|-|link=no|case=l}} <br> | {{Tle|t=Uw|User|Comm~user|-|p4=link|no|p5=case|l}} gives {{Uw|Username|Comm~user|-|link=no|case=l}} <br> | ||
{{namespace/display|t=<includeonly>{{PAGENAME}}</includeonly><noinclude>Uw</noinclude> | |||
|name=username|par2=~commonswiki}} | |||
{{Commons:Link templates/User and user talk links}} | {{Commons:Link templates/User and user talk links}} | ||
Revision as of 17:28, 29 May 2019
User page link, only within Commons, when user names are trailed with "~commonswiki"
Usage
{{U |1= }}
Template parameters
| Parameter | Description | Default | Status | |
|---|---|---|---|---|
1 | user name, without the trailing "~commonswiki" | empty | required | |
2 | display name (nick name): may be formatted | param #1 | optional | |
4 | + or - to precede the user name with the namespace User:
(if both signs are specified, "+" is used and "-" is ignored) | empty | optional | |
link | specify link=no to suppress the link | empty | optional | |
| more parameters to format the namespace (when "+" or "-" is specified)
| optional | ||
case | for formatting of the namespace:
| empty | optional | |
lang | an ISO 639 language code, to follow another translation then yours
| en | optional | |
Additional information
The template is intended to be used in the following namespaces: no namespace specified
The template is intended to be used by the following user groups: no user group specified
Example
{{U|Username}}
renders as:
Localization
This template is not intended to be localized.
More examples
{{ Uw | Username | - }} gives User:Username
{{ Uw | Username | + }} gives User:Username
{{ Uw | Username | commons | - }} gives User:commons
{{ Uw | User | Comm~user | - | link = no }} gives User:Comm~user
{{ Uw | User | Comm~user | - | link = no | case = l }} gives user:Comm~user
| Table: different displays for {{Uw}} with the namespace option | |
|---|---|
| {{ Uw | username }} this is the standard | username |
| {{ Uw | username | - }} | User:username |
| {{ Uw | username | - | case = l }} | user:username |
| {{ Uw | username | - | case = i }} | LangSwitch Error: no default:username |
| {{ Uw | username | - | case = n }} | user:username |
| {{ Uw | username | + }} | User:username |
| {{ Uw | username | + | case = l }} | user:username |
| {{ Uw | username | + | case = i }} | user:username |
| {{ Uw | username | + | case = n }} | user:username |
| {{ Uw | username | link = n }} | username |
| {{ Uw | username | - | link = n }} | User:username |
| {{ Uw | username | - | link = n | case = l }} | user:username |
| {{ Uw | username | - | link = n | case = i }} | LangSwitch Error: no default:username |
| {{ Uw | username | - | link = n | case = n }} | user:username |
| {{ Uw | username | + | link = n }} | User:username |
| {{ Uw | username | + | link = n | case = l }} | user:username |
| {{ Uw | username | + | link = n | case = i }} | LangSwitch Error: no default:username |
| {{ Uw | username | + | link = n | case = n }} | user:username |
{{Commons:Link templates/User and user talk links}}