Template:Infobox person/weight/testcases
| This is the template test cases page for the sandbox of Template:Infobox person/weight. Script error: No such module "Purge". 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 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
Contents
kilograms
| 1 kilogram |
|---|
|
1 kg (2 lb) {{Infobox person/weight/sandbox}} 1 kg (2 lb) {{Infobox person/weight/sandbox2}} 1 kg (2 lb) |
| 100 kg. |
|---|
|
100 kg (220 lb) {{Infobox person/weight/sandbox}} 100 kg (220 lb) {{Infobox person/weight/sandbox2}} 100 kg (220 lb) |
| 111kilograms |
|---|
|
111 kg (245 lb) {{Infobox person/weight/sandbox}} 111 kg (245 lb) {{Infobox person/weight/sandbox2}} 111 kg (245 lb) |
| 108 kgs. |
|---|
|
108 kg (238 lb) {{Infobox person/weight/sandbox}} 108 kg (238 lb) {{Infobox person/weight/sandbox2}} 108 kg (238 lb) |
pounds
| 1 pound |
|---|
|
1 lb (0 kg) {{Infobox person/weight/sandbox}} 1 lb (0 kg) {{Infobox person/weight/sandbox2}} 1 lb (0 kg) |
| 200 lb. |
|---|
|
200 lb (91 kg) {{Infobox person/weight/sandbox}} 200 lb (91 kg) {{Infobox person/weight/sandbox2}} 200 lb (91 kg) |
| 245pounds |
|---|
|
245 lb (111 kg) {{Infobox person/weight/sandbox}} 245 lb (111 kg) {{Infobox person/weight/sandbox2}} 245 lb (111 kg) |
| 238 lbs. |
|---|
|
238 lb (108 kg) {{Infobox person/weight/sandbox}} 238 lb (108 kg) {{Infobox person/weight/sandbox2}} 238 lb (108 kg) |
stone
| 1 stone |
|---|
|
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. |
|---|
|
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) |
| 17stones |
|---|
|
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 sts. |
|---|
|
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
| 17 stone, 7 pounds |
|---|
|
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. |
|---|
|
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) |
| 17stones 7pounds |
|---|
|
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 sts. 7 lbs. |
|---|
|
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) |
year and reference
| 108 kgs (2012) |
|---|
|
108 kg (238 lb) (2012) {{Infobox person/weight/sandbox}} 108 kg (238 lb) (2012) {{Infobox person/weight/sandbox2}} 108 kg (238 lb) (2012) |
| 238 lbs (2012)<ref>citation goes here</ref> |
|---|
|
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
With unabbreviated unit names:
| {{Convert|111|kg|lb stlb|abbr=off}} → 111 kilograms (245 pounds; 17 stone 7 pounds) |
|---|
{{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) |
| {{Convert|245|lb|kg stlb|abbr=off}} → 245 pounds (111 kilograms; 17 stone 7 pounds) |
|---|
{{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:
| {{Convert|111|kg|lb stlb|abbr=off|lk=on}} → 111 kilograms (245 pounds; 17 stone 7 pounds) |
|---|
{{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) |
| {{Convert|245|lb|kg stlb|abbr=off|lk=on}} → 245 pounds (111 kilograms; 17 stone 7 pounds) |
|---|
{{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:
| {{Convert|111|kg|lb stlb|abbr=on|lk=on}} → 111 kg (245 lb; 17 st 7 lb) |
|---|
{{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) |
| {{Convert|245|lb|kg stlb|abbr=on|lk=on}} → 245 lb (111 kg; 17 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
with en dash (–):
| 17–18 st |
|---|
|
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) |
| 17–18 st |
|---|
|
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 |
|---|
|
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 |
|---|
|
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 |
|---|
|
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 |
|---|
|
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
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 |
|---|
|
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 |
|---|
|
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 |
|---|
|
200 lb (91 kg) {{Infobox person/weight/sandbox}} 200 lb (91 kg) {{Infobox person/weight/sandbox2}} 200 lb (91 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) |
lb-stlb enabled
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 |
|---|
|
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 |
|---|
|
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 |
|---|
|
100 kg (220 lb) {{Infobox person/weight/sandbox}} 100 kg (220 lb) {{Infobox person/weight/sandbox2}} 100 kg (220 lb) |
| 108-111 kg |
|---|
|
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
Does not replace numbers in manually entered conversions, but does replace unit names with abbreviations (examples intentionally show incorrect conversions):
| 108 kilograms (229 pounds) |
|---|
|
108 kg (229 lb) {{Infobox person/weight/sandbox}} 108 kg (229 lb) {{Infobox person/weight/sandbox2}} 108 kg (229 lb) |
| 238 pounds (119 kilograms) |
|---|
|
238 lb (119 kg) {{Infobox person/weight/sandbox}} 238 lb (119 kg) {{Infobox person/weight/sandbox2}} 238 lb (119 kg) |
| 17 stone (229 pounds; 119 kilograms) |
|---|
|
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):
| {{convert|108.1|kg|lb|1|abbr=off}} → 108.1 kilograms (238.3 pounds) |
|---|
{{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) |
| {{convert|238.2|lb|kg|2|abbr=off}} → 238.2 pounds (108.05 kilograms) |
|---|
{{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) |
| {{convert|17.3|st|1|abbr=off}} → 17.3 stone (242.2 pounds; 109.9 kilograms) |
|---|
{{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
Conversion not displayed if unit name contains uppercase characters:
| 100 Kilograms |
|---|
|
100 Kilograms {{Infobox person/weight/sandbox}} 100 Kilograms {{Infobox person/weight/sandbox2}} 100 Kilograms |
| 100 KG |
|---|
|
100 KG {{Infobox person/weight/sandbox}} 100 KG {{Infobox person/weight/sandbox2}} 100 KG |
| 200 Pounds |
|---|
|
200 Pounds {{Infobox person/weight/sandbox}} 200 Pounds {{Infobox person/weight/sandbox2}} 200 Pounds |
| 200 LB |
|---|
|
200 LB {{Infobox person/weight/sandbox}} 200 LB {{Infobox person/weight/sandbox2}} 200 LB |
| 10 Stone |
|---|
|
10 Stone {{Infobox person/weight/sandbox}} 10 Stone {{Infobox person/weight/sandbox2}} 10 Stone |
| 10 ST |
|---|
|
10 ST {{Infobox person/weight/sandbox}} 10 ST {{Infobox person/weight/sandbox2}} 10 ST |