Template:Infobox person/length/doc

From IDU Wiki
Jump to navigation Jump to search

This template is used to automatically add conversions of length measurements displayed by infoboxes, such as:

Template:Template see also

Usage[edit source]

{{Infobox
...
| label# = Reach
| data#  = {{#if: {{{reach|}}} | {{Infobox person/length|{{{reach}}}}} }}
...
}}
{{Infobox
...
| label# = Spike
| data#  = {{#if: {{{spike|}}} | {{Infobox person/length|{{{spike}}}}} }}
| label# = Block
| data#  = {{#if: {{{block|}}} | {{Infobox person/length|{{{block}}}}} }}
...
}}

Examples[edit source]

Inches:

  • |reach=1 inchScript error: No such module "Person length".
  • |reach=78 inchesScript error: No such module "Person length".
  • |reach=78 insScript error: No such module "Person length".
  • |reach=78 in.Script error: No such module "Person length".
  • |reach=78 inScript error: No such module "Person length".

Centimetres:

  • |reach=1 centimetreScript error: No such module "Person length".
  • |reach=1 centimeterScript error: No such module "Person length".
  • |reach=198 centimetresScript error: No such module "Person length".
  • |reach=198 centimetersScript error: No such module "Person length".
  • |reach=198 cmsScript error: No such module "Person length".
  • |reach=198 cm.Script error: No such module "Person length".
  • |reach=198 cmScript error: No such module "Person length".

Metres:

  • |reach=1 metreScript error: No such module "Person length".
  • |reach=1 meterScript error: No such module "Person length".
  • |reach=1.98 metresScript error: No such module "Person length".
  • |reach=1.98 metersScript error: No such module "Person length".
  • |reach=1.98 msScript error: No such module "Person length".
  • |reach=1.98 m.Script error: No such module "Person length".
  • |reach=1.98 mScript error: No such module "Person length".

Non-breaking space or missing space after number:

  • |reach=78 inchesScript error: No such module "Person length".
  • |reach=198centimetresScript error: No such module "Person length".
  • |reach=1.98metresScript error: No such module "Person length".

Text and/or footnotes (references) after length:

  • |reach=78 ins (2012)Script error: No such module "Person length".
  • |reach=198 cms<ref>citation goes here</ref>Script error: No such module "Person length".
  • |reach=1.98 ms (2012)<ref>{{cite news|title=title|work=work}}</ref>Script error: No such module "Person length".
Example references


{{Convert}} templates, without and with wikilinked unit names:

  • |reach={{Convert|78|in|cm|0|abbr=off}}Script error: No such module "Person length".
  • |reach={{Convert|78|in|cm|0|abbr=off|lk=on}}Script error: No such module "Person length".
    • output of convert template: 78 [[inch|inches]] (198 [[centimetre]]s)
  • |reach={{Convert|78|in|m|2|abbr=off}}Script error: No such module "Person length".
  • |reach={{Convert|78|in|m|2|abbr=off|lk=on}}Script error: No such module "Person length".
    • output of convert template: 78 [[inch|inches]] (1.98 [[metre]]s)
  • |reach={{Convert|198|cm|abbr=off}}Script error: No such module "Person length".
  • |reach={{Convert|198|cm|abbr=off|lk=on}}Script error: No such module "Person length".
    • output of convert template: 198 [[centimetre]]s (78 [[inch|inches]])
  • |reach={{Convert|1.98|m|in|abbr=off}}Script error: No such module "Person length".
  • |reach={{Convert|1.98|m|in|abbr=off|lk=on}}Script error: No such module "Person length".
    • output of convert template: 1.98 [[metre]]s (78 [[inch|inches]])

Exceptions[edit source]

Does not replace numbers in manually entered conversions, but does replace unit names with abbreviations (examples intentionally show incorrect conversions):

  • |reach=78 inches (191 centimeters)Script error: No such module "Person length".
  • |reach=78 inches (1.91 meters)Script error: No such module "Person length".
  • |reach=198 centimetres (71 inches)Script error: No such module "Person length".
  • |reach=1.98 metres (71 inches)Script error: No such module "Person length".

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

  • |reach={{convert|78|in|cm|1|abbr=off|sp=us}}Script error: No such module "Person length".
    • output of convert template: 78 inches (198.1 centimeters)
  • |reach={{convert|78|in|m|3|abbr=off|sp=us|lk=on}}Script error: No such module "Person length".
  • |reach={{convert|198|cm|in|2|abbr=off|lk=on}}Script error: No such module "Person length".
  • |reach={{convert|1.98|m|in|2|abbr=off}}Script error: No such module "Person length".
    • output of convert template: 1.98 metres (77.95 inches)

Areas for improvement[edit source]

Conversion not displayed if unit name contains uppercase characters:

  • |reach=198 CentimetresScript error: No such module "Person length".
  • |reach=198 CMScript error: No such module "Person length".
  • |reach=1.98 MetresScript error: No such module "Person length".
  • |reach=1.98 MScript error: No such module "Person length".
  • |reach=78 InchesScript error: No such module "Person length".
  • |reach=78 INScript error: No such module "Person length".

Conversion not displayed if symbols are used for inches:

  • |reach=78"Script error: No such module "Person length".
  • |reach=78″Script error: No such module "Person length".

Does not recognize symbols for inches in manually entered conversion (adds a second conversion):

  • |reach=198cm (78")Script error: No such module "Person length".
  • |reach=1.98m (78″)Script error: No such module "Person length".

Does not convert feet (ft) or yards (yd):

  • |reach=6 feetScript error: No such module "Person length".
  • |reach=6 ftScript error: No such module "Person length".
  • |reach=2 yardsScript error: No such module "Person length".
  • |reach=2 ydScript error: No such module "Person length".

If {{convert}} template displays feet or yards, it is not abbreviated:

  • |reach={{Convert|6|ft|6|in|cm|abbr=off}}Script error: No such module "Person length".
  • |reach={{Convert|6|ft|6|in|m|2|abbr=off|lk=on}}Script error: No such module "Person length".
  • |reach={{Convert|2|yd|1.5|ft|cm|0|abbr=off}}Script error: No such module "Person length".
  • |reach={{Convert|2|yd|1.5|ft|m|2|abbr=off|lk=on}}Script error: No such module "Person length".

If {{convert}} displays feet or yards in conversion, a second conversion is displayed (only for unlinked unit names):

  • |reach={{Convert|198|cm|ftin|abbr=off}}Script error: No such module "Person length".
  • |reach={{Convert|1.98|m|ftin|abbr=off|lk=on}}Script error: No such module "Person length".
  • |reach={{Convert|229|cm|ydft|1|abbr=off}}Script error: No such module "Person length".
  • |reach={{Convert|2.29|m|ydft|1|abbr=off|lk=on}}Script error: No such module "Person length".