Template:Infobox person/weight
Script error: No such module "Person weight".
![]() | This is for use in templates. For articles, please use {{Convert}}. |
Lua error in Module:Lua_banner at line 113: attempt to index field 'edit' (a nil value).
This template is used to automatically add conversions of weight measurements displayed by Template:Infobox person and other infoboxes with a |weight=
parameter.
Usage
{{Infobox ... | label# = Weight | data# = {{#if: {{{weight|}}} | {{Infobox person/weight|{{{weight}}}}} }} ... }}
Examples
|weight=1 kilogram
→ Script error: No such module "Person weight".|weight=108 kg.
→ Script error: No such module "Person weight".|weight=111kilograms
→ Script error: No such module "Person weight".|weight=108 kgs.
→ Script error: No such module "Person weight".
|weight=1 pound
→ Script error: No such module "Person weight".|weight=200 lb.
→ Script error: No such module "Person weight".|weight=245pounds
→ Script error: No such module "Person weight".|weight=238 lbs.
→ Script error: No such module "Person weight".
|weight=1 stone
→ Script error: No such module "Person weight".|weight=10 st.
→ Script error: No such module "Person weight".|weight=17stones
→ Script error: No such module "Person weight".|weight=17 sts.
→ Script error: No such module "Person weight".
|weight=17 stone, 7 pounds
→ Script error: No such module "Person weight".|weight=17 st. 7 lb.
→ Script error: No such module "Person weight".|weight=17stones 1pound
→ Script error: No such module "Person weight".|weight=17 sts. 1 lbs.
→ Script error: No such module "Person weight".
Text and/or footnotes (references) after weight:
|weight=108 kgs (2012)
→ Script error: No such module "Person weight".|weight=238 lbs<ref>citation goes here</ref>
→ Script error: No such module "Person weight".|weight=238 lbs (2012)<ref>{{cite news|title=title|work=work}}</ref>
→ Script error: No such module "Person weight".
- Example references
{{Convert}} templates, without and with wikilinked unit names:
|weight={{Convert|111|kg|lb stlb|abbr=off}}
→ Script error: No such module "Person weight".|weight={{Convert|111|kg|lb stlb|abbr=off|lk=on}}
→ Script error: No such module "Person weight".- output of convert template: 111 [[kilogram]]s (245 [[Pound (mass)|pounds]]; 17 [[Stone (unit)|stone]] 7 pounds)
|weight={{Convert|245|lb|kg stlb|abbr=off}}
→ Script error: No such module "Person weight".|weight={{Convert|245|lb|kg stlb|abbr=off|lk=on}}
→ Script error: No such module "Person weight".- output of convert template: 245 [[Pound (mass)|pounds]] (111 [[kilogram]]s; 17 [[Stone (unit)|stone]] 7 pounds)
Weight ranges with input containing en dash (–):
|weight=108–111 kg
→ Script error: No such module "Person weight".|weight=238–245 lb
→ Script error: No such module "Person weight".|weight=17–18 st
→ Script error: No such module "Person weight".
Weight ranges with input containing hyphen (-); output is changed to en dash by {{Convert}}:
|weight=108-111 kg
→ Script error: No such module "Person weight".|weight=238-245 lb
→ Script error: No such module "Person weight".|weight=17-18 st
→ Script error: No such module "Person weight".
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):
|weight=100 kg
→ Script error: No such module "Person weight".|weight=108–111 kg
→ Script error: No such module "Person weight".
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):
|weight=200 lb
→ Script error: No such module "Person weight".|weight=238-245 lb
→ Script error: No such module "Person weight".
Exceptions
Does not replace numbers in manually entered conversions, but does replace unit names with abbreviations (examples intentionally show incorrect conversions):
|weight=108 kilograms (229 pounds)
→ Script error: No such module "Person weight".|weight=238 pounds (119 kilograms)
→ Script error: No such module "Person weight".|weight=17 stone (229 pounds; 119 kilograms)
→ Script error: No such module "Person weight".
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):
|weight={{convert|108.1|kg|lb|1|abbr=off}}
→ Script error: No such module "Person weight".- output of convert template: 108.1 kilograms (238.3 pounds)
|weight={{convert|238.2|lb|kg|2|abbr=off}}
→ Script error: No such module "Person weight".- output of convert template: 238.2 pounds (108.05 kilograms)
|weight={{convert|17.3|st|1|abbr=off}}
→ Script error: No such module "Person weight".- output of convert template: 17.3 stone (242.2 pounds; 109.9 kilograms)
Areas for improvement
Conversion not displayed if unit name contains uppercase characters:
|weight=100 Kilograms
→ Script error: No such module "Person weight".|weight=100 KG
→ Script error: No such module "Person weight".|weight=200 Pounds
→ Script error: No such module "Person weight".|weight=200 LB
→ Script error: No such module "Person weight".|weight=10 Stone
→ Script error: No such module "Person weight".|weight=10 ST
→ Script error: No such module "Person weight".