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

From blackwiki
Jump to navigation Jump to search
imported>Wbm1058
(IPAsym → IPA symbol per template rename)
imported>Jonesey95
m (Fix Linter errors using AutoEd)
 
Line 144: Line 144:
 
! Code !! Live !! Sandbox
 
! Code !! Live !! Sandbox
 
|-
 
|-
|<tt><nowiki>{{../|pʰɪk}}</nowiki></tt> || {{../|pʰɪk}} || {{../sandbox|pʰɪk}}
+
|<code><nowiki>{{../|pʰɪk}}</nowiki></code> || {{../|pʰɪk}} || {{../sandbox|pʰɪk}}
 
|}
 
|}
  
Line 155: Line 155:
 
! Code !! Live !! Sandbox
 
! Code !! Live !! Sandbox
 
|-
 
|-
|<tt><nowiki>{{../|m|label=Anytext}}</nowiki></tt> || {{../|m|label=Anytext}} || {{../sandbox|m|label=Anytext}}
+
|<code><nowiki>{{../|m|label=Anytext}}</nowiki></code> || {{../|m|label=Anytext}} || {{../sandbox|m|label=Anytext}}
 
|-
 
|-
|<tt><nowiki>{{../|ɽ͡r|label=*}}</nowiki></tt> || {{../|ɽ͡r|label=<nowiki>*</nowiki>}} || {{../sandbox|ɽ͡r|label=*}}
+
|<code><nowiki>{{../|ɽ͡r|label=*}}</nowiki></code> || {{../|ɽ͡r|label=<nowiki>*</nowiki>}} || {{../sandbox|ɽ͡r|label=*}}
 
|-
 
|-
|<tt><nowiki>{{IPAblink|ˤ|label=sˤ}}</nowiki></tt> || {{IPAblink|ˤ|label=sˤ}} || {{IPAblink|ˤ|label=sˤ}}
+
|<code><nowiki>{{IPAblink|ˤ|label=sˤ}}</nowiki></code> || {{IPAblink|ˤ|label=sˤ}} || {{IPAblink|ˤ|label=sˤ}}
 
|-
 
|-
|<tt><nowiki>{{IPAblink|ˤ|sˤ}}</nowiki></tt> || {{IPAblink|ˤ|sˤ}} || {{IPAblink|ˤ|sˤ}}
+
|<code><nowiki>{{IPAblink|ˤ|sˤ}}</nowiki></code> || {{IPAblink|ˤ|sˤ}} || {{IPAblink|ˤ|sˤ}}
 
|-
 
|-
|<tt><nowiki>{{IPAblink|301|&#105;}}</nowiki></tt> || {{IPAblink|301|&#105;}} || {{IPAblink|301|&#105;}}
+
|<code><nowiki>{{IPAblink|301|&#105;}}</nowiki></code> || {{IPAblink|301|&#105;}} || {{IPAblink|301|&#105;}}
 
|}
 
|}
  

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