Template:Wikidata redirect/doc: Difference between revisions

no edit summary
m (1 revision imported)
imported>Nagsb
No edit summary
 
Line 2: Line 2:
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
{{hatnote|See Phabricator ticket {{phabricator|T54564}}}}
{{hatnote|See Phabricator ticket {{phabricator|T54564}}}}
{{High-use}}
{{Substitution|not|and yet, unlike other rcats, this template may be used to tag and categorize [[Wikipedia:Soft redirects|soft redirects]]}}
{{Substitution|not|and yet, unlike other rcats, this template may be used to tag and categorize [[Wikipedia:Soft redirects|soft redirects]]}}
{{hatnote|This rcat should not be converted to the "{{tl|Redirect template}}". In accord with that template's documentation, such a conversion would make this template unstable for use on soft redirects.}}
{{hatnote|This rcat should not be converted to the "{{tl|Redirect template}}". In accord with that template's documentation, such a conversion would make this template unstable for use on soft redirects.}}
Line 8: Line 7:
=== Usage ===
=== Usage ===
{{hatnote|Use this rcat template in '''any [[wp:namespace|namespace]]'''.}}
{{hatnote|Use this rcat template in '''any [[wp:namespace|namespace]]'''.}}
* This special redirect category ([[wp:RCAT|rcat]]) template populates {{Cat|Wikidata redirects}}. It is "special" because at present it is the only rcat that may be used to tag and categorize [[Wikipedia:Soft redirects|soft redirects]].  While similar to {{tl|Wiktionary redirect}}, that template is ''only'' used on soft redirects, while ''Wikidata redirect'' may be used on all redirects.  Add this rcat to a redirect in the following manner:
* This special redirect category ([[wp:RCAT|rcat]]) template populates {{Cat|Soft redirects connected to a Wikidata item}}. It is "special" because it is used ''only'' to tag [[Wikipedia:Soft redirects|soft redirects]] that are connected to [[Wikidata]] items. To tag hard redirects that are connected to Wikidata, use the {{t|R with Wikidata item}} rcat template.
<pre>
#REDIRECT [[(target page name)]]
 
{{Wikidata redirect}}
</pre>
: This is in accord with instructions found at [[Wikipedia:REDCAT]].
 
: A typical soft redirect may appear as:
: A typical soft redirect may appear as:
<pre>
<pre>
Line 22: Line 14:
{{Wikidata redirect}}
{{Wikidata redirect}}
</pre>
</pre>
* Use this rcat on all redirects in any namespace, hard and soft, from titles that are used as connections to other Wikimedia projects. See the category for examples.
* Use this rcat on all soft redirects in any namespace from titles that are used as connections to other Wikimedia projects. See the category for examples.
* Note that the {{tl|Redirect category shell}} (Rcat shell) template is not used on soft redirects, so ''this rcat template should only be used without the Rcat shell template''.


==== Parameter ====
==== Parameter ====
This rcat takes one unnamed parameter, {{para|1}}, that may be used when a Wikidata "Q" number does not readily fill in, and you know that it exists on Wikidata. An example would be as follows:
This rcat takes one unnamed parameter, {{para|1}}, that may be used when a Wikidata "Q" number does not readily fill in, and you know that it exists on Wikidata. An example would be as follows:
<pre>
<pre>
#REDIRECT [[Duval (surname)]]
{{wiktionary redirect|Duval (surname)}}


{{Wikidata redirect|21491525}}
{{Wikidata redirect|21491525}}
Line 33: Line 26:
...where the number on Wikidata is '''[[Wikidata:Q21491525|Q21491525]]'''.
...where the number on Wikidata is '''[[Wikidata:Q21491525|Q21491525]]'''.


==== Usage note ====
{{info|heading=Technical note|style=background:#E8F8F5;|This template will automatically enter the item number if the soft redirect title is on Wikidata ''and is linked from that page''. Any editor who is familiar with Wikidata can link to a soft redirect from Wikidata.}}
The {{tl|Redirect category shell}} template (Rcat shell) is not meant to be used on soft redirects, so it should not be used to apply this template to soft redirects. It may be used to apply this template to hard redirects in the following manner:
<pre>
#REDIRECT [[(target page name)]]


{{Rcat shell|
{{Wikidata redirect}}
}}
</pre>
: Template {{tl|Rcat shell}} is an alias for the ''Redirect category shell'' template, which may be used to add as many appropriate rcats as needed, usually from one to seven, along with their parameters, to a redirect.  For more information see the documentation on its template page.
==== Aliases ====
==== Aliases ====
* <span class="plainlinks">[{{fullurl:Special:WhatLinksHere/Template:Wikidata_redirect|hidetrans=1&hidelinks=1&limit=500}} Also known as...]</span> – list of templates that redirect here and may also be used
* <span class="plainlinks">[{{fullurl:Special:WhatLinksHere/Template:Wikidata_redirect|hidetrans=1&hidelinks=1&limit=500}} Also known as...]</span> – list of templates that redirect here and may also be used


=== Error detection ===
=== Error detection ===
This template automatically places redirects that are not linked to Wikidata items in the tracking category [[:Category:Unlinked Wikidata redirects]]. Please fix these, either by removing {{t|Wikidata redirect}} or by linking them to Wikidata (temporarily break the redirect, then add as a sitelink on Wikidata, then fix the redirect).
This template automatically places redirects that are not linked to Wikidata items in the tracking category [[:Category:Unlinked Wikidata redirects]]. Please fix these, either by removing {{t|Wikidata redirect}} or by linking them to Wikidata.


=== Printworthiness ===
=== Printworthiness ===
Line 55: Line 40:
:* {{tlx|R unprintworthy}}
:* {{tlx|R unprintworthy}}
: Please click on each one for more details and guidance.
: Please click on each one for more details and guidance.
* On hard redirects (never on soft redirects), template {{tl|Redirect category shell}} will accept these rcats just like any other.
:: '''Examples:'''
:: '''Examples:'''
<pre>
<pre>
{{Rcat shell|
{{Wikidata redirect}}
{{Wikidata redirect}}
{{R printworthy}}
{{R printworthy}}
}}
</pre>
 
:or
{{Rcat shell|
<pre>
{{Wikidata redirect}}
{{Wikidata redirect}}
{{R unprintworthy}}
{{R unprintworthy}}
}}
</pre>
</pre>
: Either {{tl|Redirect category shell}} or its alias/shortcut, {{tl|Rcat shell}}, may be used.


=== See also ===
=== See also ===
* [[Wikipedia:WikiProject Redirect/Style guide|WikiProject Redirect/Style guide]]
* [[Wikipedia:WikiProject Redirect/Style guide|WikiProject Redirect/Style guide]]
===TemplateData===
{{TemplateData header}}
<templatedata>
{ "description": "Marks a redirect as a soft Wikidata redirect. Populates [[:Category:Soft redirects connected to a Wikidata item]].",
  "params": { "1":
              { "label":      "Item number",
                "description": "Set to 'Q#' or simply '#' to link to the Wikidata item if it is not found automatically by the template.",
                "type":        "string",
                "required":    false
              }
            }
}
</templatedata>


{{R template index}}
{{R template index}}
Line 78: Line 73:
<!-- Categories below this line, please; interwikis at Wikidata -->
<!-- Categories below this line, please; interwikis at Wikidata -->
[[Category:Redirect templates|Wikidata redirect]]
[[Category:Redirect templates|Wikidata redirect]]
[[Category:Templates for soft redirects]]
[[Category:Transwiki templates]]
[[Category:Wikidata templates]]
[[Category:Wikidata templates]]
[[Category:Wikidata redirects| ]]
}}</includeonly><noinclude>
}}</includeonly><noinclude>
[[Category:Rcat template documentation pages|Wikidata redirect]]
[[Category:Rcat template documentation pages|Wikidata redirect]]
</noinclude>
</noinclude>
Anonymous user