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
kilograms
[edit]pounds
[edit]stone
[edit]stone and pounds
[edit]year and reference
[edit]- ^ 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|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)
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|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)
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|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)
weight ranges
[edit]with en dash (–):
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}}:
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):
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)
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):
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)
Exceptions
[edit]Does 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/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|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|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)
Areas for improvement
[edit]Conversion not displayed if unit name contains uppercase characters:
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|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|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
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)