Difference between revisions of "Template:Nornabr/doc"
Griceylipper (talk | contribs) (Added documentation on optional second parameter) |
Griceylipper (talk | contribs) (Match nornabrn's documentation) |
||
Line 4: | Line 4: | ||
=== Usage === | === Usage === | ||
− | Template for assisting formatting of abbreviations in ''[[An Etymological Dictionary of the Norn Language in Shetland]]''. | + | Template for assisting formatting of Norwegian place-name abbreviations in ''[[An Etymological Dictionary of the Norn Language in Shetland]]'''s Introduction part VI. |
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> | ||
− | {{ | + | {{Nornabrn|Berg.}} |
</pre> | </pre> | ||
− | {{ | + | {{Nornabrn|Berg.}} |
; Unknown abbreviation: | ; Unknown abbreviation: | ||
<pre> | <pre> | ||
− | {{ | + | {{Nornabrn|not in known list}} |
</pre> | </pre> | ||
− | {{ | + | {{Nornabrn|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. |
; Known abbreviation with known tooltip text | ; Known abbreviation with known tooltip text | ||
<pre> | <pre> | ||
− | {{ | + | {{Nornabrn|Berg.|Bergen}} |
</pre> | </pre> | ||
− | {{ | + | {{Nornabrn|Berg.|Bergen}} |
====Implementation==== | ====Implementation==== | ||
− | Internally, this template uses {{tl| | + | Internally, this template uses {{tl|Nornabrn/switch}} to map abbreviations to meanings. |
=== See also === | === See also === | ||
− | + | * {{tl|nornabr}} for non-Norwegian place-name abbreviations in the Norn dictionary | |
* {{tl|abbr}} for generic abbreviations in other works | * {{tl|abbr}} for generic abbreviations in other works | ||
Revision as of 19:47, 28 December 2020
Usage
Template for assisting formatting of Norwegian place-name abbreviations in An Etymological Dictionary of the Norn Language in Shetland's Introduction part VI.
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
{{Nornabrn|Berg.}}
Berg.
- Unknown abbreviation
{{Nornabrn|not in known list}}
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.
- Known abbreviation with known tooltip text
{{Nornabrn|Berg.|Bergen}}
Berg.
Implementation
Internally, this template uses {{Nornabrn/switch}} to map abbreviations to meanings.
See also
- {{nornabr}} for non-Norwegian place-name abbreviations in the Norn dictionary
- {{abbr}} for generic abbreviations in other works