Difference between revisions of "Module:Distinguish"

From blackwiki
Jump to navigation Jump to search
test>Shirayuki
(add label N parameters)
test>Wladek92
(add a 'usage' section)
Line 19: Line 19:
 
}}<noinclude><!-- splitting these lines causes {{Documentation}} template to terminate green shading when Distinguish is used in /doc pages. -->
 
}}<noinclude><!-- splitting these lines causes {{Documentation}} template to terminate green shading when Distinguish is used in /doc pages. -->
 
{{Documentation|content=
 
{{Documentation|content=
 +
 +
<translate>
 +
== Usage ==
 +
 +
<tvar|1>{{tlx|Distinguish}}</> is used to create [[w:Wikipedia:Hatnote|hatnotes]] to warn about possible confusion with a small number of other, related, titles at the '''top''' of [[w:Help:Section|article sections]] according to [[w:Wikipedia:Layout|Wikipedia:Layout]].
 +
 +
It is not for use in the "See also" ''section'' at the bottom of an article.
 +
</translate>
 +
 +
{{Tlx|Distinguish|<translate>Article 1</translate>|...|''<translate>Article 4</translate>''|''<translate>label 1{{=}}label1</translate>''|...|''<translate>label 4{{=}}label4</translate>''}}
 +
 +
<translate>
 +
* One to four articles can be listed.</translate>
 +
<translate>
 +
* The word "or" is always placed between the final two entries when displayed.</translate>
 +
<translate>
 +
* If more than 4 entries are supplied, a message will be displayed pointing out the problem.</translate><!-- this is relatively ungraceful failure -->
 +
<translate>
 +
* You can use parameters label 1 to label 4 to specify alternative labels for the links.
 +
</translate>
 +
:<translate>Adding newline characters will break article links.</translate> <!-- presumably because of the leading ":" -->
  
 
<translate>
 
<translate>

Revision as of 09:50, 5 April 2020


50px Module documentation

Usage

{{Distinguish}} is used to create hatnotes to warn about possible confusion with a small number of other, related, titles at the top of article sections according to Wikipedia:Layout.

It is not for use in the "See also" section at the bottom of an article.

{{Distinguish|Article 1|...|Article 4|label 1=label1|...|label 4=label4}}
  • One to four articles can be listed.
  • The word "or" is always placed between the final two entries when displayed.
  • If more than 4 entries are supplied, a message will be displayed pointing out the problem.
  • You can use parameters label 1 to label 4 to specify alternative labels for the links.
Adding newline characters will break article links.

Examples

Lua error at line 1: unexpected symbol near '<'.

Lua error at line 1: unexpected symbol near '<'.

Lua error at line 1: unexpected symbol near '<'.

Lua error at line 1: unexpected symbol near '<'.

Lua error at line 1: unexpected symbol near '<'.

  • {{Distinguish|article1|article2|label 1=label1|label 2=label2}}

Lua error at line 1: unexpected symbol near '<'.