Կաղապար:This is a redirect

Վիքիպեդիայից՝ ազատ հանրագիտարանից
(Վերահղված է Կաղապար:Redrից)
Կաղապարի նկարագրություն

Purpose

This template is based on a proposal to standardize redirect templates (rcats). Its basic purpose is to simplify the process of tagging and categorizing redirects.

Protection levels are automatically detected by this template by use of {{pp-protected}} and {{pp-move}}. When edit protection or move protection (or both) is applied to a redirect that has been tagged with this template, the protection level is automatically detected, and the redirect will be tagged with a protection rcat and sorted to the appropriate protection-related category(ies). When protection is removed, then the protection-related rcats and category(ies) will also be (automatically) removed from the redirect.

Օգտագործման ձևը

Used by itself with no parameters ({{This is a redirect}} or {{Redr}}), the template will appear as above and will automatically sort the page into Կատեգորիա:Miscellaneous redirects. That category will also be populated if the first parameter is empty while rcats occupy the second, third, and so on. This is useful when an editor adds rcats and yet feels unsure that there may be at least one other rcat with category that may be used to tag the redirect. Those contributors who monitor the Miscellaneous redirects category will check these on an equable basis and decide if another rcat(s) is needed. Then the empty first parameter may be excluded by removing either the first or second pipe. That will remove the redirect from Category:Miscellaneous redirects. See below for more information.

This template may hold up to seven different redirect category (rcat) templates. The choices for editors are listed at Wikipedia:Template messages/Redirect pages both alphabetically and by function. Any of those rcats may be used either with their full name, e.g., R from alternative language, or with the omission of the first "R", as in from alternative language. The aliases (usually shortcut redirects) of any of the listed rcats may also be used, e.g., Ralterlang or in lower case, ralterlang. An rcat's aliases may be found in its documentation. So in the case of a redirect from a different language, the three basic choices are:

{{This is a redirect|R from alternative language}}
{{This is a redirect|from alternative language}}
{{This is a redirect|ralterlang}}

This template may be added to a redirect page in the following manner:

#ՎԵՐԱՀՂՈՒՄ [[(target page name)]]

{{This is a redirect||from short name|unprintworthy}}

Generally for good readability on the Edit screen, this template is placed on the third line of the redirect as follows:

#ՎԵՐԱՀՂՈՒՄ [[(target page name)]]
(please leave this line blank for emphasis and ease of reading by editors)
{{This is a redirect|from move|to section|printworthy}}

Apart from e1 through e7, which may be used to clarify the editor's choice of category(ies), other parameters are used as follows: The template transcludes whatever other template begins with "R ", followed by the parameter's text. For example:

{{This is a redirect|from airport code}}

...uses the rcat {{R from airport code}} and produces:

An error box may appear that will illustrate what happens if an editor uses an rcat in the wrong namespace. In addition to the error box, the redirect will not be sorted to the rcat's category; instead it will populate Կատեգորիա:Pages with templates in the wrong namespace!
Also note that the examples on this page automatically detect that this template named "This is a redirect" is a protected template – it can only be edited by template editors and administrators. If the documentation page is viewed or edited, the template-protected notice does not appear, because the documentation page is not protected from editing.

If a template beginning with "R " is not found (for example, {{R R from airport code}} does not exist), then the transcluded template is whatever template that has the same title as the exact text given, so {{This is a redirect|R from airport code}} produces the same result as {{This is a redirect|from airport code}} (it will work with or without the leading "R").

Up to seven rcat templates can be transcluded. Parameters e1 through e7 are optional explanations, which may be used to clarify why a redirect category applies in each particular case.

Օրինակ

{{This is a redirect
 |from airport code
  |e1=This airport code is rarely used any more.
 |from ambiguous page
  |e2=The ambiguity is disambiguated.
 |from London bus route
  |e3=(uhm, OK, this is not really a London bus route.)
 |from Unicode
  |e4=* You get the idea.  ''Up to seven of these e# parameters may be used – one for each different rcat.''
 |unprintworthy}}

produces:

Rcat parameters

In addition to this template's own seven parameters that allow it to hold up to seven different rcats, it accepts most or all of the parameters that rcats accept. Two types of rcat parameters will work in this template:

  • one unnamed parameter from each rcat, and
  • a second parameter from each rcat – the  2=  parameter.

This template will accept one optional unnamed parameter for each individual rcat used:

{{This is a redirect|from plural|p1=printworthy}}

This subdues the Unprintworthy redirects category to which {{R from plural}} defaults and populates the Printworthy redirects category instead. This template will hold up to seven rcats, so there are also seven respective "p" parameters, p1, p2, p3, ... p7. Which position the rcat holds will determine the "p" number to use:

{{This is a redirect|from move|mod|nick|ralterlang|p4=en|rcon|from plural|p6=printworthy}}

In the above example, "from plural" ({{R from plural}}) is the sixth and final rcat, so "p6" is used to make the redirect "printworthy". Since "ralterlang" ({{R from alternative language}}) holds the 4th position, "p4" is used for the ISO 639 code of the source language, in this case  en  for English.

Additionally, this template will accept the  2=  parameter (if there is one) from each rcat. This template uses  n#=  for any rcat's "2=" parameter. For example, if a redirect exists that is a misspelling of a title, it can be tagged with {{R from misspelling}} in the following manner:

{{Redr|from misspelling|p1=(correct spelling)|n1=printworthy}}

   Note:  if used by itself the template would appear like this:
   {{R from misspelling|(correct spelling)|2=printworthy}}

"Redr" is an alias or shortcut for this template and "p1" is the unnamed parameter described above, in this case the correct spelling. The "n1" parameter can be used when a second rcat parameter,  2= , is needed. Some misspellings may be helpful in a printed version of Wikipedia, so the second parameter in "R from misspelling" above is used to subdue its default "unprintworthy" sort, and the redirect will populate Կատեգորիա:Printworthy redirects instead. As with the p# parameters, there are seven n# parameters, n1, n2, n3, ... n7, one for each of the seven positions in this template ("typo" is an alias/shortcut for "from misspelling", as in "{{R typo}}"):

{{Redr|move|mod|typo|p3=(correct spelling)|n3=printworthy}}

An example of a "printworthy misspelling" can be found at {{R from misspelling}}.

Additional notes

The "to" parameter in this template that was used with {{R from alternative language}} has been deprecated. Use the n# parameter instead as follows:

{{Redr|ralterlang|p1=ja|n1=es}}

This code will sort a redirect into two categories:

This template's wiki markup that invokes the "to" parameter should stay in place until the remaining redirects that use that parameter in this template have been modified.

When used alone

There are two ways to sort a redirect into the Miscellaneous redirects category. When the Redr template is used without any rcats, it will perform the miscellaneous sort:

{{Redr}}...

Also, if one or more rcats are known, but an editor is unsure that there might be one or more other rcats that are needed, then leave the first parameter blank (type two pipes together → ||):

#ՎԵՐԱՀՂՈՒՄ [[(target page name)]]

{{Redr||printworthy}}

Monitors of the Miscellaneous redirects category will check the redirect, add other rcats if needed, and then exclude the empty first parameter by deleting one of the first two pipes.

Comparison

Template:This is a redirect/Comparison shows the difference in the appearance of text between when individual rcats are used and when this template is used.

Տես նաև

Կաղապար:R template index