This is the template test cases page for the sandbox of Template:Infobox person/length. to update the examples. If there are many examples of a complicated template, later ones may break due to limits in MediaWiki; see the HTML comment "NewPP limit report" in the rendered page. You can also use Special:ExpandTemplates to examine the results of template uses. You can test how this page looks in the different skins and parsers with these links: |
The following tests compare the output of:
- {{Infobox person/length}}, implemented via Module:Person length since 7 October 2019
- {{Infobox person/length/sandbox}}, using Module:Person length/sandbox
cm
editm
editin
editmissing space after number
edit after number
edittext after length (year, reference)
editconvert template as input
edit{{Infobox person/length|78 inches (198 cm)}}78 in (198 cm)
78 in (198 cm)
{{Infobox person/length/sandbox}}
78 in (198 cm)78 in (198 cm)
{{Infobox person/length|78 inches (1.98 m)}}78 in (1.98 m)
78 in (1.98 m)
{{Infobox person/length/sandbox}}
78 in (1.98 m)78 in (1.98 m)
{{Infobox person/length|198 centimetres (78 in)}}198 cm (78 in)
198 cm (78 in)
{{Infobox person/length/sandbox}}
198 cm (78 in)198 cm (78 in)
{{Infobox person/length|1.98 metres (78 in)}}1.98 m (78 in)
1.98 m (78 in)
{{Infobox person/length/sandbox}}
1.98 m (78 in)1.98 m (78 in)
convert template as input, with abbreviated linked unit names
edit{{Infobox person/length|78 [[inch|in]] (198 [[Centimetre|cm]])}}78 in (198 cm)
78 [[inch|in]] (198 [[Centimetre|cm]])
{{Infobox person/length/sandbox}}
78 in (198 cm)78 [[inch|in]] (198 [[Centimetre|cm]])
{{Infobox person/length|78 [[inch|in]] (1.98 [[Metre|m]])}}78 in (1.98 m)
78 [[inch|in]] (1.98 [[Metre|m]])
{{Infobox person/length/sandbox}}
78 in (1.98 m)78 [[inch|in]] (1.98 [[Metre|m]])
{{Infobox person/length|198 [[Centimetre|cm]] (78 [[inch|in]])}}198 cm (78 in)
198 [[Centimetre|cm]] (78 [[inch|in]])
{{Infobox person/length/sandbox}}
198 cm (78 in)198 [[Centimetre|cm]] (78 [[inch|in]])
{{Infobox person/length|1.98 [[Metre|m]] (78 [[inch|in]])}}1.98 m (78 in)
1.98 [[Metre|m]] (78 [[inch|in]])
{{Infobox person/length/sandbox}}
1.98 m (78 in)1.98 [[Metre|m]] (78 [[inch|in]])
convert template as input, with unabbreviated linked unit names
edit{{Infobox person/length|78 [[inch|inches]] (198 [[centimetre]]s)}}78 in (198 cm)
78 [[inch|in]] (198 [[Centimetre|cm]])
{{Infobox person/length/sandbox}}
78 in (198 cm)78 [[inch|in]] (198 [[Centimetre|cm]])
{{Infobox person/length|78 [[inch|inches]] (1.98 [[metre]]s)}}78 in (1.98 m)
78 [[inch|in]] (1.98 [[Metre|m]])
{{Infobox person/length/sandbox}}
78 in (1.98 m)78 [[inch|in]] (1.98 [[Metre|m]])
{{Infobox person/length|198 [[centimetre]]s (78 [[inch|inches]])}}198 cm (78 in)
198 [[Centimetre|cm]] (78 [[inch|in]])
{{Infobox person/length/sandbox}}
198 cm (78 in)198 [[Centimetre|cm]] (78 [[inch|in]])
{{Infobox person/length|1.98 [[metre]]s (78 [[inch|inches]])}}1.98 m (78 in)
1.98 [[Metre|m]] (78 [[inch|in]])
{{Infobox person/length/sandbox}}
1.98 m (78 in)1.98 [[Metre|m]] (78 [[inch|in]])
Exceptions
editDoes not replace numbers in manually entered conversions, but does replace unit names with abbreviations (examples intentionally show incorrect conversions):
Does not replace numeric output of conversion templates such as {{convert}}, but does replace unit names with abbreviations (examples intentionally show different precision than usual):
{{Infobox person/length|78 inches (198.1 centimeters)}}78 in (198.1 cm)
78 in (198.1 cm)
{{Infobox person/length/sandbox}}
78 in (198.1 cm)78 in (198.1 cm)
{{Infobox person/length|78 [[inch|inches]] (1.981 [[Metre|meters]])}}78 in (1.981 m)
78 [[inch|in]] (1.981 [[Metre|m]])
{{Infobox person/length/sandbox}}
78 in (1.981 m)78 [[inch|in]] (1.981 [[Metre|m]])
{{Infobox person/length|198 [[centimetre]]s (77.95 [[inch|inches]])}}198 cm (77.95 in)
198 [[Centimetre|cm]] (77.95 [[inch|in]])
{{Infobox person/length/sandbox}}
198 cm (77.95 in)198 [[Centimetre|cm]] (77.95 [[inch|in]])
{{Infobox person/length|1.98 metres (77.95 inches)}}1.98 m (77.95 in)
1.98 m (77.95 in)
{{Infobox person/length/sandbox}}
1.98 m (77.95 in)1.98 m (77.95 in)
Areas for improvement
editConversion not displayed if unit name contains uppercase characters:
Conversion not displayed if symbols are used for inches:
Does not recognize symbols for inches in manually entered conversion (adds second conversion):
Does not convert feet (ft) or yards (yd):
If {{convert}} template displays feet or yards, it is not abbreviated:
{{Infobox person/length|1 foot 1 inch (33 centimetres)}}1 foot 1 in (33 cm)
1 foot 1 in (33 cm)
{{Infobox person/length/sandbox}}
1 foot 1 in (33 cm)1 foot 1 in (33 cm)
{{Infobox person/length|6 feet 6 inches (1.98 metres)}}6 feet 6 in (1.98 m)
6 feet 6 in (1.98 m)
{{Infobox person/length/sandbox}}
6 feet 6 in (1.98 m)6 feet 6 in (1.98 m)
{{Infobox person/length|6 [[Foot (unit)|feet]] 6 [[inch|inches]] (1.98 [[metre]]s)}}6 feet 6 in (1.98 m)
6 [[Foot (unit)|feet]] 6 [[inch|in]] (1.98 [[Metre|m]])
{{Infobox person/length/sandbox}}
6 feet 6 in (1.98 m)6 [[Foot (unit)|feet]] 6 [[inch|in]] (1.98 [[Metre|m]])
{{Infobox person/length|1 yard 1 foot (122 centimetres)}}1 yard 1 foot (122 cm)
1 yard 1 foot (122 cm)
{{Infobox person/length/sandbox}}
1 yard 1 foot (122 cm)1 yard 1 foot (122 cm)
{{Infobox person/length|1 [[yard]] 1 [[Foot (unit)|foot]] (122 [[centimetre]]s)}}1 yard 1 foot (122 cm)
1 [[yard]] 1 [[Foot (unit)|foot]] (122 [[Centimetre|cm]])
{{Infobox person/length/sandbox}}
1 yard 1 foot (122 cm)1 [[yard]] 1 [[Foot (unit)|foot]] (122 [[Centimetre|cm]])
{{Infobox person/length|1=2 yards <span class="frac">1<span class="sr-only">+</span><span class="num">1</span>⁄<span class="den">2</span></span> feet (2.29 metres)}}2 yards 1+1⁄2 feet (2.29 m)
'"`UNIQ--templatestyles-00000091-QINU`"'2 yards <span class="frac">1<span class="sr-only">+</span><span class="num">1</span>⁄<span class="den">2</span></span> feet (2.29 m)
{{Infobox person/length/sandbox}}
2 yards 1+1⁄2 feet (2.29 m)'"`UNIQ--templatestyles-00000091-QINU`"'2 yards <span class="frac">1<span class="sr-only">+</span><span class="num">1</span>⁄<span class="den">2</span></span> feet (2.29 m)
{{Infobox person/length|1=2 [[yard]]s <span class="frac">1<span class="sr-only">+</span><span class="num">1</span>⁄<span class="den">2</span></span> [[Foot (unit)|feet]] (2.29 [[metre]]s)}}2 yards 1+1⁄2 feet (2.29 m)
'"`UNIQ--templatestyles-00000096-QINU`"'2 [[yard]]s <span class="frac">1<span class="sr-only">+</span><span class="num">1</span>⁄<span class="den">2</span></span> [[Foot (unit)|feet]] (2.29 [[Metre|m]])
{{Infobox person/length/sandbox}}
2 yards 1+1⁄2 feet (2.29 m)'"`UNIQ--templatestyles-00000096-QINU`"'2 [[yard]]s <span class="frac">1<span class="sr-only">+</span><span class="num">1</span>⁄<span class="den">2</span></span> [[Foot (unit)|feet]] (2.29 [[Metre|m]])
If {{convert}} displays feet or yards in conversion, a second conversion is displayed (only for unlinked unit names):
{{Infobox person/length|33 centimetres (1 foot 1 inch)}}33 cm (1 foot 1 in)
33 cm (1 foot 1 in)
{{Infobox person/length/sandbox}}
33 cm (1 foot 1 in)33 cm (1 foot 1 in)
{{Infobox person/length|1.98 metres (6 feet 6 inches)}}1.98 m (6 feet 6 in)
1.98 m (6 feet 6 in)
{{Infobox person/length/sandbox}}
1.98 m (6 feet 6 in)1.98 m (6 feet 6 in)
{{Infobox person/length|1.98 [[metre]]s (6 [[Foot (unit)|feet]] 6 [[inch|inches]])}}1.98 m (6 feet 6 in)
1.98 [[Metre|m]] (6 [[Foot (unit)|feet]] 6 [[inch|in]])
{{Infobox person/length/sandbox}}
1.98 m (6 feet 6 in)1.98 [[Metre|m]] (6 [[Foot (unit)|feet]] 6 [[inch|in]])
{{Infobox person/length|122 centimetres (1 yard 1 foot)}}122 cm (48 in) (1 yard 1 foot)
122 cm (48 in) (1 yard 1 foot)
{{Infobox person/length/sandbox}}
122 cm (48 in) (1 yard 1 foot)122 cm (48 in) (1 yard 1 foot)
{{Infobox person/length|122 [[centimetre]]s (1 [[yard]] 1 [[Foot (unit)|foot]])}}122 cm (1 yard 1 foot)
122 [[Centimetre|cm]] (1 [[yard]] 1 [[Foot (unit)|foot]])
{{Infobox person/length/sandbox}}
122 cm (1 yard 1 foot)122 [[Centimetre|cm]] (1 [[yard]] 1 [[Foot (unit)|foot]])
{{Infobox person/length|1=2.29 metres (2 yards <span class="frac">1<span class="sr-only">+</span><span class="num">1</span>⁄<span class="den">2</span></span> feet)}}2.29 m (2 yards 1+1⁄2 feet)
'"`UNIQ--templatestyles-000000AD-QINU`"'2.29 m (2 yards <span class="frac">1<span class="sr-only">+</span><span class="num">1</span>⁄<span class="den">2</span></span> feet)
{{Infobox person/length/sandbox}}
2.29 m (2 yards 1+1⁄2 feet)'"`UNIQ--templatestyles-000000AD-QINU`"'2.29 m (2 yards <span class="frac">1<span class="sr-only">+</span><span class="num">1</span>⁄<span class="den">2</span></span> feet)
{{Infobox person/length|1=2.29 [[metre]]s (2 [[yard]]s <span class="frac">1<span class="sr-only">+</span><span class="num">1</span>⁄<span class="den">2</span></span> [[Foot (unit)|feet]])}}2.29 m (2 yards 1+1⁄2 feet)
'"`UNIQ--templatestyles-000000B2-QINU`"'2.29 [[Metre|m]] (2 [[yard]]s <span class="frac">1<span class="sr-only">+</span><span class="num">1</span>⁄<span class="den">2</span></span> [[Foot (unit)|feet]])
{{Infobox person/length/sandbox}}
2.29 m (2 yards 1+1⁄2 feet)'"`UNIQ--templatestyles-000000B2-QINU`"'2.29 [[Metre|m]] (2 [[yard]]s <span class="frac">1<span class="sr-only">+</span><span class="num">1</span>⁄<span class="den">2</span></span> [[Foot (unit)|feet]])
Conversion not displayed if using {{nbsp}} after number (use instead):
{{Infobox person/length|1=198<span class="nowrap"> </span>cm}}198 cm
198<span class="nowrap"> </span>cm
{{Infobox person/length/sandbox}}
198 cm198<span class="nowrap"> </span>cm
{{Infobox person/length|1=1.98<span class="nowrap"> </span>m}}1.98 m
1.98<span class="nowrap"> </span>m
{{Infobox person/length/sandbox}}
1.98 m1.98<span class="nowrap"> </span>m
{{Infobox person/length|1=78<span class="nowrap"> </span>in}}78 in
78<span class="nowrap"> </span>in
{{Infobox person/length/sandbox}}
78 in78<span class="nowrap"> </span>in
Conversion not displayed for some fractions supported in {{convert}} such as +1⁄2 or +1//2 (use +1/2 instead):
- {{cvt|78+1⁄2|in|cm|0}} → 78+1⁄2 in (199 cm)
- {{cvt|78+1//2|in|cm|0}} → 78+1/2 in (199 cm)