Template:Uw/doc: Difference between revisions
More actions
m +explanation |
m Fix Linter errors. |
||
| Line 14: | Line 14: | ||
|4=4 | |4=4 | ||
|4d= + or - to precede the user name with the namespace <code>{{ns:2}}:</code> | |4d= + or - to precede the user name with the namespace <code>{{ns:2}}:</code> | ||
:'''+''' ("plus" sign) to make < | :'''+''' ("plus" sign) to make <code>User:</code> a part of the link, | ||
:'''-''' ("minus" sign) to precede < | :'''-''' ("minus" sign) to precede <code>User:</code> as plain text;<br /> | ||
(if ''both'' signs are specified, "+" is used and "-" is ignored)<br> | (if ''both'' signs are specified, "+" is used and "-" is ignored)<br /> | ||
The +/- parameter can as well be specified with parameter 2 or 3. | The +/- parameter can as well be specified with parameter 2 or 3. | ||
|4def= | |4def= | ||
| Line 26: | Line 26: | ||
|6={{0}} | |6={{0}} | ||
|6d=<br>''more parameters to format the namespace (when "+" or "-" is specified)'' | |6d=<br />''more parameters to format the namespace (when "+" or "-" is specified)'' | ||
: <small>» not every possible combination of parameter values is useful «</small> | : <small>» not every possible combination of parameter values is useful «</small> | ||
|6def={{0}} | |6def={{0}} | ||
| Line 38: | Line 38: | ||
|8=i18n | |8=i18n | ||
|8d=an {{W|ISO 630-1|ISO 639}} language code, to follow another translation then yours | |8d=an {{W|ISO 630-1|ISO 639}} language code, to follow another translation then yours | ||
:when parameter setting is < | :when parameter setting is <code>case=i</code> or <code>case=n</code> | ||
|8def={{int:lang}} | |8def={{int:lang}} | ||
|8stat=optional- | |8stat=optional- | ||
|name=<includeonly>{{PAGENAME}}</includeonly><noinclude>U</noinclude> | |name=<includeonly>{{PAGENAME}}</includeonly><noinclude>U</noinclude> | ||
|desc=<big>User page link</big>, {{Nobold|within Commons when user names are trailed with "~commonswiki"}}<br> | |desc=<big>User page link</big>, {{Nobold|within Commons when user names are trailed with "~commonswiki"}}<br /> | ||
{{Nobold|in other wikipedias when user names are trailed with "~××wiki" (×× for the ISO 639 language code)}} | {{Nobold|in other wikipedias when user names are trailed with "~××wiki" (×× for the ISO 639 language code)}} | ||
|namespace= | |namespace= | ||
| Line 61: | Line 61: | ||
==== More examples ==== | ==== More examples ==== | ||
{{Tle|t=Uw|Username}} gives {{Uw|Username}} (<code><nowiki>User:Username~commonswiki</nowiki></code>)<br> | {{Tle|t=Uw|Username}} gives {{Uw|Username}} (<code><nowiki>User:Username~commonswiki</nowiki></code>)<br /> | ||
{{Tle|t=Uw|Username||en}} gives {{Uw|Username||en}} (<code><nowiki>en:User:Username~enwiki</nowiki></code>)<br> | {{Tle|t=Uw|Username||en}} gives {{Uw|Username||en}} (<code><nowiki>en:User:Username~enwiki</nowiki></code>)<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|+}} 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|Username|Comm~user|-|p4=link|no}} gives {{Uw|Username|Comm~user|-|link=no}} <br> | {{Tle|t=Uw|Username|Comm~user|-|p4=link|no}} gives {{Uw|Username|Comm~user|-|link=no}} <br /> | ||
{{Tle|t=Uw|Username|Comm~user|-|p4=link|no|p5=case|l}} gives {{Uw|Username|Comm~user|-|link=no|case=l}}<br> | {{Tle|t=Uw|Username|Comm~user|-|p4=link|no|p5=case|l}} gives {{Uw|Username|Comm~user|-|link=no|case=l}}<br /> | ||
{{Tle|t=Uw|User|Spain~user|es|-|p5=case|i|p6=i18n|es}} gives {{Uw|User|Spain~user|es|-|case=i|i18n=es}} | {{Tle|t=Uw|User|Spain~user|es|-|p5=case|i|p6=i18n|es}} gives {{Uw|User|Spain~user|es|-|case=i|i18n=es}} | ||
==== Language code exampless ==== | ==== Language code exampless ==== | ||
<nowiki>{{Uw|Willy on Wheels}}</nowiki> gives {{Uw|Willy on Wheels}}<br> | <nowiki>{{Uw|Willy on Wheels}}</nowiki> gives {{Uw|Willy on Wheels}}<br /> | ||
<nowiki>{{Uw|Willy on Wheels||}}</nowiki> gives {{Uw|Willy on Wheels||}}<br> | <nowiki>{{Uw|Willy on Wheels||}}</nowiki> gives {{Uw|Willy on Wheels||}}<br /> | ||
<nowiki>{{Uw|Willy on Wheels|WoW}}</nowiki> gives {{Uw|Willy on Wheels|WoW}}<br> | <nowiki>{{Uw|Willy on Wheels|WoW}}</nowiki> gives {{Uw|Willy on Wheels|WoW}}<br /> | ||
<nowiki>{{Uw|Willy on Wheels|WoW|}}</nowiki> gives {{Uw|Willy on Wheels|WoW|}}<br> | <nowiki>{{Uw|Willy on Wheels|WoW|}}</nowiki> gives {{Uw|Willy on Wheels|WoW|}}<br /> | ||
<nowiki>{{Uw|Willy on Wheels|WoW|et}}</nowiki> gives {{Uw|Willy on Wheels|WoW|et}}<br> | <nowiki>{{Uw|Willy on Wheels|WoW|et}}</nowiki> gives {{Uw|Willy on Wheels|WoW|et}}<br /> | ||
<nowiki>{{Uw|Willy on Wheels||et}}</nowiki> gives {{Uw|Willy on Wheels||et}}<br> | <nowiki>{{Uw|Willy on Wheels||et}}</nowiki> gives {{Uw|Willy on Wheels||et}}<br /> | ||
<small>{{Lua|Module:LangSwitch}}</small> | <small>{{Lua|Module:LangSwitch}}</small> | ||
Revision as of 17:14, 11 November 2022
User page link, within Commons when user names are trailed with "~commonswiki"
in other wikipedias when user names are trailed with "~××wiki" (×× for the ISO 639 language code)
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 | |
3 | ISO 639 language code; If absent: ~commonswiki | empty | 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:commonswiki
| empty | optional | |
i18n | 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 Username (User:Username~commonswiki)
{{ Uw | Username | en }} gives Username (en:User:Username~enwiki)
{{ Uw | Username | - }} gives User:Username
{{ Uw | Username | + }} gives User:Username
{{ Uw | Username | commons | - }} gives User:commons
{{ Uw | Username | Comm~user | - | link = no }} gives User:Comm~user
{{ Uw | Username | Comm~user | - | link = no | case = l }} gives user:Comm~user
{{ Uw | User | Spain~user | es | - | case = i | i18n = es }} gives LangSwitch Error: no default:Spain~user
Language code exampless
{{Uw|Willy on Wheels}} gives Willy on Wheels
{{Uw|Willy on Wheels||}} gives Willy on Wheels
{{Uw|Willy on Wheels|WoW}} gives WoW
{{Uw|Willy on Wheels|WoW|}} gives WoW
{{Uw|Willy on Wheels|WoW|et}} gives WoW
{{Uw|Willy on Wheels||et}} gives Willy on Wheels
| 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}}