Template:Uw: Difference between revisions
More actions
m typo |
m test |
||
| Line 1: | Line 1: | ||
<includeonly>{{#switch:-|{{{1|}}}|{{{2|}}}|{{{3|}}}|{{{4|}}}={{#switch: | <includeonly>{{#switch:+|{{{1|}}}|{{{2}}}|{{{3}}}|{{{4}}}=|{{#switch:-|{{{1|}}}|{{{2|}}}|{{{3|}}}|{{{4|}}}={{ucfirst:{{I18n/namespace|u|link=no}}}}:|{{#switch:~|{{{1|}}}|{{{2|}}}|{{{3|}}}|{{{4|}}}={{lcfirst:{{I18n/namespace|u|link=no}}}}:}}}}}}<!-- | ||
-->{{#ifeq:{{{link}}}|no|­{{#switch:{{{2|}}}|+|-|={{PAGENAME:{{{1<noinclude>|User</noinclude>}}}}}|{{{2}}}}}<!-- | -->{{#ifeq:{{{link}}}|no|­{{#switch:{{{2|}}}|+|-|~|={{PAGENAME:{{{1<noinclude>|User</noinclude>}}}}}|{{{2}}}}}<!-- | ||
-->|{{#if:{{{1|}}}|[[:User{{#switch:t|{{lc:{{{2}}}}}|{{lc:{{{3}}}}}<!-- | -->|{{#if:{{{1|}}}|[[:User{{#switch:t|{{lc:{{{2}}}}}|{{lc:{{{3}}}}}<!-- | ||
-->|{{lc:{{{4}}}}}= talk}}:{{{1}}}~commonswiki{{!}}{{#switch:+|{{{2}}}|{{{3}}}|{{{4}}}={{ucfirst:{{I18n/namespace|u|link=no}}}}:}}<!-- | -->|{{lc:{{{4}}}}}= talk}}:{{{1}}}~commonswiki{{!}}{{#switch:+|{{{2}}}|{{{3}}}|{{{4}}}={{ucfirst:{{I18n/namespace|u|link=no}}}}:}}<!-- | ||
-->{{#if:{{{2|}}}|{{#switch:{{{2}}}|T|t|+|-={{{1}}}|{{{2}}}}}|{{{1}}}}}]]}}<!-- | -->{{#if:{{{2|}}}|{{#switch:{{{2}}}|T|t|+|-|~={{{1}}}|{{{2}}}}}|{{{1}}}}}]]}}<!-- | ||
-->|<span style="font-weight:900;background:#FF8;color:#F00"> ''no name<!-- | -->|<span style="font-weight:900;background:#FF8;color:#F00"> ''no name<!-- | ||
-->{{#ifeq:{{NAMESPACENUMBER}}|10||[[Category:Commons:Missing user name in template Uw|{{PAGENAME}}]] |.}}''<!-- | -->{{#ifeq:{{NAMESPACENUMBER}}|10||[[Category:Commons:Missing user name in template Uw|{{PAGENAME}}]] |.}}''<!-- | ||
Revision as of 12:55, 23 May 2019
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
{{Uw |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
{{Uw|Example}}
renders as:
Localization
This template is not intended to be localized.
More examples
{{ Uw | Example }} gives Example (User:Example~commonswiki)
{{ Uw | Example | w:en }} gives Example (w:en:User:Example~enwiki)
{{ Uw | Example | - }} gives User:Example
{{ Uw | Example | + }} gives User:Example
{{ Uw | Example | commons | - }} gives User:commons
{{ Uw | Example | Comm~user | - | link = no }} gives User:Comm~user
{{ Uw | Example | Comm~user | - | link = no | case = l }} gives User:Comm~user
{{ Uw | User | Spain~user | w:es | - | case = i | i18n = es }} gives User:Spain~user
| Table: different displays for {{Uw}} with the namespace option | |
|---|---|
| {{ Uw | Example }} this is the standard | Example |
| {{ Uw | Example | - }} | User:Example |
| {{ Uw | Example | - | case = l }} | User:Example |
| {{ Uw | Example | - | case = i }} | User:Example |
| {{ Uw | Example | - | case = n }} | User:Example |
| {{ Uw | Example | + }} | User:Example |
| {{ Uw | Example | + | case = l }} | User:Example |
| {{ Uw | Example | + | case = i }} | User:Example |
| {{ Uw | Example | + | case = n }} | User:Example |
| {{ Uw | Example | link = n }} | Example |
| {{ Uw | Example | - | link = n }} | User:Example |
| {{ Uw | Example | - | link = n | case = l }} | User:Example |
| {{ Uw | Example | - | link = n | case = i }} | User:Example |
| {{ Uw | Example | - | link = n | case = n }} | User:Example |
| {{ Uw | Example | + | link = n }} | User:Example |
| {{ Uw | Example | + | link = n | case = l }} | User:Example |
| {{ Uw | Example | + | link = n | case = i }} | User:Example |
| {{ Uw | Example | + | link = n | case = n }} | User:Example |
[ ] {{Commons:Link templates/User and user talk links}}