Difference between revisions of "Template:IPA link/testcases"
Jump to navigation
Jump to search
imported>DePiep |
imported>Lfdder |
||
| Line 1: | Line 1: | ||
{{template test cases notice}} | {{template test cases notice}} | ||
| − | |||
| − | |||
'''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. | ||
| − | + | {| class="wikitable" | |
| − | + | |- | |
| − | + | ! Code !! Live !! Sandbox | |
| + | |- | ||
| + | | {{tlx|IPAlink|m}} || {{../|m}} || {{../sandbox|m}} | ||
| + | |- | ||
| + | | {{tlx|IPAlink|ɡb}} || {{../|ɡb}} || {{../sandbox|ɡb}} | ||
| + | |- | ||
| + | | {{tlx|IPAlink|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. |
| − | + | {| class="wikitable" | |
| − | + | |- | |
| − | + | ! Code !! Live !! Sandbox | |
| − | + | |- | |
| − | + | | {{tlx|IPAlink|m<nowiki>|label=Any text</nowiki>}} || {{../|m|label=Any text}} || {{../sandbox|m|label=Any text}} | |
| − | + | |- | |
| − | + | | {{tlx|IPAlink|m<nowiki>|Any text2</nowiki>}} || {{../|m|Any text2}} || {{../sandbox|m|Any text2}} | |
| − | + | |- | |
| − | + | | {{tlx|IPAlink|m<nowiki>||Any text3</nowiki>}} || {{../|m||Any text3}} || {{../sandbox|m||Any text3}} | |
| + | |- | ||
| + | | {{tlx|IPAlink|ɡb<nowiki>|label=</nowiki>}} || {{../|ɡb|label=}} || {{../sandbox|ɡb|label=}} | ||
| + | |} | ||
| + | {| class="wikitable" | ||
| + | |- | ||
| + | ! Code !! Live !! Sandbox | ||
| + | |- | ||
| + | | {{tlx|IPAlink|m<nowiki>||label=Any text</nowiki>}} || {{../|m||label=Any text}} || {{../sandbox|m||label=Any text}} | ||
| + | |- | ||
| + | | {{tlx|IPAlink|m<nowiki>||Any text3</nowiki>}} || {{../|m||Any text3}} || {{../sandbox|m||Any text3}} | ||
| + | |- | ||
| + | | {{tlx|IPAlink|ɡ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: |
| − | + | {| class="wikitable" | |
| − | + | |- | |
| − | + | ! Code !! Live !! Sandbox | |
| − | + | |- | |
| − | + | | {{tlx|IPAlink|m<nowiki>|<</nowiki>}} || {{../|m|<}} || {{../sandbox|m|<}} | |
| − | + | |- | |
| − | + | | {{tlx|IPAlink|301<nowiki>|<</nowiki>}} || {{../|301|<}} || {{../sandbox|301|<}} | |
| − | + | |- | |
| − | + | | {{tlx|IPAlink|m<nowiki>|[</nowiki>}} || {{../|m|[}} || {{../sandbox|m|[}} | |
| − | + | |- | |
| − | + | | {{tlx|IPAlink|ɡb<nowiki>|[</nowiki>}} || {{../|ɡb|[}} || {{../sandbox|ɡb|[}} | |
| − | + | |- | |
| − | + | | {{tlx|IPAlink|ɡb<nowiki>|/</nowiki>}} || {{../|ɡb|/}} || {{../sandbox|ɡb|/}} | |
| − | + | |} | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | ; | + | :;3rd parameter: |
| − | + | {| class="wikitable" | |
| − | + | |- | |
| − | + | ! Code !! Live !! Sandbox | |
| + | |- | ||
| + | | {{tlx|IPAlink|m<nowiki>||<</nowiki>}} || {{../|m||<}} || {{../sandbox|m||<}} | ||
| + | |- | ||
| + | | {{tlx|IPAlink|301<nowiki>||<</nowiki>}} || {{../|301||<}} || {{../sandbox|301||<}} | ||
| + | |- | ||
| + | | {{tlx|IPAlink|m<nowiki>||[</nowiki>}} || {{../|m||[}} || {{../sandbox|m||[}} | ||
| + | |- | ||
| + | | {{tlx|IPAlink|ɡb<nowiki>||[</nowiki>}} || {{../|ɡb||[}} || {{../sandbox|ɡb||[}} | ||
| + | |- | ||
| + | | {{tlx|IPAlink|ɡb<nowiki>||/</nowiki>}} || {{../|ɡb||/}} || {{../sandbox|ɡb||/}} | ||
| + | |} | ||
| + | :;2nd/3rd parameter, the other one as label: | ||
| + | {| class="wikitable" | ||
| + | |- | ||
| + | ! Code !! Live !! Sandbox | ||
| + | |- | ||
| + | | {{tlx|IPAlink|m<nowiki>|two-label|<</nowiki>}} || {{../|m|two-label|<}} || {{../sandbox|m|two-label|<}} | ||
| + | |- | ||
| + | | {{tlx|IPAlink|301<nowiki>|2=two-label|<</nowiki>}} || {{../|301|2=two-label|3=<}} || {{../sandbox|301|2=two-label|3=<}} | ||
| + | |- | ||
| + | | {{tlx|IPAlink|301<nowiki>|2=two-label|3=<</nowiki>}} || {{../|301|2=two-label|3=<}} || {{../sandbox|301|2=two-label|3=<}} | ||
| + | |} | ||
| + | {| class="wikitable" | ||
| + | |- | ||
| + | ! Code !! Live !! Sandbox | ||
| + | |- | ||
| + | | {{tlx|IPAlink|m<nowiki>|[|three-label</nowiki>}} || {{../|m|[|three-label}} || {{../sandbox|m|[|three-label}} | ||
| + | |- | ||
| + | | {{tlx|IPAlink|ɡb<nowiki>|[</nowiki>|three-label}} || {{../|ɡb|[|three-label}} || {{../sandbox|ɡb|[|three-label}} | ||
| + | |- | ||
| + | | {{tlx|IPAlink|ɡb<nowiki>|/|label=named-label</nowiki>}} || {{../|ɡb|/|label=named-label}} || {{../sandbox|ɡb|/|label=named-label}} | ||
| + | |} | ||
| − | + | :;2nd/3rd parameter label, no bracket: | |
| − | + | {| class="wikitable" | |
| − | + | |- | |
| + | ! Code !! Live !! Sandbox | ||
| + | |- | ||
| + | | {{tlx|IPAlink|m<nowiki>|two-label</nowiki>}} || {{../|m|two-label}} || {{../sandbox|m|two-label}} | ||
| + | |- | ||
| + | | {{tlx|IPAlink|301<nowiki>|2=two-label</nowiki>}} || {{../|301|2=two-label}} || {{../sandbox|301|2=two-label}} | ||
| + | |- | ||
| + | | {{tlx|IPAlink|301<nowiki>|2=two-label</nowiki>}} || {{../|301|2=two-label}} || {{../sandbox|301|2=two-label}} | ||
| + | |} | ||
| + | {| class="wikitable" | ||
| + | |- | ||
| + | ! Code !! Live !! Sandbox | ||
| + | |- | ||
| + | | {{tlx|IPAlink|m<nowiki>||three-label</nowiki>}} || {{../|m||three-label}} || {{../sandbox|m||three-label}} | ||
| + | |- | ||
| + | | {{tlx|IPAlink|ɡb<nowiki>|</nowiki>|three-label}} || {{../|ɡb||three-label}} || {{../sandbox|ɡb||three-label}} | ||
| + | |- | ||
| + | | {{tlx|IPAlink|ɡ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|IPAlink|m<nowiki>|two-label|bracket=<</nowiki>}} || {{../|m|two-label|bracket=<}} || {{../sandbox|m|two-label|bracket=<}} | ||
| + | |- | ||
| + | | {{tlx|IPAlink|301<nowiki>|2=two-label|bracket=<</nowiki>}} || {{../|301|2=two-label|bracket=<}} || {{../sandbox|301|2=two-label|bracket=<}} | ||
| + | |- | ||
| + | | {{tlx|IPAlink|301<nowiki>|2=two-label|bracket=<</nowiki>}} || {{../|301|2=two-label|bracket=<}} || {{../sandbox|301|2=two-label|bracket=<}} | ||
| + | |} | ||
| + | {| class="wikitable" | ||
| + | |- | ||
| + | ! Code !! Live !! Sandbox | ||
| + | |- | ||
| + | | {{tlx|IPAlink|m<nowiki>|bracket=<|three-label</nowiki>}} || {{../|m|bracket=<|three-label}} || {{../sandbox|m|bracket=<|three-label}} | ||
| + | |- | ||
| + | | {{tlx|IPAlink|ɡb<nowiki>|bracket=<</nowiki>|three-label}} || {{../|ɡb|bracket=<|three-label}} || {{../sandbox|ɡb|bracket=<|three-label}} | ||
| + | |- | ||
| + | | {{tlx|IPAlink|ɡ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 IPAsym table, then an error message is returned. | ||
| − | + | {| class="wikitable" | |
| + | |- | ||
| + | ! Code !! Live !! Sandbox | ||
| + | |- | ||
| + | |<tt><nowiki>{{../|pʰɪk}}</nowiki></tt> || {{../|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|IPAsym}} table. | ||
| Line 73: | Line 151: | ||
;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. | ||
| − | + | {| class="wikitable" | |
| − | + | |- | |
| − | + | ! Code !! Live !! Sandbox | |
| − | + | |- | |
| − | + | |<tt><nowiki>{{../|m|label=Anytext}}</nowiki></tt> || {{../|m|label=Anytext}} || {{../sandbox|m|label=Anytext}} | |
| − | + | |- | |
| − | + | |<tt><nowiki>{{../|ɽ͡r|label=*}}</nowiki></tt> || {{../|ɽ͡r|label=*}} || {{../sandbox|ɽ͡r|label=*}} | |
| − | + | |- | |
| − | + | |<tt><nowiki>{{IPAblink|ˤ|label=sˤ}}</nowiki></tt> || {{IPAblink|ˤ|label=sˤ}} || {{IPAblink|ˤ|label=sˤ}} | |
| + | |- | ||
| + | |<tt><nowiki>{{IPAblink|ˤ|sˤ}}</nowiki></tt> || {{IPAblink|ˤ|sˤ}} || {{IPAblink|ˤ|sˤ}} | ||
| + | |- | ||
| + | |<tt><nowiki>{{IPAblink|301|i}}</nowiki></tt> || {{IPAblink|301|i}} || {{IPAblink|301|i}} | ||
| + | |} | ||
| − | == | + | ;Other options: name, wikilink |
| − | + | {| class="wikitable" | |
| + | |- | ||
| + | ! Code !! Live !! Sandbox | ||
| + | |- | ||
| + | | {{tlx|IPAlink|m<nowiki>|/|name=yes</nowiki>}} || {{../|m|/|name=yes}} || {{../sandbox|m|/|name=yes}} | ||
| + | |- | ||
| + | | {{tlx|IPAlink|m<nowiki>|>|wl=no</nowiki>}} || {{../|m|>|wl=no}} || {{../sandbox|m|>|wl=no}} | ||
| + | |} | ||
| − | + | ;Style | |
| − | + | {| class="wikitable" | |
| − | + | |- | |
| − | + | ! Code !! Live !! Sandbox | |
| − | + | |- | |
| + | | {{tlx|IPAlink|m<nowiki>|style=background:#f7a6c5; font-size:140%;</nowiki>}} || {{../|m|style=background:#f7a6c5; font-size:140%;}} || {{../sandbox|m|style=background:#f7a6c5; font-size:140%;}} | ||
| + | |} | ||
Revision as of 16:35, 27 July 2013
| 42px | This is the template test cases page for the sandbox of Template:IPA link. Script error: No such module "Purge". to update the examples. If there are many examples of a complicated template, later ones may break due to limits in MediaWiki, see the HTML comment "NewPP limit report" in the rendered page. You can also use Special:ExpandTemplates to examine the results of template uses. You can test how this page looks in the different skins with these links: |
First parameter or ipa symbol= (required): Any IPA symbol, or its IPA number.
| Code | Live | Sandbox |
|---|---|---|
{{IPAlink|m}} |
m | m |
{{IPAlink|ɡb}} |
ɡb | ɡb |
{{IPAlink|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 |
|---|---|---|
{{IPAlink|m|label=Any text}} |
m | m |
{{IPAlink|m|Any text2}} |
Any text2 | Any text2 |
{{IPAlink|m||Any text3}} |
m | m |
{{IPAlink|ɡb|label=}} |
ɡb | ɡb |
| Code | Live | Sandbox |
|---|---|---|
{{IPAlink|m||label=Any text}} |
m | m |
{{IPAlink|m||Any text3}} |
m | m |
{{IPAlink|ɡ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 |
|---|---|---|
{{IPAlink|m|<}} |
< | < |
{{IPAlink|301|<}} |
Error using {{IPA symbol}}: "301" not found in list | Error using {{IPA symbol}}: "301" not found in list |
{{IPAlink|m|[}} |
[ | [ |
{{IPAlink|ɡb|[}} |
[ | [ |
{{IPAlink|ɡb|/}} |
/ | / |
- 3rd parameter
| Code | Live | Sandbox |
|---|---|---|
{{IPAlink|m||<}} |
m | m |
{{IPAlink|301||<}} |
Error using {{IPA symbol}}: "301" not found in list | Error using {{IPA symbol}}: "301" not found in list |
{{IPAlink|m||[}} |
m | m |
{{IPAlink|ɡb||[}} |
ɡb | ɡb |
{{IPAlink|ɡb||/}} |
ɡb | ɡb |
- 2nd/3rd parameter, the other one as label
| Code | Live | Sandbox |
|---|---|---|
{{IPAlink|m|two-label|<}} |
two-label | two-label |
{{IPAlink|301|2=two-label|<}} |
Error using {{IPA symbol}}: "301" not found in list | Error using {{IPA symbol}}: "301" not found in list |
{{IPAlink|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 |
|---|---|---|
{{IPAlink|m|[|three-label}} |
[ | [ |
{{IPAlink|ɡb|[|three-label}} |
[ | [ |
{{IPAlink|ɡb|/|label=named-label}} |
/ | / |
- 2nd/3rd parameter label, no bracket
| Code | Live | Sandbox |
|---|---|---|
{{IPAlink|m|two-label}} |
two-label | two-label |
{{IPAlink|301|2=two-label}} |
Error using {{IPA symbol}}: "301" not found in list | Error using {{IPA symbol}}: "301" not found in list |
{{IPAlink|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 |
|---|---|---|
{{IPAlink|m||three-label}} |
m | m |
{{IPAlink|ɡb||three-label}} |
ɡb | ɡb |
{{IPAlink|ɡb||label=named-label}} |
ɡb | ɡb |
- bracket named, 2 or 3 as label
| Code | Live | Sandbox |
|---|---|---|
{{IPAlink|m|two-label|bracket=<}} |
two-label | two-label |
{{IPAlink|301|2=two-label|bracket=<}} |
Error using {{IPA symbol}}: "301" not found in list | Error using {{IPA symbol}}: "301" not found in list |
{{IPAlink|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 |
|---|---|---|
{{IPAlink|m|bracket=<|three-label}} |
three-label | three-label |
{{IPAlink|ɡb|bracket=<|three-label}} |
three-label | three-label |
{{IPAlink|ɡb|bracket=<|label=named-label}} |
ɡb | ɡb |
- Error situation
If the IPA symbol is not defined in the IPAsym 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 {{IPAsym}} 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ˤ}} | [sˤ] | [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 |
|---|---|---|
{{IPAlink|m|/|name=yes}} |
/ | / |
{{IPAlink|m|>|wl=no}} |
> | > |
- Style
| Code | Live | Sandbox |
|---|---|---|
{{IPAlink|m|style=background:#f7a6c5; font-size:140%;}} |
m | m |