Pang-bô͘:Infobox person/weight
Pang-bô͘ bûn-su[chhâ-khòaⁿ] [pian-chi̍p] [le̍k-sú] [kun-sin]
Pang-bô͘:Infobox person is one of three templates used to automatically add conversions of weight measurements displayed by Template:Infobox person and other infoboxes with a |weight=
parameter.
- Template:Infobox person/weight changes text for units of weight to the abbreviations "kg", "lb", or "st", then passes the string to:
- Template:Infobox person/weight/locate which replaces any instances of
with a space, and determines the positions of "kg", "lb", or "st" within that string, all of which is passed to: - Template:Infobox person/weight/switch which does the conversion
Usage
siu-kái{{Template:Infobox person/weight|1 kilogram}}
→ 1 kg (2 lb){{Template:Infobox person/weight|108 kilograms}}
→ 108 kg (238 lb){{Template:Infobox person/weight|108 kgs}}
→ 108 kg (238 lb){{Template:Infobox person/weight|1 pound}}
→ 1 lb (0 kg){{Template:Infobox person/weight|238 pounds}}
→ 238 lb (108 kg){{Template:Infobox person/weight|238 lbs}}
→ 238 lb (108 kg){{Template:Infobox person/weight|1 stone}}
→ 1 st (14 lb; 6 kg){{Template:Infobox person/weight|17 sts}}
→ 17 st (238 lb; 108 kg){{Template:Infobox person/weight|108kilograms}}
→ 108 kg (238 lb){{Template:Infobox person/weight|238 pounds}}
→ 238 lb (108 kg){{Template:Infobox person/weight|108 kgs (2012)}}
→ 108 kg (238 lb) (2012){{Template:Infobox person/weight|238 lbs (2012)<ref>citation goes here</ref>}}
→ 238 lb (108 kg) (2012)[1]
- ↑ citation goes here
Exceptions
siu-káiDoes not replace numbers in hard-coded conversions (examples intentionally show incorrect conversions), but does replace units with abbreviations "kg", "lb", or "st":
{{Template:Infobox person/weight|108 kilograms (229 pounds)}}
→ 108 kg (229 lb){{Template:Infobox person/weight|238 pounds (119 kilograms)}}
→ 238 lb (119 kg){{Template:Infobox person/weight|17 stone (229 pounds; 119 kilograms)}}
→ 17 st (229 lb; 119 kg)
Does not replace numeric output of conversion templates such as {{convert}} (examples have precision different than usual), but does replace units with abbreviations "kg", "lb", or "st":
{{Template:Infobox person/weight|{{convert|108.1|kg|lb|1|abbr=off}}}}
→ 108.1 kg (238.3 lb)- compare to:
{{convert|108.1|kg|lb|1|abbr=off}}
→ 108.1 kilograms (238.3 pounds)
- compare to:
{{Template:Infobox person/weight|{{convert|238.2|lb|kg|2|abbr=off}}}}
→ 238.2 lb (108.05 kg)- compare to:
{{convert|238.2|lb|kg|2|abbr=off}}
→ 238.2 pounds (108.05 kilograms)
- compare to:
{{Template:Infobox person/weight|{{convert|17.3|st|1|abbr=off}}}}
→ 17.3 st (242.2 lb; 109.9 kg)- compare to:
{{convert|17.3|st|1|abbr=off}}
→ 17.3 stone (242.2 pounds; 109.9 kilograms)
- compare to:
See also
siu-káiTéng-bīn ê bûn-kiāⁿ sī tùi Pang-bô͘:Infobox person/weight/doc khàm-ji̍p--ê. (pian-chi̍p | le̍k-sú) Pian-chip-chiá ē-sái tī chit-ê pang-bô͘ ê soa-a̍p (chhòng-kiàn | mirror) kap chhì-giām-kheh-suh (chhòng-kiàn) ia̍h-bīn chò si̍t-giām. Chhiáⁿ tī chú-ia̍h-bīn /doc lāi-bīn ka-thiam lūi-pia̍t. Pún pang-bô͘ ê chú-ia̍h-bīn. |