Template:Infobox person/weight/testcases
This is the template test cases page for the sandbox of Template:Infobox person/weight. 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/weight}}, implemented via Module:Person weight since 30 September 2019
- {{Infobox person/weight/sandbox}}, using Module:Person weight/sandbox
- {{Infobox person/weight/sandbox2}}, a copy of template prior to creation of Lua module
kilograms[edit]
1 kg (2 lb)
{{Infobox person/weight/sandbox}}
1 kg (2 lb)
{{Infobox person/weight/sandbox2}}
1 kg (2 lb)
100 kg (220 lb)
{{Infobox person/weight/sandbox}}
100 kg (220 lb)
{{Infobox person/weight/sandbox2}}
100 kg (220 lb)
111 kg (245 lb)
{{Infobox person/weight/sandbox}}
111 kg (245 lb)
{{Infobox person/weight/sandbox2}}
111 kg (245 lb)
108 kg (238 lb)
{{Infobox person/weight/sandbox}}
108 kg (238 lb)
{{Infobox person/weight/sandbox2}}
108 kg (238 lb)
99.5 kg (219 lb)
{{Infobox person/weight/sandbox}}
99.5 kg (219 lb)
{{Infobox person/weight/sandbox2}}
99.5 kg (219 lb)
pounds[edit]
1 lb (0 kg)
{{Infobox person/weight/sandbox}}
1 lb (0 kg)
{{Infobox person/weight/sandbox2}}
1 lb (0 kg)
200 lb (91 kg)
{{Infobox person/weight/sandbox}}
200 lb (91 kg)
{{Infobox person/weight/sandbox2}}
200 lb (91 kg)
245 lb (111 kg)
{{Infobox person/weight/sandbox}}
245 lb (111 kg)
{{Infobox person/weight/sandbox2}}
245 lb (111 kg)
238 lb (108 kg)
{{Infobox person/weight/sandbox}}
238 lb (108 kg)
{{Infobox person/weight/sandbox2}}
238 lb (108 kg)
199+1⁄2 lb (90 kg)
{{Infobox person/weight/sandbox}}
199+1⁄2 lb (90 kg)
{{Infobox person/weight/sandbox2}}
199+1⁄2 lb (90 kg)
stone[edit]
1 st (14 lb; 6 kg)
{{Infobox person/weight/sandbox}}
1 st (14 lb; 6 kg)
{{Infobox person/weight/sandbox2}}
1 st (14 lb; 6 kg)
10 st (140 lb; 64 kg)
{{Infobox person/weight/sandbox}}
10 st (140 lb; 64 kg)
{{Infobox person/weight/sandbox2}}
10 st (140 lb; 64 kg)
17 st (238 lb; 108 kg)
{{Infobox person/weight/sandbox}}
17 st (238 lb; 108 kg)
{{Infobox person/weight/sandbox2}}
17 st (238 lb; 108 kg)
17 st (238 lb; 108 kg)
{{Infobox person/weight/sandbox}}
17 st (238 lb; 108 kg)
{{Infobox person/weight/sandbox2}}
17 st (238 lb; 108 kg)
stone and pounds[edit]
17 st 7 lb (245 lb; 111 kg)
{{Infobox person/weight/sandbox}}
17 st 7 lb (245 lb; 111 kg)
{{Infobox person/weight/sandbox2}}
17 st 7 lb (245 lb; 111 kg)
17 st 7 lb (245 lb; 111 kg)
{{Infobox person/weight/sandbox}}
17 st 7 lb (245 lb; 111 kg)
{{Infobox person/weight/sandbox2}}
17 st 7 lb (245 lb; 111 kg)
17 st 7 lb (245 lb; 111 kg)
{{Infobox person/weight/sandbox}}
17 st 7 lb (245 lb; 111 kg)
{{Infobox person/weight/sandbox2}}
17 st 7 lb (245 lb; 111 kg)
17 st 7 lb (245 lb; 111 kg)
{{Infobox person/weight/sandbox}}
17 st 7 lb (245 lb; 111 kg)
{{Infobox person/weight/sandbox2}}
17 st 7 lb (245 lb; 111 kg)
17 st 9+1⁄2 lb (248 lb; 112 kg)
{{Infobox person/weight/sandbox}}
17 st 9+1⁄2 lb (248 lb; 112 kg)
{{Infobox person/weight/sandbox2}}
17 st 9+1⁄2 lb (248 lb; 112 kg)
year and reference[edit]
108 kg (238 lb) (2012)
{{Infobox person/weight/sandbox}}
108 kg (238 lb) (2012)
{{Infobox person/weight/sandbox2}}
108 kg (238 lb) (2012)
238 lb (108 kg) (2012)[1]
{{Infobox person/weight/sandbox}}
238 lb (108 kg) (2012)[1]
{{Infobox person/weight/sandbox2}}
238 lb (108 kg) (2012)[1]
- ^ citation goes here
convert template as input[edit]
With unabbreviated unit names:
{{Infobox person/weight|111 kilograms (245 pounds; 17 stone 7 pounds)}}111 kg (245 lb; 17 st 7 lb)
111 kg (245 lb; 17 st 7 lb)
{{Infobox person/weight/sandbox}}
111 kg (245 lb; 17 st 7 lb)111 kg (245 lb; 17 st 7 lb)
{{Infobox person/weight/sandbox2}}
111 kg (245 lb; 17 st 7 lb)111 kg (245 lb; 17 st 7 lb)
{{Infobox person/weight|245 pounds (111 kilograms; 17 stone 7 pounds)}}245 lb (111 kg; 17 st 7 lb)
245 lb (111 kg; 17 st 7 lb)
{{Infobox person/weight/sandbox}}
245 lb (111 kg; 17 st 7 lb)245 lb (111 kg; 17 st 7 lb)
{{Infobox person/weight/sandbox2}}
245 lb (111 kg; 17 st 7 lb)245 lb (111 kg; 17 st 7 lb)
With unabbreviated wikilinked unit names:
{{Infobox person/weight|111 [[kilogram]]s (245 [[Pound (mass)|pounds]]; 17 [[Stone (unit)|stone]] 7 pounds)}}111 kg (245 lb; 17 st 7 lb)
111 [[Kilogram|kg]] (245 [[Pound (mass)|lb]]; 17 [[Stone (unit)|st]] 7 lb)
{{Infobox person/weight/sandbox}}
111 kg (245 lb; 17 st 7 lb)111 [[Kilogram|kg]] (245 [[Pound (mass)|lb]]; 17 [[Stone (unit)|st]] 7 lb)
{{Infobox person/weight/sandbox2}}
111 kg (245 lb; 17 st 7 lb)111 [[Kilogram|kg]] (245 [[Pound (mass)|lb]]; 17 [[Stone (unit)|st]] 7 lb)
{{Infobox person/weight|245 [[Pound (mass)|pounds]] (111 [[kilogram]]s; 17 [[Stone (unit)|stone]] 7 pounds)}}245 lb (111 kg; 17 st 7 lb)
245 [[Pound (mass)|lb]] (111 [[Kilogram|kg]]; 17 [[Stone (unit)|st]] 7 lb)
{{Infobox person/weight/sandbox}}
245 lb (111 kg; 17 st 7 lb)245 [[Pound (mass)|lb]] (111 [[Kilogram|kg]]; 17 [[Stone (unit)|st]] 7 lb)
{{Infobox person/weight/sandbox2}}
245 lb (111 kg; 17 st 7 lb)245 [[Pound (mass)|lb]] (111 [[Kilogram|kg]]; 17 [[Stone (unit)|st]] 7 lb)
With abbreviated wikilinked unit names:
{{Infobox person/weight|111 [[Kilogram|kg]] (245 [[Pound (mass)|lb]]; 17 [[Stone (unit)|st]] 7 lb)}}111 kg (245 lb; 17 st 7 lb)
111 [[Kilogram|kg]] (245 [[Pound (mass)|lb]]; 17 [[Stone (unit)|st]] 7 lb)
{{Infobox person/weight/sandbox}}
111 kg (245 lb; 17 st 7 lb)111 [[Kilogram|kg]] (245 [[Pound (mass)|lb]]; 17 [[Stone (unit)|st]] 7 lb)
{{Infobox person/weight/sandbox2}}
111 kg (245 lb; 17 st 7 lb)111 [[Kilogram|kg]] (245 [[Pound (mass)|lb]]; 17 [[Stone (unit)|st]] 7 lb)
{{Infobox person/weight|245 [[Pound (mass)|lb]] (111 [[Kilogram|kg]]; 17 [[Stone (unit)|st]] 7 lb)}}245 lb (111 kg; 17 st 7 lb)
245 [[Pound (mass)|lb]] (111 [[Kilogram|kg]]; 17 [[Stone (unit)|st]] 7 lb)
{{Infobox person/weight/sandbox}}
245 lb (111 kg; 17 st 7 lb)245 [[Pound (mass)|lb]] (111 [[Kilogram|kg]]; 17 [[Stone (unit)|st]] 7 lb)
{{Infobox person/weight/sandbox2}}
245 lb (111 kg; 17 st 7 lb)245 [[Pound (mass)|lb]] (111 [[Kilogram|kg]]; 17 [[Stone (unit)|st]] 7 lb)
weight ranges[edit]
with en dash (–):
108–111 kg (238–245 lb)
{{Infobox person/weight/sandbox}}
108–111 kg (238–245 lb)
{{Infobox person/weight/sandbox2}}
108–111 kg (238–245 lb)
238–245 lb (108–111 kg)
{{Infobox person/weight/sandbox}}
238–245 lb (108–111 kg)
{{Infobox person/weight/sandbox2}}
238–245 lb (108–111 kg)
17–18 st (238–252 lb; 108–114 kg)
{{Infobox person/weight/sandbox}}
17–18 st (238–252 lb; 108–114 kg)
{{Infobox person/weight/sandbox2}}
17–18 st (238–252 lb; 108–114 kg)
with hyphen (-); output is changed to en dash by {{Convert}}:
108–111 kg (238–245 lb)
{{Infobox person/weight/sandbox}}
108–111 kg (238–245 lb)
{{Infobox person/weight/sandbox2}}
108–111 kg (238–245 lb)
238–245 lb (108–111 kg)
{{Infobox person/weight/sandbox}}
238–245 lb (108–111 kg)
{{Infobox person/weight/sandbox2}}
238–245 lb (108–111 kg)
17–18 st (238–252 lb; 108–114 kg)
{{Infobox person/weight/sandbox}}
17–18 st (238–252 lb; 108–114 kg)
{{Infobox person/weight/sandbox2}}
17–18 st (238–252 lb; 108–114 kg)
kg-stlb enabled[edit]
If a template uses {{Infobox person/weight|{{{weight}}}|kg-stlb=yes}}
, then an article using that template with an input in kg will display two conversions: lb followed by st/lb (default is one conversion to lb):
100 kg (220 lb; 15 st 10 lb)
{{Infobox person/weight/sandbox}}
100 kg (220 lb; 15 st 10 lb)
{{Infobox person/weight/sandbox2}}
100 kg (220 lb; 15 st 10 lb)
108–111 kg (238–245 lb; 17 st 0 lb – 17 st 7 lb)
{{Infobox person/weight/sandbox}}
108–111 kg (238–245 lb; 17 st 0 lb – 17 st 7 lb)
{{Infobox person/weight/sandbox2}}
108–111 kg (238–245 lb; 17 st 0 lb – 17 st 7 lb)
200 lb (91 kg)
{{Infobox person/weight/sandbox}}
200 lb (91 kg)
{{Infobox person/weight/sandbox2}}
200 lb (91 kg)
238–245 lb (108–111 kg)
{{Infobox person/weight/sandbox}}
238–245 lb (108–111 kg)
{{Infobox person/weight/sandbox2}}
238–245 lb (108–111 kg)
lb-stlb enabled[edit]
If a template uses {{Infobox person/weight|{{{weight}}}|lb-stlb=yes}}
, then an article using that template with an input in lb will display two conversions: kg followed by st/lb (default is one conversion to kg):
200 lb (91 kg; 14 st 4 lb)
{{Infobox person/weight/sandbox}}
200 lb (91 kg; 14 st 4 lb)
{{Infobox person/weight/sandbox2}}
200 lb (91 kg; 14 st 4 lb)
238–245 lb (108–111 kg; 17 st 0 lb – 17 st 7 lb)
{{Infobox person/weight/sandbox}}
238–245 lb (108–111 kg; 17 st 0 lb – 17 st 7 lb)
{{Infobox person/weight/sandbox2}}
238–245 lb (108–111 kg; 17 st 0 lb – 17 st 7 lb)
100 kg (220 lb)
{{Infobox person/weight/sandbox}}
100 kg (220 lb)
{{Infobox person/weight/sandbox2}}
100 kg (220 lb)
108–111 kg (238–245 lb)
{{Infobox person/weight/sandbox}}
108–111 kg (238–245 lb)
{{Infobox person/weight/sandbox2}}
108–111 kg (238–245 lb)
Exceptions[edit]
Does not replace numbers in manually entered conversions, but does replace unit names with abbreviations (examples intentionally show incorrect conversions):
108 kg (229 lb)
{{Infobox person/weight/sandbox}}
108 kg (229 lb)
{{Infobox person/weight/sandbox2}}
108 kg (229 lb)
238 lb (119 kg)
{{Infobox person/weight/sandbox}}
238 lb (119 kg)
{{Infobox person/weight/sandbox2}}
238 lb (119 kg)
17 st (229 lb; 119 kg)
{{Infobox person/weight/sandbox}}
17 st (229 lb; 119 kg)
{{Infobox person/weight/sandbox2}}
17 st (229 lb; 119 kg)
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/weight|108.1 kilograms (238.3 pounds)}}108.1 kg (238.3 lb)
108.1 kg (238.3 lb)
{{Infobox person/weight/sandbox}}
108.1 kg (238.3 lb)108.1 kg (238.3 lb)
{{Infobox person/weight/sandbox2}}
108.1 kg (238.3 lb)108.1 kg (238.3 lb)
{{Infobox person/weight|238.2 pounds (108.05 kilograms)}}238.2 lb (108.05 kg)
238.2 lb (108.05 kg)
{{Infobox person/weight/sandbox}}
238.2 lb (108.05 kg)238.2 lb (108.05 kg)
{{Infobox person/weight/sandbox2}}
238.2 lb (108.05 kg)238.2 lb (108.05 kg)
{{Infobox person/weight|17.3 stone (242.2 pounds; 109.9 kilograms)}}17.3 st (242.2 lb; 109.9 kg)
17.3 st (242.2 lb; 109.9 kg)
{{Infobox person/weight/sandbox}}
17.3 st (242.2 lb; 109.9 kg)17.3 st (242.2 lb; 109.9 kg)
{{Infobox person/weight/sandbox2}}
17.3 st (242.2 lb; 109.9 kg)17.3 st (242.2 lb; 109.9 kg)
Areas for improvement[edit]
Conversion not displayed if unit name contains uppercase characters:
100 Kilograms
{{Infobox person/weight/sandbox}}
100 Kilograms
{{Infobox person/weight/sandbox2}}
100 Kilograms
200 Pounds
{{Infobox person/weight/sandbox}}
200 Pounds
{{Infobox person/weight/sandbox2}}
200 Pounds
Conversion not displayed if using {{nbsp}} after number (use instead):
{{Infobox person/weight |1=108<span class="nowrap"> </span>kg}}108 kg
108<span class="nowrap"> </span>kg
{{Infobox person/weight/sandbox}}
108 kg108<span class="nowrap"> </span>kg
{{Infobox person/weight/sandbox2}}
108 kg108<span class="nowrap"> </span>kg
{{Infobox person/weight |1=238<span class="nowrap"> </span>lb}}238 lb
238<span class="nowrap"> </span>lb
{{Infobox person/weight/sandbox}}
238 lb238<span class="nowrap"> </span>lb
{{Infobox person/weight/sandbox2}}
238 lb238<span class="nowrap"> </span>lb
{{Infobox person/weight |1=17<span class="nowrap"> </span>st 9<span class="nowrap"> </span>lb}}17 st 9 lb
17<span class="nowrap"> </span>st 9<span class="nowrap"> </span>lb
{{Infobox person/weight/sandbox}}
17 st 9 lb17<span class="nowrap"> </span>st 9<span class="nowrap"> </span>lb
{{Infobox person/weight/sandbox2}}
17 st 9 lb17<span class="nowrap"> </span>st 9<span class="nowrap"> </span>lb
Conversion not displayed for some fractions supported in {{convert}} such as +1⁄2 or +1//2 (use +1/2 instead):
- {{cvt|199+1⁄2|lb|kg|0}} → 199+1⁄2 lb (90 kg)
- {{cvt|199+1//2|lb|kg|0}} → 199+1/2 lb (90 kg)
199+1⁄2 lb
{{Infobox person/weight/sandbox}}
199+1⁄2 lb
{{Infobox person/weight/sandbox2}}
199+1⁄2 lb
199+1//2 lb
{{Infobox person/weight/sandbox}}
199+1//2 lb
{{Infobox person/weight/sandbox2}}
199+1//2 lb