Template:Namefix/doc: Difference between revisions

From Wikishire
Jump to navigation Jump to search
Created page with '{{Documentation subpage}} '''{{tl|Namefix}}''' and '''{{tl|Namefix 2}}''' and '''{{tl|Namefix&sort}}''' are Templates to deal with the fact that place-names have variant forms, …'
 
RB (talk | contribs)
No edit summary
Line 41: Line 41:


This template is used within categorisation templates to ensure alphabetical sorting, for example in {{tl|Rivers}} so that within "Rivers of Britain and Ireland", the category "Rivers of County Antrim" appears under "A".
This template is used within categorisation templates to ensure alphabetical sorting, for example in {{tl|Rivers}} so that within "Rivers of Britain and Ireland", the category "Rivers of County Antrim" appears under "A".
==Others==
{|
|-
!width="20%"|template !!function
|-
|{{tl|Check1shire}} || Gives an error message if the name entered is not a county nor an overseas territory.
|-
|{{tl|Hillfix}} || The names of ranges of hills (eg. 'Pennines' replacing 'Pennine Hills')
|-
|{{tl|Islegroupfix}} || The names of island groupd (eg. 'Isles Scilly' replacing 'Scilly')
|-
|{{tl|Mountsort}} || Alphabetical sorting, so that hills beginning "Mount" are sorted under the name not the prefix
|-
|{{tl|Saintsort}} || Alphabetical sorting, so that towns and villages beginning "St" are sorted as if it were written "Saint"
|-
|{{tl|Owned by code}} || For categories of ownership (see {{tl|Owned by code}}).
|-
|{{tl|Unitfix}} || Works within the {{tl|convert}} template:  It render the names of units of measurement readable by the template
|-
|{{tl|Display admin}} || Abbreviates or puts line breaks in long constituency names in {{tl|Infobox town}}, to avoid stretching the box.
|-
|{{tl|Display LG district}} || The same for long local government district names.
|}

Revision as of 20:41, 8 August 2016

Template:Mbox

{{Namefix}} and {{Namefix 2}} and {{Namefix&sort}} are Templates to deal with the fact that place-names have variant forms, and in particular county and territory names. They are not of use within the body of an article but they serve within the programming of other templates.

Wikishire categorises articles by county or territory automatically and it may contain automated links in an infobox, and this categorisation and linking is dependent on have a single, standard name for each county, or we could end up with some articles in "Category:Hills in Devon" and others in "Category:Hills in Devonshire"; both names are correct, but for Wikishire to work it has to work with one version. Therefore if in an infobox a contributors enters the county as "Devonshire", the system will, through these templates, silently emend it to "Devon".

{{Namefix}}

The most important of these templates, {{Namefix}} contains a list of variant names and the standard versions which Wikishire's systems.

Examples are:

Carnarvonshire Caernarfonshire
Caernarvonshire
Devonshire Devon
Downshire County Down
Dumbartonshire Dunbartonshire
Haddingtonshire East Lothian
BIOT British Indian Ocean Territory
Falklands Falkland Islands

The template is used in a great many templates and every Infobox, wherever the contributor is invited to enter the name of a county.

{{Namefix 2}}

{{Namefix 2}} applies {{Namefix}} to any given name, but then adds "the " in front of in the case of certain territories and crown dependencies, for example "the Falkland Islands", "the Isle of Man" and so forth.

This is of use within categorisation protocols, for example {{Infobox waterfall}} will automatically categorise an article as, for example "Category:Waterfalls of Devon" or "Category:Waterfalls of the Falkland Islands"; it is {{Namefix 2}} which adds "the" where required.

This template is mainly used within Categorisation templates.

{{Namefix&sort}}

This is a template to deal with the alphabetical order of county names; for example "County Antrim", and "County Durham" should be listed under "A" and "D" respectively, not "C".

This template is used within categorisation templates to ensure alphabetical sorting, for example in {{Rivers}} so that within "Rivers of Britain and Ireland", the category "Rivers of County Antrim" appears under "A".

Others

template function
{{Check1shire}} Gives an error message if the name entered is not a county nor an overseas territory.
{{Hillfix}} The names of ranges of hills (eg. 'Pennines' replacing 'Pennine Hills')
{{Islegroupfix}} The names of island groupd (eg. 'Isles Scilly' replacing 'Scilly')
{{Mountsort}} Alphabetical sorting, so that hills beginning "Mount" are sorted under the name not the prefix
{{Saintsort}} Alphabetical sorting, so that towns and villages beginning "St" are sorted as if it were written "Saint"
{{Owned by code}} For categories of ownership (see {{Owned by code}}).
{{Unitfix}} Works within the {{convert}} template: It render the names of units of measurement readable by the template
{{Display admin}} Abbreviates or puts line breaks in long constituency names in {{Infobox town}}, to avoid stretching the box.
{{Display LG district}} The same for long local government district names.