Difference between revisions of "Template:Country data Ireland/doc"

From blackwiki
Jump to navigation Jump to search
imported>SiBr4
imported>SiBr4
(Replacing <tt>s (WP:HTML5))
Line 2: Line 2:
 
This template is intended to be used for all-Ireland instances, usually resulting in a wikilink to [[Ireland]] (article about the island) instead of [[Republic of Ireland]] (article about the sovereign nation).
 
This template is intended to be used for all-Ireland instances, usually resulting in a wikilink to [[Ireland]] (article about the island) instead of [[Republic of Ireland]] (article about the sovereign nation).
  
However, it is often convenient to use <tt><nowiki>{{flagicon|Ireland}}</nowiki></tt> and <tt><nowiki>{{flag|Ireland}}</nowiki></tt> instead of <tt><nowiki>{{flagicon|Republic of Ireland}}</nowiki></tt> and <tt><nowiki>{{flag|Republic of Ireland}}</nowiki></tt> respectively, so this template differs from the standard format in order to accommodate that usage. The <tt>alias</tt> parameter changes depending on whether or not a flag variant is used by the parent template call:
+
However, it is often convenient to use {{tnull|flagicon|Ireland}} and {{tnull|flag|Ireland}} instead of {{tnull|flagicon|Republic of Ireland}} and {{tnull|flag|Republic of Ireland}} respectively, so this template differs from the standard format in order to accommodate that usage. The {{mono|alias}} parameter changes depending on whether or not a flag variant is used by the parent template call:
 
<pre>
 
<pre>
 
alias = {{#if:{{{variant|}}}|Ireland|Republic of Ireland}}
 
alias = {{#if:{{{variant|}}}|Ireland|Republic of Ireland}}
 
</pre>
 
</pre>
 
This results in
 
This results in
*<tt><nowiki>{{flag|Ireland|1783}}</nowiki></tt> → {{flag|Ireland|1783}} ''(use for Ireland as part of [[United Kingdom of Great Britain and Ireland]])''
+
*{{tnull|flag|Ireland|1783}} → {{flag|Ireland|1783}} ''(use for Ireland as part of [[United Kingdom of Great Britain and Ireland]])''
*<tt><nowiki>{{flag|Ireland}}</nowiki></tt> → {{flag|Ireland}} ''(use for current state)''
+
*{{tnull|flag|Ireland}} → {{flag|Ireland}} ''(use for current state)''
  
 
=== Sporting teams ===
 
=== Sporting teams ===
 
Also, several sport-specific flag variants are maintained here, and these are automatically used by the respective sport team templates:
 
Also, several sport-specific flag variants are maintained here, and these are automatically used by the respective sport team templates:
* <tt><nowiki>{{fb|Ireland}}</nowiki></tt> → {{fb|Ireland}} ''(football, 1882–1922)''
+
* {{tnull|fb|Ireland}} → {{fb|Ireland}} ''(football, 1882–1922)''
* <tt><nowiki>{{fh|Ireland}}</nowiki></tt> → {{fh|Ireland}} ''(field hockey)''
+
* {{tnull|fh|Ireland}} → {{fh|Ireland}} ''(field hockey)''
* <tt><nowiki>{{rl|Ireland}}</nowiki></tt> → {{rl|Ireland}} ''(rugby league)''
+
* {{tnull|rl|Ireland}} → {{rl|Ireland}} ''(rugby league)''
* <tt><nowiki>{{ih|Ireland}}</nowiki></tt> → {{ih|Ireland}} ''(ice hockey)'' — all-Ireland team that uses the tri-colour
+
* {{tnull|ih|Ireland}} → {{ih|Ireland}} ''(ice hockey)'' — all-Ireland team that uses the tri-colour
* <tt><nowiki>{{ru|Ireland}}</nowiki></tt> → {{ru|Ireland}} ''(rugby union)''
+
* {{tnull|ru|Ireland}} → {{ru|Ireland}} ''(rugby union)''
* <tt><nowiki>{{cr|Ireland}}</nowiki></tt> → {{cr|Ireland}} ''(cricket)''
+
* {{tnull|cr|Ireland}} → {{cr|Ireland}} ''(cricket)''
  
 
===Use of country code aliases===
 
===Use of country code aliases===
 
The standard country code for the Republic of Ireland is '''IRL''', so it can be used as an alias for [[Template:Country data Republic of Ireland]]. The non-standard country codes '''IRE''' and '''EIR''' are used as aliases for this template to provide similar convenience. For example:
 
The standard country code for the Republic of Ireland is '''IRL''', so it can be used as an alias for [[Template:Country data Republic of Ireland]]. The non-standard country codes '''IRE''' and '''EIR''' are used as aliases for this template to provide similar convenience. For example:
*<tt><nowiki>{{flagicon|IRL}}</nowiki></tt> → {{flagicon|IRL}}
+
*{{tnull|flagicon|IRL}} → {{flagicon|IRL}}
*<tt><nowiki>{{flagicon|IRE|1783}}</nowiki></tt> → {{flagicon|IRE|1783}}
+
*{{tnull|flagicon|IRE|1783}} → {{flagicon|IRE|1783}}
*<tt><nowiki>{{flagicon|IRE|4prov}}</nowiki></tt> → {{flagicon|IRE|4prov}}
+
*{{tnull|flagicon|IRE|4prov}} → {{flagicon|IRE|4prov}}
*<tt><nowiki>{{fb|IRL}}</nowiki></tt> → {{fb|IRL}} ''(links to [[Republic of Ireland national football team]])''
+
*{{tnull|fb|IRL}} → {{fb|IRL}} ''(links to [[Republic of Ireland national football team]])''
*<tt><nowiki>{{fb|IRE}}</nowiki></tt> ''or'' <tt><nowiki>{{fb|EIR}}</nowiki></tt> → {{fb|IRE}} ''(links to [[Ireland national football team (1882–1950)]])''
+
*{{tnull|fb|IRE}} ''or'' {{tnull|fb|EIR}} → {{fb|IRE}} ''(links to [[Ireland national football team (1882–1950)]])''
  
 
====Incorrect usage====
 
====Incorrect usage====
 
Do not use the IRL alias for all-Ireland sports team, and do not use the IRE/EIR aliases without a flag variant specified. The following examples should not be used.
 
Do not use the IRL alias for all-Ireland sports team, and do not use the IRE/EIR aliases without a flag variant specified. The following examples should not be used.
*<tt><nowiki>{{flagicon|IRE}}</nowiki></tt> → {{flagicon|IRE}} (''Works, but better to use the standard country code for IRL.'')
+
*{{tnull|flagicon|IRE}} → {{flagicon|IRE}} (''Works, but better to use the standard country code for IRL.'')
*<tt><nowiki>{{fh|IRL}}</nowiki></tt> → <s>{{fh|IRL}}</s> (''Use'' <tt><nowiki>{{fh|IRE}}</nowiki></tt> ''instead'')
+
*{{tnull|fh|IRL}} → <s>{{fh|IRL}}</s> (''Use'' {{tnull|fh|IRE}} ''instead'')
  
 
==Other flags==
 
==Other flags==
<tt>Country_data</tt> templates are also available for each of the four traditional [[provinces of Ireland]]:
+
{{mono|Country_data}} templates are also available for each of the four traditional [[provinces of Ireland]]:
 
{| style="background-color:#ecfcf4"
 
{| style="background-color:#ecfcf4"
 
| [[Template:Country data Connacht]] || {{flag|Connacht}}
 
| [[Template:Country data Connacht]] || {{flag|Connacht}}

Revision as of 12:56, 29 September 2015

This template is intended to be used for all-Ireland instances, usually resulting in a wikilink to Ireland (article about the island) instead of Republic of Ireland (article about the sovereign nation).

However, it is often convenient to use {{flagicon|Ireland}} and {{flag|Ireland}} instead of {{flagicon|Republic of Ireland}} and {{flag|Republic of Ireland}} respectively, so this template differs from the standard format in order to accommodate that usage. The alias parameter changes depending on whether or not a flag variant is used by the parent template call:

alias = {{#if:{{{variant|}}}|Ireland|Republic of Ireland}}

This results in

Sporting teams

Also, several sport-specific flag variants are maintained here, and these are automatically used by the respective sport team templates:

Use of country code aliases

The standard country code for the Republic of Ireland is IRL, so it can be used as an alias for Template:Country data Republic of Ireland. The non-standard country codes IRE and EIR are used as aliases for this template to provide similar convenience. For example:

Incorrect usage

Do not use the IRL alias for all-Ireland sports team, and do not use the IRE/EIR aliases without a flag variant specified. The following examples should not be used.

  • {{flagicon|IRE}}23x15px (Works, but better to use the standard country code for IRL.)
  • {{fh|IRL}}23x15px Ireland (Use {{fh|IRE}} instead)

Other flags

Country_data templates are also available for each of the four traditional provinces of Ireland:

Template:Country data Connacht 23x15px Connacht
Template:Country data Leinster 23x15px Leinster
Template:Country data Munster 23x15px Munster
Template:Country data Ulster 23x15px Ulster