Template:Glossabb: Difference between revisions

From Linguifex
Jump to navigation Jump to search
(Created page with "<abbr title="{{#if:{{{1|}}}|{{{1}}}|{{#switch:{{lc:{{{2|}}}}} |abe = abessive case ('without') |abl = ablative case ('from') |abs = absolutive case |acc = accusative case |acc...")
 
No edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
<abbr title="{{#if:{{{1|}}}|{{{1}}}|{{#switch:{{lc:{{{2|}}}}}
<abbr title="{{#if:{{{2|}}}|{{{2}}}|{{#switch:{{lc:{{{1|}}}}}
|abe = abessive case ('without')
|abe = abessive case ('without')
|abl = ablative case ('from')
|abl = ablative case ('from')
Line 365: Line 365:
|zo = zoic gender (animals)  
|zo = zoic gender (animals)  
|#default= Unknown abbreviation
|#default= Unknown abbreviation
}}}}" style="text-transform: lowercase; font-variant: small-caps;">{{{2}}}</abbr><noinclude>
}}}}" style="text-transform: lowercase; font-variant: small-caps;">{{{1}}}</abbr><noinclude>
{{Documentation}}
{{Documentation}}
[[Category:Functionality templates]]
[[Category:Functionality templates]]
[[Category:Templates]]
</noinclude>
</noinclude>

Latest revision as of 13:13, 9 February 2020

{{{1}}}


Template that automatically applies small caps and adds a hover tooltip to glossing abbreviations. Almost all abbreviations in the glossing guide are available, barring S, P, O and some affixes like n-. The tooltip includes the full description in the guide minus cross references, this means that some abbreviations like part might be ambiguous, in such cases the template allows you to define your own tooltip. The same applies for abbreviations not in the guide.

Code Result
{{glossabb|obj}} obj
{{glossabb|pot}} pot
{{glossabb|int}} int
{{glossabb|int|interrogative}} int
{{glossabb|xxx}} xxx
{{glossabb|xxx|custom description}} xxx

Note that this does not produce uppercase letters along with smallcaps, for that you need to use Template:Abbtip

To the admins, if this is a resource hog I can adapt it for use with substitution + Abbtip instead.