Vorlage:Internationalization template doc: Unterschied zwischen den Versionen
Vorlage:Internationalization template doc (Quelltext anzeigen)
Version vom 29. September 2021, 08:42 Uhr
, 08:42, 29. Sep. 2021this icon serves as an educational persiflage to show the ridiculousness of the "Law of 9/22"
Tt (Diskussion | Beiträge) K (1 Version importiert) |
StadtbahnBI>Sarang K (this icon serves as an educational persiflage to show the ridiculousness of the "Law of 9/22") |
||
Zeile 13: | Zeile 13: | ||
== Parameter #1 == | == Parameter #1 == | ||
* when no "="-sign occurs in the text | * Removing of an existing "1=" is forbidden, even if it is not necessary, see [[Special:Diff/592488152#removing_1=]] (the "Law of 9/22"). | ||
{{Mbox|type=stop|image=[[File:Do not remove 1=.svg|48px]]|text=Since 2021-09-22, due to a proposal of a subcompetent user who misinterprets documentation,<br>a new rule for Commons prohibits the removal of superfluous names from positional parameters.}} | |||
* when no free "="-sign occurs in the text the "1=" is obsolete. Not-free equal signs (inside of template transclusions) don't count. | |||
* without the "1=" but with one or more equal signs, <u>no parameter #1 can be detected</u>, and the error "parameter #1 is empty" is categorized. | * without the "1=" but with one or more equal signs, <u>no parameter #1 can be detected</u>, and the error "parameter #1 is empty" is categorized. | ||
* As another error, a ''superflous'' pipe "{{!}}" character converts it to the contrary: | * As another error, a ''superflous'' pipe "{{!}}" character converts it to the contrary: | ||
:* while e.g. <code><nowiki>{{en | some text | }}</nowiki></code> will be understood, | :* while e.g. <code><nowiki>{{en | some text | }}</nowiki></code> will be understood, | ||
:* <code><nowiki>{{en |1=some text | }}</nowiki></code> causes the same error "parameter #1 is empty". | :* <code><nowiki>{{en |1=some text | }}</nowiki></code> causes the same error "parameter #1 is empty". | ||
=== Required or necessary === | |||
When a parameter is <u>required</u> the template documentation expresses it with a line in the table, which left column shows the <code>parameter name</code>, then a textual description for the <code>parameter value</code>, and right (in this case) the code "required". | |||
*A named parameter '''needs''' to be specified by <code>name=</code>, which may as well be an alias, | |||
*a positional parameter is specified either by its position '''or''' by the positional number (e.g. 1=, 2=, 3=...). With other words: the ''parameter value'' is '''''required''''', the ''parameter name'' (= the number) is ''optional''; it is '''not ''required''''' and not even ''suggested'' but it becomes ''necessary'' (another thing than the un/requiredness in the sense of template documentation!) when (and <u>only</u> when) the parameter value string contains a "free equal sign" (an equal sign ''outside'' of another template). The positional number is also necessary when positional parameters are specified ''outside of their positional order''. | |||
|usage-notes = | |usage-notes = | ||
Zeile 39: | Zeile 45: | ||
|1 = 1 | |1 = 1 | ||
|1label = text | |1label = text | ||
|1d-en = Text to be displayed. Please prepend "1=" to the text, otherwise any "=" characters in the text will [[#Parameter #1|break the template]]. | |1d-en = Text to be displayed. Please prepend "1=" to the text, otherwise any free "=" characters in the text will [[#Parameter #1|break the template]]. | ||
|1d-td-en = Text to be displayed. <!-- TemplateData is used by tools which know wikitext better than most users. They should prepend the "1=" when needed, so if the user enters one manually, the result will be {{en|1=1=text}}... --> | |1d-td-en = Text to be displayed. <!-- TemplateData is used by tools which know wikitext better than most users. They should prepend the "1=" when needed, so if the user enters one manually, the result will be {{en|1=1=text}}... --> | ||
|1type = string | |1type = string | ||
|1default={{red|**error**}} | |||
|1stat = required | |1stat = required | ||