Jump to content

Template:Infobox person/weight/testcases

From Wikipedia, the free encyclopedia

The following tests compare the output of:

  1. {{Infobox person/weight}}, implemented via Module:Person weight since 30 September 2019
  2. {{Infobox person/weight/sandbox}}, using Module:Person weight/sandbox

kilograms

[edit]
1 kilogram

{{Infobox person/weight}}

1 kg (2 lb)

{{Infobox person/weight/sandbox}}

1 kg (2 lb)

100 kg.

{{Infobox person/weight}}

100 kg (220 lb)

{{Infobox person/weight/sandbox}}

100 kg (220 lb)

111kilograms

{{Infobox person/weight}}

111 kg (245 lb)

{{Infobox person/weight/sandbox}}

111 kg (245 lb)

108 kgs.

{{Infobox person/weight}}

108 kg (238 lb)

{{Infobox person/weight/sandbox}}

108 kg (238 lb)

99.5 kg

{{Infobox person/weight}}

99.5 kg (219 lb)

{{Infobox person/weight/sandbox}}

99.5 kg (219 lb)

pounds

[edit]
1 pound

{{Infobox person/weight}}

1 lb (0 kg)

{{Infobox person/weight/sandbox}}

1 lb (0 kg)

200 lb.

{{Infobox person/weight}}

200 lb (91 kg)

{{Infobox person/weight/sandbox}}

200 lb (91 kg)

245pounds

{{Infobox person/weight}}

245 lb (111 kg)

{{Infobox person/weight/sandbox}}

245 lb (111 kg)

238 lbs.

{{Infobox person/weight}}

238 lb (108 kg)

{{Infobox person/weight/sandbox}}

238 lb (108 kg)

199+1/2 lb

{{Infobox person/weight}}

199+12 lb (90 kg)

{{Infobox person/weight/sandbox}}

199+12 lb (90 kg)

stone

[edit]
1 stone

{{Infobox person/weight}}

1 st (14 lb; 6 kg)

{{Infobox person/weight/sandbox}}

1 st (14 lb; 6 kg)

10 st.

{{Infobox person/weight}}

10 st (140 lb; 64 kg)

{{Infobox person/weight/sandbox}}

10 st (140 lb; 64 kg)

17stones

{{Infobox person/weight}}

17 st (238 lb; 108 kg)

{{Infobox person/weight/sandbox}}

17 st (238 lb; 108 kg)

17 sts.

{{Infobox person/weight}}

17 st (238 lb; 108 kg)

{{Infobox person/weight/sandbox}}

17 st (238 lb; 108 kg)

stone and pounds

[edit]
17 stone, 7 pounds

{{Infobox person/weight}}

17 st 7 lb (245 lb; 111 kg)

{{Infobox person/weight/sandbox}}

17 st 7 lb (245 lb; 111 kg)

17 st. 7 lb.

{{Infobox person/weight}}

17 st 7 lb (245 lb; 111 kg)

{{Infobox person/weight/sandbox}}

17 st 7 lb (245 lb; 111 kg)

17stones 7pounds

{{Infobox person/weight}}

17 st 7 lb (245 lb; 111 kg)

{{Infobox person/weight/sandbox}}

17 st 7 lb (245 lb; 111 kg)

17 sts. 7 lbs.

{{Infobox person/weight}}

17 st 7 lb (245 lb; 111 kg)

{{Infobox person/weight/sandbox}}

17 st 7 lb (245 lb; 111 kg)

17 st 9+1/2 lb

{{Infobox person/weight}}

17 st 9+12 lb (248 lb; 112 kg)

{{Infobox person/weight/sandbox}}

17 st 9+12 lb (248 lb; 112 kg)

year and reference

[edit]
108 kgs (2012)

{{Infobox person/weight}}

108 kg (238 lb) (2012)

{{Infobox person/weight/sandbox}}

108 kg (238 lb) (2012)

238 lbs (2012)<ref>citation goes here</ref>

{{Infobox person/weight}}

238 lb (108 kg) (2012)[1]

{{Infobox person/weight/sandbox}}

238 lb (108 kg) (2012)[1]

  1. ^ citation goes here

convert template as input

[edit]

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&nbsp;stone 7&nbsp;pounds)}}

{{Infobox person/weight}}

111 kg (245 lb; 17 st 7 lb)
111 kg (245 lb; 17&nbsp;st 7&nbsp;lb)

{{Infobox person/weight/sandbox}}

111 kg (245 lb; 17 st 7 lb)
111 kg (245 lb; 17&nbsp;st 7&nbsp;lb)
{{Convert|245|lb|kg stlb|abbr=off}} → 245 pounds (111 kilograms; 17 stone 7 pounds)
{{Infobox person/weight|245 pounds (111 kilograms; 17&nbsp;stone 7&nbsp;pounds)}}

{{Infobox person/weight}}

245 lb (111 kg; 17 st 7 lb)
245 lb (111 kg; 17&nbsp;st 7&nbsp;lb)

{{Infobox person/weight/sandbox}}

245 lb (111 kg; 17 st 7 lb)
245 lb (111 kg; 17&nbsp;st 7&nbsp;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&nbsp;[[Stone (unit)|stone]] 7&nbsp;pounds)}}

{{Infobox person/weight}}

111 kg (245 lb; 17 st 7 lb)
111 [[Kilogram|kg]] (245 [[Pound (mass)|lb]]; 17&nbsp;[[Stone (unit)|st]] 7&nbsp;lb)

{{Infobox person/weight/sandbox}}

111 kg (245 lb; 17 st 7 lb)
111 [[Kilogram|kg]] (245 [[Pound (mass)|lb]]; 17&nbsp;[[Stone (unit)|st]] 7&nbsp;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&nbsp;[[Stone (unit)|stone]] 7&nbsp;pounds)}}

{{Infobox person/weight}}

245 lb (111 kg; 17 st 7 lb)
245 [[Pound (mass)|lb]] (111 [[Kilogram|kg]]; 17&nbsp;[[Stone (unit)|st]] 7&nbsp;lb)

{{Infobox person/weight/sandbox}}

245 lb (111 kg; 17 st 7 lb)
245 [[Pound (mass)|lb]] (111 [[Kilogram|kg]]; 17&nbsp;[[Stone (unit)|st]] 7&nbsp;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&nbsp;[[Kilogram|kg]] (245&nbsp;[[Pound (mass)|lb]]; 17&nbsp;[[Stone (unit)|st]] 7&nbsp;lb)}}

{{Infobox person/weight}}

111 kg (245 lb; 17 st 7 lb)
111&nbsp;[[Kilogram|kg]] (245&nbsp;[[Pound (mass)|lb]]; 17&nbsp;[[Stone (unit)|st]] 7&nbsp;lb)

{{Infobox person/weight/sandbox}}

111 kg (245 lb; 17 st 7 lb)
111&nbsp;[[Kilogram|kg]] (245&nbsp;[[Pound (mass)|lb]]; 17&nbsp;[[Stone (unit)|st]] 7&nbsp;lb)
{{Convert|245|lb|kg stlb|abbr=on|lk=on}} → 245 lb (111 kg; 17 st 7 lb)
{{Infobox person/weight|245&nbsp;[[Pound (mass)|lb]] (111&nbsp;[[Kilogram|kg]]; 17&nbsp;[[Stone (unit)|st]] 7&nbsp;lb)}}

{{Infobox person/weight}}

245 lb (111 kg; 17 st 7 lb)
245&nbsp;[[Pound (mass)|lb]] (111&nbsp;[[Kilogram|kg]]; 17&nbsp;[[Stone (unit)|st]] 7&nbsp;lb)

{{Infobox person/weight/sandbox}}

245 lb (111 kg; 17 st 7 lb)
245&nbsp;[[Pound (mass)|lb]] (111&nbsp;[[Kilogram|kg]]; 17&nbsp;[[Stone (unit)|st]] 7&nbsp;lb)

weight ranges

[edit]

with en dash (–):

17–18 st

{{Infobox person/weight}}

108–111 kg (238–245 lb)

{{Infobox person/weight/sandbox}}

108–111 kg (238–245 lb)

17–18 st

{{Infobox person/weight}}

238–245 lb (108–111 kg)

{{Infobox person/weight/sandbox}}

238–245 lb (108–111 kg)

17–18 st

{{Infobox person/weight}}

17–18 st (238–252 lb; 108–114 kg)

{{Infobox person/weight/sandbox}}

17–18 st (238–252 lb; 108–114 kg)

with hyphen (-); output is changed to en dash by {{Convert}}:

108-111 kg

{{Infobox person/weight}}

108–111 kg (238–245 lb)

{{Infobox person/weight/sandbox}}

108–111 kg (238–245 lb)

238-245 lb

{{Infobox person/weight}}

238–245 lb (108–111 kg)

{{Infobox person/weight/sandbox}}

238–245 lb (108–111 kg)

17-18 st

{{Infobox person/weight}}

17–18 st (238–252 lb; 108–114 kg)

{{Infobox person/weight/sandbox}}

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

{{Infobox person/weight}}

100 kg (220 lb; 15 st 10 lb)

{{Infobox person/weight/sandbox}}

100 kg (220 lb; 15 st 10 lb)

108-111 kg

{{Infobox person/weight}}

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)

200 lb

{{Infobox person/weight}}

200 lb (91 kg)

{{Infobox person/weight/sandbox}}

200 lb (91 kg)

238–245 lb

{{Infobox person/weight}}

238–245 lb (108–111 kg)

{{Infobox person/weight/sandbox}}

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

{{Infobox person/weight}}

200 lb (91 kg; 14 st 4 lb)

{{Infobox person/weight/sandbox}}

200 lb (91 kg; 14 st 4 lb)

238–245 lb

{{Infobox person/weight}}

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)

100 kg

{{Infobox person/weight}}

100 kg (220 lb)

{{Infobox person/weight/sandbox}}

100 kg (220 lb)

108-111 kg

{{Infobox person/weight}}

108–111 kg (238–245 lb)

{{Infobox person/weight/sandbox}}

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 kilograms (229 pounds)

{{Infobox person/weight}}

108 kg (229 lb)

{{Infobox person/weight/sandbox}}

108 kg (229 lb)

238 pounds (119 kilograms)

{{Infobox person/weight}}

238 lb (119 kg)

{{Infobox person/weight/sandbox}}

238 lb (119 kg)

17 stone (229 pounds; 119 kilograms)

{{Infobox person/weight}}

17 st (229 lb; 119 kg)

{{Infobox person/weight/sandbox}}

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)}}

{{Infobox person/weight}}

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)
{{convert|238.2|lb|kg|2|abbr=off}} → 238.2 pounds (108.05 kilograms)
{{Infobox person/weight|238.2 pounds (108.05 kilograms)}}

{{Infobox person/weight}}

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)
{{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)}}

{{Infobox person/weight}}

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)

Areas for improvement

[edit]

Conversion not displayed if unit name contains uppercase characters:

100 Kilograms

{{Infobox person/weight}}

100 Kilograms

{{Infobox person/weight/sandbox}}

100 Kilograms

200 Pounds
10 Stone

Conversion not displayed if using {{nbsp}} after number (use &nbsp; instead):

108{{nbsp}}kg
{{Infobox person/weight|1=108<span class="nowrap">&nbsp;</span>kg}}

{{Infobox person/weight}}

108 kg
108<span class="nowrap">&nbsp;</span>kg

{{Infobox person/weight/sandbox}}

108 kg
108<span class="nowrap">&nbsp;</span>kg
238{{Nbsp}}lb
{{Infobox person/weight|1=238<span class="nowrap">&nbsp;</span>lb}}

{{Infobox person/weight}}

238 lb
238<span class="nowrap">&nbsp;</span>lb

{{Infobox person/weight/sandbox}}

238 lb
238<span class="nowrap">&nbsp;</span>lb
17{{nbsp}}st 9{{nbsp}}lb
{{Infobox person/weight|1=17<span class="nowrap">&nbsp;</span>st 9<span class="nowrap">&nbsp;</span>lb}}

{{Infobox person/weight}}

17 st 9 lb
17<span class="nowrap">&nbsp;</span>st 9<span class="nowrap">&nbsp;</span>lb

{{Infobox person/weight/sandbox}}

17 st 9 lb
17<span class="nowrap">&nbsp;</span>st 9<span class="nowrap">&nbsp;</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+12 lb (90 kg)
{{cvt|199+1//2|lb|kg|0}} → 199+1/2 lb (90 kg)
199+1⁄2 lb

{{Infobox person/weight}}

199+1⁄2 lb

{{Infobox person/weight/sandbox}}

199+1⁄2 lb

199+1//2 lb

{{Infobox person/weight}}

199+1//2 lb

{{Infobox person/weight/sandbox}}

199+1//2 lb