Difference between revisions of "Template:Nornabr/doc"
Griceylipper (talk | contribs) (Match nornabrn's documentation) |
Griceylipper (talk | contribs) (Undo revision 10752751 by Griceylipper (talk) working rubbish!) |
||
Line 4: | Line 4: | ||
=== Usage === | === Usage === | ||
− | Template for assisting formatting of | + | Template for assisting formatting of abbreviations in ''[[An Etymological Dictionary of the Norn Language in Shetland]]''. |
There is one required parameter, the abbreviation. If this is the only parameter provided, it will be looked up and formatted with a tooltip, or, if it is not known, an error displayed. | There is one required parameter, the abbreviation. If this is the only parameter provided, it will be looked up and formatted with a tooltip, or, if it is not known, an error displayed. | ||
Line 10: | Line 10: | ||
; Known abbreviation | ; Known abbreviation | ||
<pre> | <pre> | ||
− | {{ | + | {{Nornabr|adj.}} |
</pre> | </pre> | ||
− | {{ | + | {{Nornabr|adj.}} |
; Unknown abbreviation: | ; Unknown abbreviation: | ||
<pre> | <pre> | ||
− | {{ | + | {{Nornabr|not in known list}} |
</pre> | </pre> | ||
− | {{ | + | {{Nornabr|not in known list}} |
− | With the size of some of the chapters in the dictionary, and the frequency of abbreviations throughout the text, having to look the abbreviations up every time from a list runs the risk of blowing the expansion limit once all the pages are transcluded. So, to make this template more efficient, a second optional parameter can be supplied that skips the abbreviation being looked up, and will fill out the tooltip with whatever text you provide. | + | With the size of some of the chapters in the dictionary, and the frequency of abbreviations throughout the text, having to look the abbreviations up every time from a list runs the risk of blowing the expansion limit once all the pages are transcluded. So, to make this template more efficient, a second optional parameter can be supplied that skips the abbreviation being looked up, and will fill out the tooltip with whatever text you provide. Note that if you do this, while the dictionary specifies specific meanings for each abbreviation, liberties are occasionally taken where the expansions really ought to be slightly different to the defined definition. For example, No. mostly means Norwegian, but it may occasionally be used to mean Norway. Other abbreviations have two listed meanings, where it would be beneficial to hard-code the one correct version. If you are hard-coding a replacement definition, be sure what you are supplying in is precise and accurate. |
; Known abbreviation with known tooltip text | ; Known abbreviation with known tooltip text | ||
<pre> | <pre> | ||
− | {{ | + | {{Nornabr|adj.|adjectivally}} |
</pre> | </pre> | ||
− | {{ | + | {{Nornabr|adj.|adjectivally}} |
====Implementation==== | ====Implementation==== | ||
− | Internally, this template uses {{tl| | + | Internally, this template uses {{tl|Nornabr/switch}} to map abbreviations to meanings. |
=== See also === | === See also === | ||
− | + | ||
* {{tl|abbr}} for generic abbreviations in other works | * {{tl|abbr}} for generic abbreviations in other works | ||
Revision as of 19:50, 28 December 2020
Usage
Template for assisting formatting of abbreviations in An Etymological Dictionary of the Norn Language in Shetland.
There is one required parameter, the abbreviation. If this is the only parameter provided, it will be looked up and formatted with a tooltip, or, if it is not known, an error displayed.
- Known abbreviation
{{Nornabr|adj.}}
adj.
- Unknown abbreviation
{{Nornabr|not in known list}}
Script error: No such module "Error".
With the size of some of the chapters in the dictionary, and the frequency of abbreviations throughout the text, having to look the abbreviations up every time from a list runs the risk of blowing the expansion limit once all the pages are transcluded. So, to make this template more efficient, a second optional parameter can be supplied that skips the abbreviation being looked up, and will fill out the tooltip with whatever text you provide. Note that if you do this, while the dictionary specifies specific meanings for each abbreviation, liberties are occasionally taken where the expansions really ought to be slightly different to the defined definition. For example, No. mostly means Norwegian, but it may occasionally be used to mean Norway. Other abbreviations have two listed meanings, where it would be beneficial to hard-code the one correct version. If you are hard-coding a replacement definition, be sure what you are supplying in is precise and accurate.
- Known abbreviation with known tooltip text
{{Nornabr|adj.|adjectivally}}
adj.
Implementation
Internally, this template uses {{Nornabr/switch}} to map abbreviations to meanings.
See also
- {{abbr}} for generic abbreviations in other works