Template:Convert/doc/parameter list: Difference between revisions

From Zoophilia Wiki
Jump to navigationJump to search
meta>DePiep
add input parameter
meta>DePiep
Per [https://en.wikipedia.org/w/index.php?title=Template_talk:Convert&diff=819371520&oldid=819367288] Module version 21 (2017-01-15): removed deprecated parameters altogether. Kept: |xx| and |*| ranges, high-use sing=x and disp=flip. See talk
Line 175: Line 175:
|<code>&#124;sortable=on</code> || data-sort-value="on" | on
|<code>&#124;sortable=on</code> || data-sort-value="on" | on
| Adds invisible sort key
| Adds invisible sort key
| Table sort
|-
|<code>{{!mxt|1=&#124;sortable=in}}</code> || data-sort-value="in" | in
| '''Deprecated'''. Use {{xt|1=sortable=on}}
| Table sort
|-
|<code>{{!mxt|1=&#124;sortable=out}}</code> || data-sort-value="out" | out
| '''Deprecated'''. Use {{xt|1=sortable=on}}
| Table sort
| Table sort
|-
|-
Line 213: Line 205:
| Table sort
| Table sort
|- <!-- ----------------- Deprecated options ------------------------- -->
|- <!-- ----------------- Deprecated options ------------------------- -->
|<code>{{!mxt|1=&#124;abbr=comma}}</code> || data-sort-value="comma" | comma
| '''Deprecated'''. Use {{mxt|1=&#x7c;comma=off}}
| Number format
|-
|<code>{{!mxt|1=&#124;abbr=mos}}</code> || data-sort-value="mos" | mos
| '''Deprecated'''. Use {{mxt|1=&#x7c;x&#x7c;}} ''or'' {{mxt|1=&#x7c;by&#x7c;}}
| Range format
|-
|<code>{{!mxt|1=&#124;adj=1}}</code> || data-sort-value="01" | 1
| '''Deprecated'''. Do not use. No need to deviate from [[MOS:FRACTION|MOS]] regarding plurals
| Plural or singular
|-
|<code>{{!mxt|1=&#124;adj=flip}}</code> || data-sort-value="flip" | flip
| '''Deprecated'''. Use {{mxt|1=&#x7c;order=flip}}
| Order
|-
|<code>{{!mxt|1=&#124;adj=j}}</code> || data-sort-value="j" | j
| '''Deprecated'''. Do not use. No need to join number and unit with <code>&amp;nbsp;</code>. Not by MOS, and could be misunderstood HTML
| Join values
|-
| <code>{{!mxt|1=&#124;adj=nocomma}}</code> || data-sort-value="nocomma" | ocomma
| '''Deprecated'''. Use {{mxt|1=&#x7c;comma=off}}
| Number format
|-
|<code>{{!mxt|1=&#124;comma=gaps5}}</code> || data-sort-value="gaps5" | gaps5
| '''Deprecated'''. Use {{mxt|1=&#x7c;comma=gaps}}
| Number format
|-
|<code>{{!mxt|1=&#124;disp=2}}</code> || data-sort-value="02" | 2
| '''Deprecated'''. Use {{mxt|1=&#x7c;disp=output only}}
| Parts only
|-
|<code>{{!mxt|1=&#124;disp=5}}</code> || data-sort-value="05" | 5
| '''Deprecated'''. Use {{mxt|1=&#x7c;round=5}}
| Rounding and significant figures
|-
|<code>{{!mxt|1=&#124;disp=flip}}</code> || data-sort-value="flip" | flip
|<code>{{!mxt|1=&#124;disp=flip}}</code> || data-sort-value="flip" | flip
| '''Deprecated'''. Use {{mxt|1=&#x7c;order=flip}}
| '''Deprecated'''. Use {{mxt|1=&#x7c;order=flip}}
| Order
| Order
|-
|<code>{{!mxt|1=&#124;disp=flip5}}</code> || data-sort-value="flip5" | flip5
| '''Deprecated'''. Use {{mxt|1=&#x7c;order=flip&nbsp;&#x7c;round=5}}
| Order, rounding
|-
| <code>{{!mxt|1=&#124;disp=nocomma}}</code> || data-sort-value="nocomma" | nocomma
| '''Deprecated'''. Use {{mxt|1=&#x7c;comma=off}}
| Number format
|-
|<code>{{!mxt|1=&#124;disp=u2}}</code> || data-sort-value="u2" | u2
| '''Deprecated'''. Use {{mxt|1=&#x7c;disp=unit2}}
| Parts only
|-
|<code>{{!mxt|1=&#124;near=5}}</code> || data-sort-value="05" | 5
| '''Deprecated'''. Use {{mxt|1=&#x7c;round=5}}
| Rounding and significant figures
|-
|-
|<code>{{!mxt|1=&#124;sing=}}</code> || data-sort-value="" |  
|<code>{{!mxt|1=&#124;sing=}}</code> || data-sort-value="" |  

Revision as of 08:58, 15 January 2018

Parameter Value Description Note
|abbr=in in Use symbol for first (left-hand side) unit Symbol ('abbreviation')
|abbr=off off Use name for all units Symbol ('abbreviation')
|abbr=none none
|abbr=on on Use symbol for all units Symbol ('abbreviation')
|abbr=out out Use symbol for right-hand side unit (default) Symbol ('abbreviation')
|abbr=unit unit Use symbol for all units when using scientific notation Symbol ('abbreviation')
|abbr=values values Show only input and output numbers, not units Parts only
|abbr=~ ~ Shows both unit name and symbol Symbol & name
|adj=mid|… mid User-specified text after the input unit; sets adj=on (adjective). Expects 1 unnamed parameter. Word adding, adjective
|adj=on on Unit name is adjective (singular and hyphenated) Grammar, adjective
|adj=pre|… pre User-specified text before input unit. Expects 1 unnamed parameter. Word adding
|adj=ri0 ri0 Round input with precision 0 Rounding and significant figures
|adj=ri1 ri1 Round input with precision 1 Rounding and significant figures
|adj=ri2 ri2 Round input with precision 2 Rounding and significant figures
|adj=ri3 ri3 Round input with precision 3 Rounding and significant figures
|comma=5 5 Only use comma for thousands separator if 5 or more digits Number format
|comma=gaps gaps Use gaps (space), not comma, for thousands separator Number format
|comma=off off No thousands separator Number format
|disp=b b Join input and output using " (...)" (default) Join values
|disp=sqbr sqbr Join input and output using " [...]" Join values
|disp=br br Join input and output using "<br/>" Join values
|disp=comma comma Join input and output using ", " Join values
|disp=or or Join input and output using " or " Join values
|disp=number number Display output number only Parts only
|disp=output number only output number only
|disp=out out Display only output number and name/symbol Parts only
|disp=output only output only
|disp=preunit|…[|…] preunit Text to be inserted after value and before units, for both input and output, with optionally different text for output. Expects 1 or 2 unnamed parameters. Word adding
|disp=table table Output is suitable for a table cell with align="right" Table columns
|disp=tablecen tablecen Output is suitable for a table cell with align="center" Table columns
|disp=unit unit Display input name/symbol only (not input number, not output) Parts only
|disp=unit2 unit2 Display output name/symbol only (not input; not output number) Parts only
|disp=x|... x Join input and output using user-specified text Word adding
|frac=N N Show imperial number in fractions, denominator=N Number format, fraction
|lk=in in Link left-hand side unit name or symbol Unit link
|lk=on on Link all unit names or symbols (but not twice for the same unit) Unit link
|lk=out out Link right-hand side unit name or symbol Unit link
|order=flip flip Inverts order of input, output measurements (conversion first) Order
|input=P2048 P2048 Reads and converts Wikidata property Inside template
|round=5 5 Rounds calculation to the nearest multiple of 5 Rounding and significant figures
|round=25 25 Rounds calculation to the nearest multiple of 25 Rounding and significant figures
|round=each each In a range, each number is rounded by the default rounding Rounding and significant figures
|sigfig=N N Round output number to N significant figures (N is a positive integer) Rounding and significant figures
|sortable=on on Adds invisible sort key Table sort
|sp=us us Use U.S. spelling ("meter" instead of default "metre") Spelling U.S. names
|spell=in in Spell input number in words Spelling numbers
|spell=In In Spell input number in words with first letter uppercase Spelling numbers
|spell=on on Spell input and output numbers in words Spelling numbers
|spell=On On Spell input and output numbers in words with first letter uppercase Spelling numbers
|$= Replace $-sign with a currency sign, for example in $/acre (no currency conversion happens) Cost per unit
|debug=yes yes Debugging only. In a sortable table: show the normally hidden sort key Table sort
|disp=flip flip Deprecated. Use |order=flip Order
|sing= Deprecated. Use |adj= Plurals