Edge Rewrite
// HTMLRewriter · presentation

This page was redesigned at the edge.

Cloudflare fetched the original article and streamed it through HTMLRewriter to apply an entirely new visual system without rebuilding the source page.

Jump to content

Template:Plural/testcases

From Wikipedia, the free encyclopedia

Two parameters

[edit]
{{Plural|0|page}}
{{Plural}}→ 0 pages
0 pages
{{Plural/sandbox}}→ 0 pages
0 pages
{{Plural|1|page}}
{{Plural}}→ 1 page
1 page
{{Plural/sandbox}}→ 1 page
1 page
{{Plural|2|page}}
{{Plural}}→ 2 pages
2 pages
{{Plural/sandbox}}→ 2 pages
2 pages
{{Plural|-1|page}}
{{Plural}}→ -1 page
-1 page
{{Plural/sandbox}}→ -1 page
-1 page
{{Plural|-2|page}}
{{Plural}}→ -2 pages
-2 pages
{{Plural/sandbox}}→ -2 pages
-2 pages
{{Plural|0.5|page}}
{{Plural}}→ 0.5 pages
0.5 pages
{{Plural/sandbox}}→ 0.5 pages
0.5 pages
{{Plural|1.5|page}}
{{Plural}}→ 1.5 pages
1.5 pages
{{Plural/sandbox}}→ 1.5 pages
1.5 pages
{{Plural|-0.5|page}}
{{Plural}}→ -0.5 pages
-0.5 pages
{{Plural/sandbox}}→ -0.5 pages
-0.5 pages
{{Plural|-1.5|page}}
{{Plural}}→ -1.5 pages
-1.5 pages
{{Plural/sandbox}}→ -1.5 pages
-1.5 pages

Three parameters

[edit]
{{Plural|0|ox|oxen}}
{{Plural}}→ 0 oxen
0 oxen
{{Plural/sandbox}}→ 0 oxen
0 oxen
{{Plural|1|ox|oxen}}
{{Plural}}→ 1 ox
1 ox
{{Plural/sandbox}}→ 1 ox
1 ox
{{Plural|2|ox|oxen}}
{{Plural}}→ 2 oxen
2 oxen
{{Plural/sandbox}}→ 2 oxen
2 oxen
{{Plural|-1|ox|oxen}}
{{Plural}}→ -1 ox
-1 ox
{{Plural/sandbox}}→ -1 ox
-1 ox
{{Plural|-2|ox|oxen}}
{{Plural}}→ -2 oxen
-2 oxen
{{Plural/sandbox}}→ -2 oxen
-2 oxen
{{Plural|0.5|ox|oxen}}
{{Plural}}→ 0.5 oxen
0.5 oxen
{{Plural/sandbox}}→ 0.5 oxen
0.5 oxen
{{Plural|1.5|ox|oxen}}
{{Plural}}→ 1.5 oxen
1.5 oxen
{{Plural/sandbox}}→ 1.5 oxen
1.5 oxen
{{Plural|-0.5|ox|oxen}}
{{Plural}}→ -0.5 oxen
-0.5 oxen
{{Plural/sandbox}}→ -0.5 oxen
-0.5 oxen
{{Plural|-1.5|ox|oxen}}
{{Plural}}→ -1.5 oxen
-1.5 oxen
{{Plural/sandbox}}→ -1.5 oxen
-1.5 oxen

with "nb" parameter

[edit]
<div style="width:1em">{{Plural|20|year}}</div>
{{Plural}}→
20 years
<div style="width:1em">20&#32;years</div>
{{Plural/sandbox}}→
20 years
<div style="width:1em">20 years</div>
<div style="width:1em">{{Plural|20|year|nb=}}</div>
{{Plural}}→
20 years
<div style="width:1em">20&#32;years</div>
{{Plural/sandbox}}→
20 years
<div style="width:1em">20 years</div>
<div style="width:1em">{{Plural|20|year|nb=no}}</div>
{{Plural}}→
20 years
<div style="width:1em">20&#32;years</div>
{{Plural/sandbox}}→
20 years
<div style="width:1em">20 years</div>
<div style="width:1em">{{Plural|20|year|nb=y}}</div>
{{Plural}}→
20 years
<div style="width:1em">20&nbsp;years</div>
{{Plural/sandbox}}→
20 years
<div style="width:1em">20&nbsp;years</div>
<div style="width:1em">{{Plural|20|year|nb=1}}</div>
{{Plural}}→
20 years
<div style="width:1em">20&nbsp;years</div>
{{Plural/sandbox}}→
20 years
<div style="width:1em">20&nbsp;years</div>

with "uc" parameter

[edit]
"{{Plural|27|picture|uc=no}}"
{{Plural}}→ "27 pictures"
"27&#32;pictures"
{{Plural/sandbox}}→ "27 pictures"
"27 pictures"
"{{Plural|27|picture|uc=yes}}"
{{Plural}}→ "27 pictures"
"27&#32;pictures"
{{Plural/sandbox}}→ "27 pictures"
"27 pictures"
"{{Plural|1|picture|uc=no}}"
{{Plural}}→ "1 picture"
"1&#32;picture"
{{Plural/sandbox}}→ "1 picture"
"1 picture"
"{{Plural|1|picture|uc=yes}}"
{{Plural}}→ "1 picture"
"1&#32;picture"
{{Plural/sandbox}}→ "1 picture"
"1 picture"
"{{Plural||picture|uc=no}}"
{{Plural}}→ " pictures"
"&#32;pictures"
{{Plural/sandbox}}→ " pictures"
" pictures"
"{{Plural||picture|uc=yes}}"
{{Plural}}→ " pictures"
"&#32;pictures"
{{Plural/sandbox}}→ " pictures"
" pictures"

known issues

[edit]
missing parameters 1/2/3
"{{Plural}}"
{{Plural}}→ "{{{1}}} {{{2}}}s"
"{{{1}}}&#32;{{{2}}}s"
{{Plural/sandbox}}→ "{{{1}}} {{{2}}}s"
"{{{1}}} {{{2}}}s"
empty parameters 1 and 2 (unnamed)
"{{Plural||}}"
{{Plural}}→ " s"
"&#32;s"
{{Plural/sandbox}}→ " s"
" s"
empty parameters 1 and 2 (named)
"{{Plural|1=|2=}}"
{{Plural}}→ " s"
"&#32;s"
{{Plural/sandbox}}→ " s"
" s"
empty parameters 1 and 2 (unnamed) with spaces
"{{Plural| | }}"
{{Plural}}→ " s"
" &#32;s"
{{Plural/sandbox}}→ " s"
"  s"
empty parameters 1 and 2 (named) with spaces
"{{Plural|1= |2= }}"
{{Plural}}→ " s"
"&#32;s"
{{Plural/sandbox}}→ " s"
" s"
empty parameters 1/2/3 (unnamed)
"{{Plural|||}}"
{{Plural}}→ " "
"&#32;"
{{Plural/sandbox}}→ " "
" "
empty parameters 1/2/3 (named)
"{{Plural|1=|2=|3=}}"
{{Plural}}→ " "
"&#32;"
{{Plural/sandbox}}→ " "
" "
empty parameters 1/2/3 (unnamed) with spaces
"{{Plural| | | }}"
{{Plural}}→ " "
" &#32;"
{{Plural/sandbox}}→ " "
"  "
empty parameters 1/2/3 (named) with spaces
"{{Plural|1= |2= |3= }}"
{{Plural}}→ " "
"&#32;"
{{Plural/sandbox}}→ " "
" "
"{{Plural| 2 | page }}"
{{Plural}}→ " 2 page s"
" 2 &#32;page s"
{{Plural/sandbox}}→ " 2 page s"
" 2  page s"
"{{Plural|1= 2 |2= page }}"
{{Plural}}→ "2 pages"
"2&#32;pages"
{{Plural/sandbox}}→ "2 pages"
"2 pages"
"{{Plural| 1 | ox | oxen }}"
{{Plural}}→ " 1 ox"
" 1 &#32;ox"
{{Plural/sandbox}}→ " 1 ox"
" 1  ox"
"{{Plural|1= 1 |2= ox |3= oxen }}"
{{Plural}}→ "1 ox"
"1&#32;ox"
{{Plural/sandbox}}→ "1 ox"
"1 ox"
"{{Plural| 2 | ox | oxen }}"
{{Plural}}→ " 2 oxen"
" 2 &#32;oxen"
{{Plural/sandbox}}→ " 2 oxen"
" 2  oxen"
"{{Plural|1= 2 |2= ox |3= oxen }}"
{{Plural}}→ "2 oxen"
"2&#32;oxen"
{{Plural/sandbox}}→ "2 oxen"
"2 oxen"

Usage of empty-name parameter

[edit]
"{{Plural|1=103|2=cat|=blabla}}"
"{{Plural|1=103|2=cat|=blabla}}"
{{Plural}}→ "103 cats"
"103&#32;cats"
{{Plural/sandbox}}→ "103 cats"
"103 cats"