Difference between revisions of "Template:IPA link/testcases"
Jump to navigation
Jump to search
imported>DePiep |
imported>DePiep |
||
| Line 4: | Line 4: | ||
=== Usage === | === 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 | + | * {{tlx|IPAlink|m}} → {{IPAlink|m}} |
| − | * {{tlx|IPAlink | + | * {{tlx|IPAlink|ɡb}} → {{IPAlink|ɡb}} |
| − | * {{tlx|IPAlink | + | * {{tlx|IPAlink|301}} → {{IPAlink|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 | + | * {{tlx|IPAlink|m<nowiki>|label=Any text</nowiki>}} → {{IPAlink|m|label=Any text}} |
| − | * {{tlx|IPAlink | + | * {{tlx|IPAlink|m<nowiki>|Any text2</nowiki>}} → {{IPAlink|m|Any text2}} |
| − | * {{tlx|IPAlink | + | * {{tlx|IPAlink|m<nowiki>||Any text3</nowiki>}} → {{IPAlink|m||Any text3}} |
| − | * {{tlx|IPAlink | + | * {{tlx|IPAlink|ɡb<nowiki>|label=</nowiki>}} → {{IPAlink|ɡb|label=}} |
| − | * {{tlx|IPAlink | + | * {{tlx|IPAlink|m<nowiki>||label=Any text</nowiki>}} → {{IPAlink|m||label=Any text}} |
| − | * {{tlx|IPAlink | + | * {{tlx|IPAlink|m<nowiki>||Any text3</nowiki>}} → {{IPAlink|m||Any text3}} |
| − | * {{tlx|IPAlink | + | * {{tlx|IPAlink|ɡb<nowiki>||label=</nowiki>}} → {{IPAlink|ɡ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 | + | * {{tlx|IPAlink|m<nowiki>|<</nowiki>}} → {{IPAlink|m|<}} |
| − | * {{tlx|IPAlink | + | * {{tlx|IPAlink|301<nowiki>|<</nowiki>}} → {{IPAlink|301|<}} |
| − | * {{tlx|IPAlink | + | * {{tlx|IPAlink|m<nowiki>|[</nowiki>}} → {{IPAlink|m|[}} |
| − | * {{tlx|IPAlink | + | * {{tlx|IPAlink|ɡb<nowiki>|[</nowiki>}} → {{IPAlink|ɡb|[}} |
| − | * {{tlx|IPAlink | + | * {{tlx|IPAlink|ɡb<nowiki>|/</nowiki>}} → {{IPAlink|ɡb|/}} |
;3rd parameter: | ;3rd parameter: | ||
| − | * {{tlx|IPAlink | + | * {{tlx|IPAlink|m<nowiki>||<</nowiki>}} → {{IPAlink|m||<}} |
| − | * {{tlx|IPAlink | + | * {{tlx|IPAlink|301<nowiki>||<</nowiki>}} → {{IPAlink|301||<}} |
| − | * {{tlx|IPAlink | + | * {{tlx|IPAlink|m<nowiki>||[</nowiki>}} → {{IPAlink|m||[}} |
| − | * {{tlx|IPAlink | + | * {{tlx|IPAlink|ɡb<nowiki>||[</nowiki>}} → {{IPAlink|ɡb||[}} |
| − | * {{tlx|IPAlink | + | * {{tlx|IPAlink|ɡb<nowiki>||/</nowiki>}} → {{IPAlink|ɡb||/}} |
;2nd/3rd parameter, the other one as label: | ;2nd/3rd parameter, the other one as label: | ||
| − | * {{tlx|IPAlink | + | * {{tlx|IPAlink|m<nowiki>|two-label|<</nowiki>}} → {{IPAlink|m|two-label|<}} |
| − | * {{tlx|IPAlink | + | * {{tlx|IPAlink|301<nowiki>|2=two-label|<</nowiki>}} → {{IPAlink|301|2=two-label|3=<}} |
| − | * {{tlx|IPAlink | + | * {{tlx|IPAlink|301<nowiki>|2=two-label|3=<</nowiki>}} → {{IPAlink|301|2=two-label|3=<}} |
| − | * {{tlx|IPAlink | + | * {{tlx|IPAlink|m<nowiki>|[|three-label</nowiki>}} → {{IPAlink|m|[|three-label}} |
| − | * {{tlx|IPAlink | + | * {{tlx|IPAlink|ɡb<nowiki>|[</nowiki>|three-label}} → {{IPAlink|ɡb|[|three-label}} |
| − | * {{tlx|IPAlink | + | * {{tlx|IPAlink|ɡb<nowiki>|/|label=named-label</nowiki>}} → {{IPAlink|ɡb|/|label=named-label}} |
;2nd/3rd parameter label, no bracket: | ;2nd/3rd parameter label, no bracket: | ||
| − | * {{tlx|IPAlink | + | * {{tlx|IPAlink|m<nowiki>|two-label</nowiki>}} → {{IPAlink|m|two-label}} |
| − | * {{tlx|IPAlink | + | * {{tlx|IPAlink|301<nowiki>|2=two-label</nowiki>}} → {{IPAlink|301|2=two-label}} |
| − | * {{tlx|IPAlink | + | * {{tlx|IPAlink|301<nowiki>|2=two-label</nowiki>}} → {{IPAlink|301|2=two-label}} |
| − | * {{tlx|IPAlink | + | * {{tlx|IPAlink|m<nowiki>||three-label</nowiki>}} → {{IPAlink|m||three-label}} |
| − | * {{tlx|IPAlink | + | * {{tlx|IPAlink|ɡb<nowiki>|</nowiki>|three-label}} → {{IPAlink|ɡb||three-label}} |
| − | * {{tlx|IPAlink | + | * {{tlx|IPAlink|ɡb<nowiki>||label=named-label</nowiki>}} → {{IPAlink|ɡb||label=named-label}} |
;bracket named, 2 or 3 as label: | ;bracket named, 2 or 3 as label: | ||
| − | * {{tlx|IPAlink | + | * {{tlx|IPAlink|m<nowiki>|two-label|bracket=<</nowiki>}} → {{IPAlink|m|two-label|bracket=<}} |
| − | * {{tlx|IPAlink | + | * {{tlx|IPAlink|301<nowiki>|2=two-label|bracket=<</nowiki>}} → {{IPAlink|301|2=two-label|bracket=<}} |
| − | * {{tlx|IPAlink | + | * {{tlx|IPAlink|301<nowiki>|2=two-label|bracket=<</nowiki>}} → {{IPAlink|301|2=two-label|bracket=<}} |
| − | * {{tlx|IPAlink | + | * {{tlx|IPAlink|m<nowiki>|bracket=<|three-label</nowiki>}} → {{IPAlink|m|bracket=<|three-label}} |
| − | * {{tlx|IPAlink | + | * {{tlx|IPAlink|ɡb<nowiki>|bracket=<</nowiki>|three-label}} → {{IPAlink|ɡb|bracket=<|three-label}} |
| − | * {{tlx|IPAlink | + | * {{tlx|IPAlink|ɡb<nowiki>|bracket=<|label=named-label</nowiki>}} → {{IPAlink|ɡ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. | ||
| − | :<tt><nowiki>{{IPAlink | + | :<tt><nowiki>{{IPAlink|pʰɪk}}</nowiki></tt> → {{IPAlink|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 73: | ||
;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 | + | :<tt><nowiki>{{IPAlink|m|label=Anytext}}</nowiki></tt> → {{IPAlink|m|label=Anytext}} |
| − | :<tt><nowiki>{{IPAlink | + | :<tt><nowiki>{{IPAlink|ɽ͡r|label=*}}</nowiki></tt> → {{IPAlink|ɽ͡r|label=*}} |
:<tt><nowiki>{{IPAblink|ˤ|label=sˤ}}</nowiki></tt> → {{IPAblink|ˤ|label=sˤ}} | :<tt><nowiki>{{IPAblink|ˤ|label=sˤ}}</nowiki></tt> → {{IPAblink|ˤ|label=sˤ}} | ||
:<tt><nowiki>{{IPAblink|ˤ|sˤ}}</nowiki></tt> → {{IPAblink|ˤ|sˤ}} | :<tt><nowiki>{{IPAblink|ˤ|sˤ}}</nowiki></tt> → {{IPAblink|ˤ|sˤ}} | ||
| Line 80: | Line 80: | ||
==Other options: name, wikilink== | ==Other options: name, wikilink== | ||
| − | * {{tlx|IPAlink | + | * {{tlx|IPAlink|m<nowiki>|/|name=yes</nowiki>}} → {{IPAlink|m|/|name=yes}} |
| − | * {{tlx|IPAlink | + | * {{tlx|IPAlink|m<nowiki>|>|wl=no</nowiki>}} → {{IPAlink|m|>|wl=no}} |
==Style== | ==Style== | ||
| − | * {{tlx|IPAlink | + | * {{tlx|IPAlink|m<nowiki>|style=background:#f7a6c5; font-size:140%;</nowiki>}} → {{IPAlink|m|style=background:#f7a6c5; font-size:140%;}} |
==brackets== | ==brackets== | ||
Revision as of 21:29, 24 July 2012
| File:Gnome-applications-science.svg | 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: |
Usage
First parameter or ipa symbol= (required): Any IPA symbol, or its IPA number.
{{IPAlink|m}}→ m{{IPAlink|ɡb}}→ ɡb{{IPAlink|301}}→ Error using {{IPA symbol}}: "301" not found in list
- Label
label=, or 2nd, 3rd parameter, changes the label of the wikilink.
{{IPAlink|m|label=Any text}}→ m{{IPAlink|m|Any text2}}→ Any text2{{IPAlink|m||Any text3}}→ m{{IPAlink|ɡb|label=}}→ ɡb
- Brackets
bracket=, or 2nd or 3rd parameter: set IPA bracket. Options are:/ [ < (none). Default is none.
- 2nd parameter
{{IPAlink|m|<}}→ <{{IPAlink|301|<}}→ Error using {{IPA symbol}}: "301" not found in list{{IPAlink|m|[}}→ [{{IPAlink|ɡb|[}}→ [{{IPAlink|ɡb|/}}→ /
- 3rd parameter
{{IPAlink|m||<}}→ m{{IPAlink|301||<}}→ Error using {{IPA symbol}}: "301" not found in list{{IPAlink|m||[}}→ m{{IPAlink|ɡb||[}}→ ɡb{{IPAlink|ɡb||/}}→ ɡb
- 2nd/3rd parameter, the other one as label
{{IPAlink|m|two-label|<}}→ two-label{{IPAlink|301|2=two-label|<}}→ Error using {{IPA symbol}}: "301" not found in list{{IPAlink|301|2=two-label|3=<}}→ Error using {{IPA symbol}}: "301" not found in list
{{IPAlink|m|[|three-label}}→ [{{IPAlink|ɡb|[|three-label}}→ [{{IPAlink|ɡb|/|label=named-label}}→ /
- 2nd/3rd parameter label, no bracket
{{IPAlink|m|two-label}}→ two-label{{IPAlink|301|2=two-label}}→ Error using {{IPA symbol}}: "301" not found in list{{IPAlink|301|2=two-label}}→ Error using {{IPA symbol}}: "301" not found in list
{{IPAlink|m||three-label}}→ m{{IPAlink|ɡb||three-label}}→ ɡb{{IPAlink|ɡb||label=named-label}}→ ɡb
- bracket named, 2 or 3 as label
{{IPAlink|m|two-label|bracket=<}}→ two-label{{IPAlink|301|2=two-label|bracket=<}}→ Error using {{IPA symbol}}: "301" not found in list{{IPAlink|301|2=two-label|bracket=<}}→ Error using {{IPA symbol}}: "301" not found in list
{{IPAlink|m|bracket=<|three-label}}→ three-label{{IPAlink|ɡb|bracket=<|three-label}}→ three-label{{IPAlink|ɡb|bracket=<|label=named-label}}→ ɡb
- Error situation
If the IPA symbol is not defined in the IPAsym table, then an error message is returned.
- {{IPAlink|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.
- {{IPAlink|m|label=Anytext}} → m
- {{IPAlink|ɽ͡r|label=*}} → ɽ͡r
- {{IPAblink|ˤ|label=sˤ}} → [ˤ]
- {{IPAblink|ˤ|sˤ}} → [sˤ]
- {{IPAblink|301|i}} → Error using {{IPA symbol}}: "301" not found in list