Revision as of 20:34, 22 April 2012 view sourceArcticocean (talk | contribs)Edit filter managers, Extended confirmed users46,227 editsm Protected Template:Numrec: Highly-visible templates ( (indefinite) (indefinite))← Previous edit | Latest revision as of 08:22, 10 December 2018 view source Daviddwd (talk | contribs)Extended confirmed users13,790 editsNo edit summary | ||
(13 intermediate revisions by 6 users not shown) | |||
Line 1: | Line 1: | ||
{{#ifeq: {{{asof}}}|S|{{{alt|As of}}}{{sp}}{{#if: {{Numrec/{{{1| |
{{#ifeq: {{{asof}}}|S|{{{alt|As of}}}{{sp}}{{#if: {{Numrec/{{{1|Palestine}}}|D}}|{{Numrec/{{{1|Palestine}}}|D}}{{sp}}}}{{#if: {{Numrec/{{{1|Palestine}}}|M}}|{{Numrec/{{{1|Palestine}}}|M}}{{sp}}}}{{Numrec/{{{1|Palestine}}}|Y}},{{sp}}}}{{#if: {{{alt2|}}}|{{{alt2}}}{{sp}}}}{{#ifeq: {{{link}}}|N|{{#if: {{{2|}}}|{{{2}}} }}{{#if: {{{pcent|}}}|{{pct|{{#expr:{{Numrec/{{{1|Palestine}}}|{{#if: {{{W|}}}|W|N}} }}+{{{N|0}}}}}|{{#ifeq:{{{pcent}}}|UN|{{UNnum}}|{{{pcent}}}}}|1}}|{{#ifeq: {{{spell}}}|N|{{#expr:{{Numrec/{{{1|Palestine}}}|{{#if: {{{W|}}}|W|N}} }}+{{{N|0}}} }}|{{#ifexpr:{{Numrec/{{{1|Palestine}}}|{{#if: {{{W|}}}|W|N}} }}+{{{N|0}}}<10 | {{spellnum|{{#expr:{{Numrec/{{{1|Palestine}}}|{{#if: {{{W|}}}|W|N}} }}+{{{N|0}}}}}}} | {{#expr:{{Numrec/{{{1|Palestine}}}|{{#if: {{{W|}}}|W|N}} }}+{{{N|0}}}}} }}}}}}{{#if:{{{3|}}}| {{{3}}} }}|]}}{{#ifeq:{{{asof}}}|E|{{sp}}{{{alt|as of}}}{{sp}}{{#if: {{Numrec/{{{1|Palestine}}}|D}}|{{Numrec/{{{1|Palestine}}}|D}}{{sp}}}}{{#if:{{Numrec/{{{1|Palestine}}}|M}}|{{Numrec/{{{1|Palestine}}}|M}}{{sp}}}}{{Numrec/{{{1|Palestine}}}|Y}} }}<noinclude>{{documentation | ||
|content = | |content = | ||
This template is used to display the current number of member states which recognize a particular state. To update the number, month, year, or name produced by this template, you must modify the corresponding subtemplate. | This template is used to display the current number of member states which recognize a particular state. To update the number, month, year, or name produced by this template, you must modify the corresponding subtemplate. | ||
==== List of subtemplates ==== | ==== List of subtemplates ==== | ||
{{Special:PrefixIndex/Template:Numrec/}} | {{Special:PrefixIndex/Template:Numrec/|hideredirects=1}} | ||
=== Usage === | === Usage === | ||
The first parameter corresponds to a subtemplate of this template, e.g., <code> |
The first parameter corresponds to a subtemplate of this template, e.g., <code>Palestine</code> for {{tl|Numrec/Palestine}}. The second and third parameter inserts wikilinked text before and after the number. Other optional parameters are: | ||
* <code>asof = S</code> to turn on the "As of" prefix (start) | * <code>asof = S</code> to turn on the "As of" prefix (start) | ||
* <code>asof = E</code> to turn on the "as of" suffix (end) | * <code>asof = E</code> to turn on the "as of" suffix (end) | ||
Line 13: | Line 13: | ||
* <code>alt2 = bar</code> to add "bar" after the "As of" date and before the wikilinked text | * <code>alt2 = bar</code> to add "bar" after the "As of" date and before the wikilinked text | ||
* <code>link = N</code> to turn off linking | * <code>link = N</code> to turn off linking | ||
* <code>spell = N</code> to turn off spelling out numbers less than 10 and listing them simply as integers. | |||
* <code>pcent = total number</code> to add a percentage out of "total number". If pcent=UN then the total number of UN member states is used. | * <code>pcent = total number</code> to add a percentage out of "total number". If pcent=UN then the total number of UN member states is used. | ||
* <code>N = number</code> outputs "Number of recognizers + N". This is useful in situations where non-UN member states are to be included in the total. | * <code>N = number</code> outputs "Number of recognizers + N". This is useful in situations where non-UN member states are to be included in the total. | ||
* <code>W = Y</code> outputs number of states who have withdrawn recognition as opposed to the number of recognizers. | |||
=== Examples === | === Examples === | ||
* <code><nowiki>{{Numrec| |
* <code><nowiki>{{Numrec|Palestine|the|countries}}</nowiki></code> → {{Numrec|Palestine|the|countries}} | ||
* <code><nowiki>{{Numrec| |
* <code><nowiki>{{Numrec|Palestine|the|countries|link=N}}</nowiki></code> → {{Numrec|Palestine|the|countries|link=N}} | ||
* <code><nowiki>{{Numrec| |
* <code><nowiki>{{Numrec|Abkhazia|the|countries}}</nowiki></code> → {{Numrec|Abkhazia|the|countries}} | ||
* <code><nowiki>{{Numrec| |
* <code><nowiki>{{Numrec|Abkhazia|the|countries|spell=N}}</nowiki></code> → {{Numrec|Abkhazia|the|countries|spell=N}} | ||
* <code><nowiki>{{Numrec| |
* <code><nowiki>{{Numrec|Palestine|although|of the countries|link=N|pcent=193}}</nowiki></code> → {{Numrec|Palestine|although|of the countries|link=N|pcent=193}} | ||
* <code><nowiki>{{Numrec| |
* <code><nowiki>{{Numrec|Palestine|a total of|countries ...|link=N|asof=S}}</nowiki></code> → {{Numrec|Palestine|a total of|countries ...|link=N|asof=S}} | ||
* <code><nowiki>{{Numrec| |
* <code><nowiki>{{Numrec|Palestine|a total of|countries ...|link=N|asof=S|alt=as of }}</nowiki></code> → {{Numrec|Palestine|a total of|countries ...|link=N|asof=S|alt=as of }} | ||
* <code><nowiki>{{Numrec|Palestine|a total of|countries ...|link=N|asof=E}}</nowiki></code> → {{Numrec|Palestine|a total of|countries ...|link=N|asof=E}} | |||
* <code><nowiki>{{Numrec|Palestine|a total of|countries ...|link=N|asof=E|alt=, by }}</nowiki></code> → {{Numrec|Palestine|a total of|countries ...|link=N|asof=E|alt=, by }} | |||
* <code><nowiki>{{Numrec|Israel|a total of|countries that recognize Israeli statehood|asof=S|alt2=there are}}</nowiki></code> → {{Numrec|Israel|a total of|countries that recognize Israeli statehood|asof=S|alt2=there are}} | |||
}} | }} | ||
⚫ | ] | ||
<templatedata> | |||
{ | |||
"params": { | |||
"1": { | |||
"label": "State", | |||
"description": "State of limited recognition", | |||
"default": "Palestine", | |||
"required": true, | |||
"type": "string" | |||
}, | |||
"2": { | |||
"label": "linked text before number", | |||
"example": "\"the\", \"a total of\"", | |||
"type": "string", | |||
"description": "Text before number/percent included in the wikilink" | |||
}, | |||
"3": { | |||
"label": "linked text after number", | |||
"example": "that recognize Kosovo", | |||
"type": "string", | |||
"description": "Text after the number/percent included in the wikilink" | |||
}, | |||
"asof": { | |||
"label": "Show 'as of'?", | |||
"description": "Shows 'as of' at start or end", | |||
"example": "S (start), E (end)", | |||
"type": "string", | |||
"suggested": true | |||
}, | |||
"alt": { | |||
"label": "Alternate prefix/suffix text", | |||
"description": "Replaces 'As of' with the text entered", | |||
"example": "\", by\"", | |||
"type": "string" | |||
}, | |||
"alt2": { | |||
"label": "text before wikilink", | |||
"type": "unbalanced-wikitext", | |||
"description": "Text included between the date (if shown) and wikilinked text" | |||
}, | |||
"link": { | |||
"label": "Show link?", | |||
"description": "If 'N', disables links", | |||
"example": "N", | |||
"type": "string" | |||
}, | |||
"pcent": { | |||
"aliases": [ | |||
"percent" | |||
], | |||
"label": "Show as percent?", | |||
"description": "If a number, shows percent of countries recognizing the state", | |||
"example": "UN (or, \"total number\")", | |||
"type": "string" | |||
}, | |||
"W": { | |||
"label": "States that withdrew recognition?", | |||
"description": "If 'Y', shows states that withdrew recognition instead of currently extend", | |||
"example": "Y", | |||
"type": "string", | |||
"aliases": [ | |||
"show_withdrawn" | |||
] | |||
}, | |||
"N": { | |||
"label": "UN non-member states recognizing", | |||
"description": "Number of states which have extended recognition", | |||
"example": "4", | |||
"type": "number" | |||
}, | |||
"spell": { | |||
"label": "Spell numbers less than 10?", | |||
"description": "If 'N', lists numbers less than 10 as integers (default is to spell them out)", | |||
"example": "N", | |||
"type": "string" | |||
} | |||
}, | |||
"description": "This template is used to display the current number of member states which recognize a particular state. To update the number, month, year, or name produced by this template, you must modify the corresponding subtemplate." | |||
} | |||
</templatedata> | |||
⚫ | ] | ||
</noinclude> | </noinclude> |
Latest revision as of 08:22, 10 December 2018
Template documentationThis template is used to display the current number of member states which recognize a particular state. To update the number, month, year, or name produced by this template, you must modify the corresponding subtemplate.
List of subtemplates
- Numrec/Abkhazia
- Numrec/Holy See
- Numrec/Israel
- Numrec/Kosovo
- Numrec/Palestine
- Numrec/Republic of China
- Numrec/Sahrawi Arab Democratic Republic
- Numrec/South Ossetia
- Numrec/sandbox
- Numrec/subdoc
- Numrec/testcases
Usage
The first parameter corresponds to a subtemplate of this template, e.g., Palestine
for {{Numrec/Palestine}}. The second and third parameter inserts wikilinked text before and after the number. Other optional parameters are:
asof = S
to turn on the "As of" prefix (start)asof = E
to turn on the "as of" suffix (end)alt = foo
to change the "As of" prefix to "foo"alt2 = bar
to add "bar" after the "As of" date and before the wikilinked textlink = N
to turn off linkingspell = N
to turn off spelling out numbers less than 10 and listing them simply as integers.pcent = total number
to add a percentage out of "total number". If pcent=UN then the total number of UN member states is used.N = number
outputs "Number of recognizers + N". This is useful in situations where non-UN member states are to be included in the total.W = Y
outputs number of states who have withdrawn recognition as opposed to the number of recognizers.
Examples
{{Numrec|Palestine|the|countries}}
→ the 146 countries{{Numrec|Palestine|the|countries|link=N}}
→ the 146 countries{{Numrec|Abkhazia|the|countries}}
→ the seven countries{{Numrec|Abkhazia|the|countries|spell=N}}
→ the 7 countries{{Numrec|Palestine|although|of the countries|link=N|pcent=193}}
→ although 75.6% of the countries{{Numrec|Palestine|a total of|countries ...|link=N|asof=S}}
→ As of 21 June 2024, a total of 146 countries ...{{Numrec|Palestine|a total of|countries ...|link=N|asof=S|alt=as of }}
→ as of 21 June 2024, a total of 146 countries ...{{Numrec|Palestine|a total of|countries ...|link=N|asof=E}}
→ a total of 146 countries ... as of 21 June 2024{{Numrec|Palestine|a total of|countries ...|link=N|asof=E|alt=, by }}
→ a total of 146 countries ... , by 21 June 2024{{Numrec|Israel|a total of|countries that recognize Israeli statehood|asof=S|alt2=there are}}
→ As of 12 December 2020, there are a total of 165 countries that recognize Israeli statehood
Subpages of this template.
This template is used to display the current number of member states which recognize a particular state. To update the number, month, year, or name produced by this template, you must modify the corresponding subtemplate.
Parameter | Description | Type | Status | |
---|---|---|---|---|
State | 1 | State of limited recognition
| String | required |
linked text before number | 2 | Text before number/percent included in the wikilink
| String | optional |
linked text after number | 3 | Text after the number/percent included in the wikilink
| String | optional |
Show 'as of'? | asof | Shows 'as of' at start or end
| String | suggested |
Alternate prefix/suffix text | alt | Replaces 'As of' with the text entered
| String | optional |
text before wikilink | alt2 | Text included between the date (if shown) and wikilinked text | Unbalanced wikitext | optional |
Show link? | link | If 'N', disables links
| String | optional |
Show as percent? | pcent percent | If a number, shows percent of countries recognizing the state
| String | optional |
States that withdrew recognition? | W show_withdrawn | If 'Y', shows states that withdrew recognition instead of currently extend
| String | optional |
UN non-member states recognizing | N | Number of states which have extended recognition
| Number | optional |
Spell numbers less than 10? | spell | If 'N', lists numbers less than 10 as integers (default is to spell them out)
| String | optional |