Difference between revisions of "Template:IPA link/testcases"

From blackwiki
Jump to navigation Jump to search
imported>DePiep
imported>Jonesey95
m (Fix Linter errors using AutoEd)
 
(5 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
{{template test cases notice}}
 
{{template test cases notice}}
{{Documentation subpage}}
 
  
=== Usage ===
 
 
'''First parameter''' or '''<code>ipa symbol=</code>''' (required): Any IPA symbol, or its IPA number.
 
'''First parameter''' or '''<code>ipa symbol=</code>''' (required): Any IPA symbol, or its IPA number.
* {{tlx|IPAlink|m}} &rarr; {{IPAlink|m}}
+
{| class="wikitable"
* {{tlx|IPAlink|ɡb}} &rarr; {{IPAlink|ɡb}}
+
|-
* {{tlx|IPAlink|301}} &rarr; {{IPAlink|301}}
+
! Code !! Live !! Sandbox
 +
|-
 +
| {{tlx|IPA link|m}} || {{../|m}} || {{../sandbox|m}}
 +
|-
 +
| {{tlx|IPA link|ɡb}} || {{../|ɡb}} || {{../sandbox|ɡb}}
 +
|-
 +
| {{tlx|IPA link|301}} || {{../|301}} || {{../sandbox|301}}
 +
|}
  
 
;Label
 
;Label
'''<code>label=</code>''', or 2nd, 3rd parameter, changes the label of the wikilink.  
+
'''<code>label=</code>''', or 2nd, 3rd parameter, changes the label of the wikilink.
* {{tlx|IPAlink|m<nowiki>|label=Any text</nowiki>}} &rarr; {{IPAlink|m|label=Any text}}
+
{| class="wikitable"
* {{tlx|IPAlink|m<nowiki>|Any text2</nowiki>}} &rarr; {{IPAlink|m|Any text2}}
+
|-
* {{tlx|IPAlink|m<nowiki>||Any text3</nowiki>}} &rarr; {{IPAlink|m||Any text3}}
+
! Code !! Live !! Sandbox
* {{tlx|IPAlink|ɡb<nowiki>|label=</nowiki>}} &rarr; {{IPAlink|ɡb|label=}}
+
|-
 
+
| {{tlx|IPA link|m<nowiki>|label=Any text</nowiki>}} || {{../|m|label=Any text}} || {{../sandbox|m|label=Any text}}
 
+
|-
* {{tlx|IPAlink|m<nowiki>||label=Any text</nowiki>}} &rarr; {{IPAlink|m||label=Any text}}
+
| {{tlx|IPA link|m<nowiki>|Any text2</nowiki>}} || {{../|m|Any text2}} || {{../sandbox|m|Any text2}}
* {{tlx|IPAlink|m<nowiki>||Any text3</nowiki>}} &rarr; {{IPAlink|m||Any text3}}
+
|-
* {{tlx|IPAlink|ɡb<nowiki>||label=</nowiki>}} &rarr; {{IPAlink|ɡb||label=}}
+
| {{tlx|IPA link|m<nowiki>||Any text3</nowiki>}} || {{../|m||Any text3}} || {{../sandbox|m||Any text3}}
 +
|-
 +
| {{tlx|IPA link|ɡb<nowiki>|label=</nowiki>}} || {{../|ɡb|label=}} || {{../sandbox|ɡb|label=}}
 +
|}
 +
{| class="wikitable"
 +
|-
 +
! Code !! Live !! Sandbox
 +
|-
 +
| {{tlx|IPA link|m<nowiki>||label=Any text</nowiki>}} || {{../|m||label=Any text}} || {{../sandbox|m||label=Any text}}
 +
|-
 +
| {{tlx|IPA link|m<nowiki>||Any text3</nowiki>}} || {{../|m||Any text3}} || {{../sandbox|m||Any text3}}
 +
|-
 +
| {{tlx|IPA link|ɡb<nowiki>||label=</nowiki>}} || {{../|ɡb||label=}} || {{../sandbox|ɡb||label=}}
 +
|}
  
 
;Brackets
 
;Brackets
 
* '''<code>bracket=</code>''', or 2nd or 3rd parameter: set IPA bracket. Options are: <code>/ [ < (none)</code>. Default is none.
 
* '''<code>bracket=</code>''', or 2nd or 3rd parameter: set IPA bracket. Options are: <code>/ [ < (none)</code>. Default is none.
;2nd parameter:
+
:;2nd parameter:
* {{tlx|IPAlink|m<nowiki>|<</nowiki>}} &rarr; {{IPAlink|m|<}}
+
{| class="wikitable"
* {{tlx|IPAlink|301<nowiki>|<</nowiki>}} &rarr; {{IPAlink|301|<}}
+
|-
* {{tlx|IPAlink|m<nowiki>|[</nowiki>}} &rarr; {{IPAlink|m|[}}
+
! Code !! Live !! Sandbox
* {{tlx|IPAlink|ɡb<nowiki>|[</nowiki>}} &rarr; {{IPAlink|ɡb|[}}
+
|-
* {{tlx|IPAlink|ɡb<nowiki>|/</nowiki>}} &rarr; {{IPAlink|ɡb|/}}
+
| {{tlx|IPA link|m<nowiki>|<</nowiki>}} || {{../|m|<}} || {{../sandbox|m|<}}
;3rd parameter:
+
|-
* {{tlx|IPAlink|m<nowiki>||<</nowiki>}} &rarr; {{IPAlink|m||<}}
+
| {{tlx|IPA link|301<nowiki>|<</nowiki>}} || {{../|301|<}} || {{../sandbox|301|<}}
* {{tlx|IPAlink|301<nowiki>||<</nowiki>}} &rarr; {{IPAlink|301||<}}
+
|-
* {{tlx|IPAlink|m<nowiki>||[</nowiki>}} &rarr; {{IPAlink|m||[}}
+
| {{tlx|IPA link|m<nowiki>|[</nowiki>}} || {{../|m|[}} || {{../sandbox|m|[}}
* {{tlx|IPAlink|ɡb<nowiki>||[</nowiki>}} &rarr; {{IPAlink|ɡb||[}}
+
|-
* {{tlx|IPAlink|ɡb<nowiki>||/</nowiki>}} &rarr; {{IPAlink|ɡb||/}}
+
| {{tlx|IPA link|ɡb<nowiki>|[</nowiki>}} || {{../|ɡb|[}} || {{../sandbox|ɡb|[}}
 
+
|-
;2nd/3rd parameter, the other one as label:
+
| {{tlx|IPA link|ɡb<nowiki>|/</nowiki>}} || {{../|ɡb|/}} || {{../sandbox|ɡb|/}}
* {{tlx|IPAlink|m<nowiki>|two-label|<</nowiki>}} &rarr; {{IPAlink|m|two-label|<}}
+
|}
* {{tlx|IPAlink|301<nowiki>|2=two-label|<</nowiki>}} &rarr; {{IPAlink|301|2=two-label|3=<}}
 
* {{tlx|IPAlink|301<nowiki>|2=two-label|3=<</nowiki>}} &rarr; {{IPAlink|301|2=two-label|3=<}}
 
 
 
 
 
* {{tlx|IPAlink|m<nowiki>|[|three-label</nowiki>}} &rarr; {{IPAlink|m|[|three-label}}
 
* {{tlx|IPAlink|ɡb<nowiki>|[</nowiki>|three-label}} &rarr; {{IPAlink|ɡb|[|three-label}}
 
* {{tlx|IPAlink|ɡb<nowiki>|/|label=named-label</nowiki>}} &rarr; {{IPAlink|ɡb|/|label=named-label}}
 
 
 
;2nd/3rd parameter label, no bracket:
 
* {{tlx|IPAlink|m<nowiki>|two-label</nowiki>}} &rarr; {{IPAlink|m|two-label}}
 
* {{tlx|IPAlink|301<nowiki>|2=two-label</nowiki>}} &rarr; {{IPAlink|301|2=two-label}}
 
* {{tlx|IPAlink|301<nowiki>|2=two-label</nowiki>}} &rarr; {{IPAlink|301|2=two-label}}
 
 
 
* {{tlx|IPAlink|m<nowiki>||three-label</nowiki>}} &rarr; {{IPAlink|m||three-label}}
 
* {{tlx|IPAlink|ɡb<nowiki>|</nowiki>|three-label}} &rarr; {{IPAlink|ɡb||three-label}}
 
* {{tlx|IPAlink|ɡb<nowiki>||label=named-label</nowiki>}} &rarr; {{IPAlink|ɡb||label=named-label}}
 
  
;bracket named, 2 or 3 as label:
+
:;3rd parameter:
* {{tlx|IPAlink|m<nowiki>|two-label|bracket=<</nowiki>}} &rarr; {{IPAlink|m|two-label|bracket=<}}
+
{| class="wikitable"
* {{tlx|IPAlink|301<nowiki>|2=two-label|bracket=<</nowiki>}} &rarr; {{IPAlink|301|2=two-label|bracket=<}}
+
|-
* {{tlx|IPAlink|301<nowiki>|2=two-label|bracket=<</nowiki>}} &rarr; {{IPAlink|301|2=two-label|bracket=<}}
+
! Code !! Live !! Sandbox
 +
|-
 +
| {{tlx|IPA link|m<nowiki>||<</nowiki>}} || {{../|m||<}} || {{../sandbox|m||<}}
 +
|-
 +
| {{tlx|IPA link|301<nowiki>||<</nowiki>}} || {{../|301||<}} || {{../sandbox|301||<}}
 +
|-
 +
| {{tlx|IPA link|m<nowiki>||[</nowiki>}} || {{../|m||[}} || {{../sandbox|m||[}}
 +
|-
 +
| {{tlx|IPA link|ɡb<nowiki>||[</nowiki>}} || {{../|ɡb||[}} || {{../sandbox|ɡb||[}}
 +
|-
 +
| {{tlx|IPA link|ɡb<nowiki>||/</nowiki>}} || {{../|ɡb||/}} || {{../sandbox|ɡb||/}}
 +
|}
  
 +
:;2nd/3rd parameter, the other one as label:
 +
{| class="wikitable"
 +
|-
 +
! Code !! Live !! Sandbox
 +
|-
 +
| {{tlx|IPA link|m<nowiki>|two-label|<</nowiki>}} || {{../|m|two-label|<}} || {{../sandbox|m|two-label|<}}
 +
|-
 +
| {{tlx|IPA link|301<nowiki>|2=two-label|<</nowiki>}} || {{../|301|2=two-label|3=<}} || {{../sandbox|301|2=two-label|3=<}}
 +
|-
 +
| {{tlx|IPA link|301<nowiki>|2=two-label|3=<</nowiki>}} || {{../|301|2=two-label|3=<}} || {{../sandbox|301|2=two-label|3=<}}
 +
|}
 +
{| class="wikitable"
 +
|-
 +
! Code !! Live !! Sandbox
 +
|-
 +
| {{tlx|IPA link|m<nowiki>|[|three-label</nowiki>}} || {{../|m|[|three-label}} || {{../sandbox|m|[|three-label}}
 +
|-
 +
| {{tlx|IPA link|ɡb<nowiki>|[</nowiki>|three-label}} || {{../|ɡb|[|three-label}} || {{../sandbox|ɡb|[|three-label}}
 +
|-
 +
| {{tlx|IPA link|ɡb<nowiki>|/|label=named-label</nowiki>}} || {{../|ɡb|/|label=named-label}} || {{../sandbox|ɡb|/|label=named-label}}
 +
|}
  
* {{tlx|IPAlink|m<nowiki>|bracket=<|three-label</nowiki>}} &rarr; {{IPAlink|m|bracket=<|three-label}}
+
:;2nd/3rd parameter label, no bracket:
* {{tlx|IPAlink|ɡb<nowiki>|bracket=<</nowiki>|three-label}} &rarr; {{IPAlink|ɡb|bracket=<|three-label}}
+
{| class="wikitable"
* {{tlx|IPAlink|ɡb<nowiki>|bracket=<|label=named-label</nowiki>}} &rarr; {{IPAlink|ɡb|bracket=<|label=named-label}}
+
|-
 +
! Code !! Live !! Sandbox
 +
|-
 +
| {{tlx|IPA link|m<nowiki>|two-label</nowiki>}} || {{../|m|two-label}} || {{../sandbox|m|two-label}}
 +
|-
 +
| {{tlx|IPA link|301<nowiki>|2=two-label</nowiki>}} || {{../|301|2=two-label}} || {{../sandbox|301|2=two-label}}
 +
|-
 +
| {{tlx|IPA link|301<nowiki>|2=two-label</nowiki>}} || {{../|301|2=two-label}} || {{../sandbox|301|2=two-label}}
 +
|}
 +
{| class="wikitable"
 +
|-
 +
! Code !! Live !! Sandbox
 +
|-
 +
| {{tlx|IPA link|m<nowiki>||three-label</nowiki>}} || {{../|m||three-label}} || {{../sandbox|m||three-label}}
 +
|-
 +
| {{tlx|IPA link|ɡb<nowiki>|</nowiki>|three-label}} || {{../|ɡb||three-label}} || {{../sandbox|ɡb||three-label}}
 +
|-
 +
| {{tlx|IPA link|ɡb<nowiki>||label=named-label</nowiki>}} || {{../|ɡb||label=named-label}} || {{../sandbox|ɡb||label=named-label}}
 +
|}
  
 +
:;bracket named, 2 or 3 as label:
 +
{| class="wikitable"
 +
|-
 +
! Code !! Live !! Sandbox
 +
|-
 +
| {{tlx|IPA link|m<nowiki>|two-label|bracket=<</nowiki>}} || {{../|m|two-label|bracket=<}} || {{../sandbox|m|two-label|bracket=<}}
 +
|-
 +
| {{tlx|IPA link|301<nowiki>|2=two-label|bracket=<</nowiki>}} || {{../|301|2=two-label|bracket=<}} || {{../sandbox|301|2=two-label|bracket=<}}
 +
|-
 +
| {{tlx|IPA link|301<nowiki>|2=two-label|bracket=<</nowiki>}} || {{../|301|2=two-label|bracket=<}} || {{../sandbox|301|2=two-label|bracket=<}}
 +
|}
 +
{| class="wikitable"
 +
|-
 +
! Code !! Live !! Sandbox
 +
|-
 +
| {{tlx|IPA link|m<nowiki>|bracket=<|three-label</nowiki>}} || {{../|m|bracket=<|three-label}} || {{../sandbox|m|bracket=<|three-label}}
 +
|-
 +
| {{tlx|IPA link|ɡb<nowiki>|bracket=<</nowiki>|three-label}} || {{../|ɡb|bracket=<|three-label}} || {{../sandbox|ɡb|bracket=<|three-label}}
 +
|-
 +
| {{tlx|IPA link|ɡb<nowiki>|bracket=<|label=named-label</nowiki>}} || {{../|ɡb|bracket=<|label=named-label}} || {{../sandbox|ɡb|bracket=<|label=named-label}}
 +
|}
  
 
;Error situation
 
;Error situation
If the IPA symbol is not defined in the IPAsym table, then an error message is returned.
+
If the IPA symbol is not defined in the IPA symbol table, then an error message is returned.
:<tt><nowiki>{{IPAlink|pʰɪk}}</nowiki></tt> &rarr; {{IPAlink|pʰɪk}}
+
{| class="wikitable"
 +
|-
 +
! Code !! Live !! Sandbox
 +
|-
 +
|<code><nowiki>{{../|pʰɪk}}</nowiki></code> || {{../|pʰɪk}} || {{../sandbox|pʰɪk}}
 +
|}
  
The latter is normally more an example of accidental misuse than intentional use, or it could be a sign that a symbol is missing from the {{tl|IPAsym}} table.
+
The latter is normally more an example of accidental misuse than intentional use, or it could be a sign that a symbol is missing from the {{tl|IPA symbol}} table.
  
 
;Option "label" (2nd, unnamed parameter)
 
;Option "label" (2nd, unnamed parameter)
 
The template can take the extra input like "label=A", and then ''show'' that  symbol, while ''linking'' to the appropriate article. The symbol to be shown can also be the ''second, unnamed'' parameter.
 
The template can take the extra input like "label=A", and then ''show'' that  symbol, while ''linking'' to the appropriate article. The symbol to be shown can also be the ''second, unnamed'' parameter.
:<tt><nowiki>{{IPAlink|m|label=Anytext}}</nowiki></tt> &rarr; {{IPAlink|m|label=Anytext}}
+
{| class="wikitable"
:<tt><nowiki>{{IPAlink|ɽ͡r|label=*}}</nowiki></tt> &rarr; {{IPAlink|ɽ͡r|label=*}}
+
|-
:<tt><nowiki>{{IPAblink|ˤ|label=sˤ}}</nowiki></tt> &rarr; {{IPAblink|ˤ|label=sˤ}}
+
! Code !! Live !! Sandbox
:<tt><nowiki>{{IPAblink|ˤ|sˤ}}</nowiki></tt> &rarr; {{IPAblink|ˤ|sˤ}}
+
|-
:<tt><nowiki>{{IPAblink|301|&#105;}}</nowiki></tt> &rarr; {{IPAblink|301|&#105;}}
+
|<code><nowiki>{{../|m|label=Anytext}}</nowiki></code> || {{../|m|label=Anytext}} || {{../sandbox|m|label=Anytext}}
 
+
|-
==Other options: name, wikilink==
+
|<code><nowiki>{{../|ɽ͡r|label=*}}</nowiki></code> || {{../|ɽ͡r|label=<nowiki>*</nowiki>}} || {{../sandbox|ɽ͡r|label=*}}
* {{tlx|IPAlink|m<nowiki>|/|name=yes</nowiki>}} &rarr; {{IPAlink|m|/|name=yes}}  
+
|-
* {{tlx|IPAlink|m<nowiki>|>|wl=no</nowiki>}} &rarr; {{IPAlink|m|>|wl=no}}
+
|<code><nowiki>{{IPAblink|ˤ|label=sˤ}}</nowiki></code> || {{IPAblink|ˤ|label=sˤ}} || {{IPAblink|ˤ|label=sˤ}}
 +
|-
 +
|<code><nowiki>{{IPAblink|ˤ|sˤ}}</nowiki></code> || {{IPAblink|ˤ|sˤ}} || {{IPAblink|ˤ|sˤ}}
 +
|-
 +
|<code><nowiki>{{IPAblink|301|&#105;}}</nowiki></code> || {{IPAblink|301|&#105;}} || {{IPAblink|301|&#105;}}
 +
|}
  
==Style==
+
;Other options: name, wikilink
* {{tlx|IPAlink|m<nowiki>|style=background:#f7a6c5; font-size:140%;</nowiki>}} &rarr; {{IPAlink|m|style=background:#f7a6c5; font-size:140%;}}
+
{| class="wikitable"
 +
|-
 +
! Code !! Live !! Sandbox
 +
|-
 +
| {{tlx|IPA link|m<nowiki>|/|name=yes</nowiki>}} || {{../|m|/|name=yes}}  || {{../sandbox|m|/|name=yes}}
 +
|-
 +
| {{tlx|IPA link|m<nowiki>|>|wl=no</nowiki>}} || {{../|m|>|wl=no}} || {{../sandbox|m|>|wl=no}}
 +
|}
  
==brackets==
+
;Style
* {{unichar|27e8|mathematical LEFT ANGLE BRACKET|html=|note=closing: U+27E9)}}
+
{| class="wikitable"
* {{unichar|3C|LESS-THAN SIGN|html=|note=closing: U+003E}}
+
|-
* {{unichar|2329|LEFT-POINTING ANGLE BRACKET|html=|note=closing: 232A}}
+
! Code !! Live !! Sandbox
* {{unichar|3008|LEFT ANGLE BRACKET|html=|note=closing: U+3009}}
+
|-
 +
| {{tlx|IPA link|m<nowiki>|style=background:#f7a6c5; font-size:140%;</nowiki>}} || {{../|m|style=background:#f7a6c5; font-size:140%;}} || {{../sandbox|m|style=background:#f7a6c5; font-size:140%;}}
 +
|}

Latest revision as of 05:30, 6 December 2019

First parameter or ipa symbol= (required): Any IPA symbol, or its IPA number.

Code Live Sandbox
{{IPA link|m}} m m
{{IPA link|ɡb}} ɡb ɡb
{{IPA link|301}} Error using {{IPA symbol}}: "301" not found in list Error using {{IPA symbol}}: "301" not found in list
Label

label=, or 2nd, 3rd parameter, changes the label of the wikilink.

Code Live Sandbox
{{IPA link|m|label=Any text}} m m
{{IPA link|m|Any text2}} Any text2 Any text2
{{IPA link|m||Any text3}} m m
{{IPA link|ɡb|label=}} ɡb ɡb
Code Live Sandbox
{{IPA link|m||label=Any text}} m m
{{IPA link|m||Any text3}} m m
{{IPA link|ɡb||label=}} ɡb ɡb
Brackets
  • bracket=, or 2nd or 3rd parameter: set IPA bracket. Options are: / [ < (none). Default is none.
2nd parameter
Code Live Sandbox
{{IPA link|m|<}} < <
{{IPA link|301|<}} Error using {{IPA symbol}}: "301" not found in list Error using {{IPA symbol}}: "301" not found in list
{{IPA link|m|[}} [ [
{{IPA link|ɡb|[}} [ [
{{IPA link|ɡb|/}} / /
3rd parameter
Code Live Sandbox
{{IPA link|m||<}} m m
{{IPA link|301||<}} Error using {{IPA symbol}}: "301" not found in list Error using {{IPA symbol}}: "301" not found in list
{{IPA link|m||[}} m m
{{IPA link|ɡb||[}} ɡb ɡb
{{IPA link|ɡb||/}} ɡb ɡb
2nd/3rd parameter, the other one as label
Code Live Sandbox
{{IPA link|m|two-label|<}} two-label two-label
{{IPA link|301|2=two-label|<}} Error using {{IPA symbol}}: "301" not found in list Error using {{IPA symbol}}: "301" not found in list
{{IPA link|301|2=two-label|3=<}} Error using {{IPA symbol}}: "301" not found in list Error using {{IPA symbol}}: "301" not found in list
Code Live Sandbox
{{IPA link|m|[|three-label}} [ [
{{IPA link|ɡb|[|three-label}} [ [
{{IPA link|ɡb|/|label=named-label}} / /
2nd/3rd parameter label, no bracket
Code Live Sandbox
{{IPA link|m|two-label}} two-label two-label
{{IPA link|301|2=two-label}} Error using {{IPA symbol}}: "301" not found in list Error using {{IPA symbol}}: "301" not found in list
{{IPA link|301|2=two-label}} Error using {{IPA symbol}}: "301" not found in list Error using {{IPA symbol}}: "301" not found in list
Code Live Sandbox
{{IPA link|m||three-label}} m m
{{IPA link|ɡb||three-label}} ɡb ɡb
{{IPA link|ɡb||label=named-label}} ɡb ɡb
bracket named, 2 or 3 as label
Code Live Sandbox
{{IPA link|m|two-label|bracket=<}} two-label two-label
{{IPA link|301|2=two-label|bracket=<}} Error using {{IPA symbol}}: "301" not found in list Error using {{IPA symbol}}: "301" not found in list
{{IPA link|301|2=two-label|bracket=<}} Error using {{IPA symbol}}: "301" not found in list Error using {{IPA symbol}}: "301" not found in list
Code Live Sandbox
{{IPA link|m|bracket=<|three-label}} three-label three-label
{{IPA link|ɡb|bracket=<|three-label}} three-label three-label
{{IPA link|ɡb|bracket=<|label=named-label}} ɡb ɡb
Error situation

If the IPA symbol is not defined in the IPA symbol table, then an error message is returned.

Code Live Sandbox
{{../|pʰɪk}} pʰɪk pʰɪk

The latter is normally more an example of accidental misuse than intentional use, or it could be a sign that a symbol is missing from the {{IPA symbol}} table.

Option "label" (2nd, unnamed parameter)

The template can take the extra input like "label=A", and then show that symbol, while linking to the appropriate article. The symbol to be shown can also be the second, unnamed parameter.

Code Live Sandbox
{{../|m|label=Anytext}} m m
{{../|ɽ͡r|label=*}} ɽ͡r ɽ͡r
{{IPAblink|ˤ|label=sˤ}} [ˤ] [ˤ]
{{IPAblink|ˤ|sˤ}} [] []
{{IPAblink|301|i}} Error using {{IPA symbol}}: "301" not found in list Error using {{IPA symbol}}: "301" not found in list
Other options
name, wikilink
Code Live Sandbox
{{IPA link|m|/|name=yes}} / /
{{IPA link|m|>|wl=no}} > >
Style
Code Live Sandbox
{{IPA link|m|style=background:#f7a6c5; font-size:140%;}} m m