Jump to content

Template talk:Convert/Technical/Archive 2011

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

Convert/outsep

Fix for numbers using scientific notation

{{editrequest}}  Done

Please update this template with the version in the sandbox. This will fix the problem reported at Wikipedia:Village pump (technical)/Archive 132#Template:Convert garbage output, by sanely handling the error case. The following table isolates the issue.

{| class="wikitable"
|-
! Live Template !! Sandbox Template
|-
| {{convert/outsep| 1={{formatnum:{{formatnum:{{rnd/e+|4.35|10}}}}}}| sep= |2=m<sup>3</sup>|3=m<sup>3</sup>}} || {{convert/outsep/sandbox| 1={{formatnum:{{formatnum:{{rnd/e+|4.35|10}}}}}}| sep= |2=m<sup>3</sup>|3=m<sup>3</sup>}}
|-
| {{convert/outsep| 1={{formatnum:{{formatnum:15,000}}}}| sep= |2=m<sup>3</sup>|3=m<sup>3</sup>}} || {{convert/outsep/sandbox| 1={{formatnum:{{formatnum:15,000}}}}| sep= |2=m<sup>3</sup>|3=m<sup>3</sup>}}
|-
| {{convert/outsep| 1={{formatnum:{{formatnum:1}}}}| sep= |2=m<sup>3</sup>|3=m<sup>3</sup>}} || {{convert/outsep/sandbox| 1={{formatnum:{{formatnum:1}}}}| sep= |2=m<sup>3</sup>|3=m<sup>3</sup>}}
|-
| {{convert/outsep| 1={{formatnum:{{formatnum:-1}}}}| sep= |2=m<sup>3</sup>|3=m<sup>3</sup>}} || {{convert/outsep/sandbox| 1={{formatnum:{{formatnum:-1}}}}| sep= |2=m<sup>3</sup>|3=m<sup>3</sup>}}
|-
| {{convert/outsep| 1={{formatnum:{{formatnum:-15000}}}}| sep= |2=m<sup>3</sup>|3=m<sup>3</sup>}} || {{convert/outsep/sandbox| 1={{formatnum:{{formatnum:-15000}}}}| sep= |2=m<sup>3</sup>|3=m<sup>3</sup>}}
|-
| {{convert/outsep| 1={{formatnum:{{formatnum:{{rnd/e+|-4.35|10}}}}}}| sep= |2=m<sup>3</sup>|3=m<sup>3</sup>}} || {{convert/outsep/sandbox| 1={{formatnum:{{formatnum:{{rnd/e+|-4.35|10}}}}}}| sep= |2=m<sup>3</sup>|3=m<sup>3</sup>}}
|}

Thank you. Frietjes (talk) 23:02, 9 March 2011 (UTC)

Convert/t/spelling message

Low priority edit request

Would someone like to fix the the the error here? -- John of Reading (talk) 16:38, 28 July 2011 (UTC)

 Done

Updates

Usage

Subpages here:

To request an update to a protected subtemplate of the measurement-converter Template:Convert, create a new topic below (under new header "===Topic===") and describe the changes needed, plus some test-case examples which show the before-and-after results ("Expected" & "Currently"). Once the topic has been thoroughly proofread for the exact changes needed to a subtemplate, then tag that topic by inserting "{{editprotected}}" at the start of the topic, so that this talk-page will be listed in the admins' update category.

If there are multiple subtemplates which all need to be changed, then consider defining several level-3 subtopics (as "====Subtopic====") with each title having the 3 equals-signs "====" and describing separate edit-requests. It might be easier to copy some prior update-requests and change the details to create a new edit-request in a usable format.

To check for status, re-read this talk-page to see if an admin had to reject the edit-request due to coding problems. Again, it is possible to list multiple subtemplates for update, below, but also consider listing multiple test-cases so that the admins can check that the update was applied correctly. The admins can then view an edit-preview of each topic below to compare the test-case examples after the update has been applied. -Wikid77 (talk) 16:53, 6 March 2010 (UTC)

Fix Template:Convert/LoffAonDbSoff for default {u}

{{editprotected|Template:Convert/LoffAonDbSoff}}
02-Jan-11: The converter Template:Convert/LoffAonDbSoff must allow symbol {u} to default to {n}, when {u} is not defined for some units such as "cord".

Line 1 of the template should be the following copy/paste text:
{{convert/numdisp|{{{1|2+1/2}}}}}{{#ifexpr:abs({{{1|2}}})<99999|&nbsp;|&#32;}}{{ #ifexpr:{{{1|2}}} < 1.0001 and {{{1|2}}} > 0|{{{u|{{{n}}}}}}|{{{u|{{{l|{{{n}}}s}}}}}}}} ({{convert/{{#if:{{{2|}}}|{{{o}}}|{{{3}}}}}|{{{1}}}|( {{{1}}} )*{{{b}}}|{{#if:{{{2|}}}|{{{3|}}}|{{{4|}}}}}|{{{s|}}}|r={{{r}}}|j={{{j}}}|d=LoffAonSoff}})<noinclude>

When working properly, the current results, below, will match the expected:

  • Expected: {{Convert|2|cord|cuft|abbr=on}}   gives:   2 cords (256 cu ft)
  • Currently: {{Convert|2|cord|cuft|abbr=on}}   gives:   2 cord (260 cu ft)
  • Expected: {{Convert|4|cord|cuft|abbr=on|disp=x| or }}   →   4 cords or 512 cu ft
  • Currently: {{Convert|4|cord|cuft|abbr=on|disp=x| or }}   →   4 cord or 510 cu ft
  • Expected: {{Convert|1|cord|cuft|abbr=on|disp=x| (| of wood)}} →   1 cord (128 cu ft of wood)
  • Currently: {{Convert|1|cord|cuft|abbr=on|disp=x| (| of wood)}} →   1 cord (130 cu ft of wood)

After updating, results should match. -Wikid77 01:26, 2 January 2011 (UTC)

 Done  Ronhjones  (Talk) 02:38, 2 January 2011 (UTC)

Fix Convert/LonAonDbSoff fraction and {u}

{{editprotected|Template:Convert/LonAonDbSoff}}
02-Jan-11: The converter Template:Convert/LonAonDbSoff must calculate fractions (2+1/2) and allow symbol {u} to default to {n}, when {u} is not defined for some units such as "cord".

Line 1 of the template should be the following copy/paste text:
{{convert/numdisp|{{{1|2+1/2}}}}}{{#ifexpr:abs({{{1|2}}})<99999|&nbsp;|&#32;}}[[{{{t|{{{n}}}}}}|{{#ifexpr:{{{1|2}}} < 1.0001 and {{{1|2}}} > 0|{{{u|{{{n}}}}}}|{{{u|{{{l|{{{n}}}s}}}}}}}}]] ({{convert/{{#if:{{{2|}}}|{{{o}}}|{{{3}}}}}|{{{1}}}|( {{{1}}} )*{{{b}}}|{{#if:{{{2|}}}|{{{3|}}}|{{{4|}}}}}|{{{s|}}}|r={{{r}}}|j={{{j}}}|d=LonAonSoff}})<noinclude>

When working properly, the current results, below, will match the expected:

  • Expected: {{Convert|2+1/2|cord |cuft|abbr=on|lk=on}}   gives:   21/2 cords (320.0 cu ft)
  • Currently: {{Convert|2+1/2|cord |cuft|abbr=on|lk=on}}   gives:   2+12 cord (320 cu ft)
  • Expected: {{Convert|4|cord|cuft|abbr=on|lk=on|disp=x| or }}   →   4 cords or 512 cu ft
  • Currently: {{Convert|4|cord|cuft|abbr=on|lk=on|disp=x| or }}   →   4 cord or 510 cu ft
  • Expected: {{Convert|1|cord|cuft|abbr=on|lk=on|disp=x| (| total)}} →   1 cord (128 cu ft total)
  • Currently: {{Convert|1|cord|cuft|abbr=on|lk=on|disp=x| (| total)}} →   1 cord (130 cu ft total)

After updating, results should match. -Wikid77 11:30, 2 January 2011 (UTC)

 Done KrakatoaKatie 05:15, 3 January 2011 (UTC)

Fix Convert/LinAonDbSoff fraction and {u}

{{editprotected|Template:Convert/LinAonDbSoff}}
02-Jan-11: The converter Template:Convert/LinAonDbSoff must calculate fractions (2+1/2) and allow symbol {u} to default to {n}, when {u} is not defined for some units such as "cord".

Line 1 of the template should be the following copy/paste text:
{{convert/numdisp|{{{1|2+1/2}}}}}{{#ifexpr:abs({{{1|2}}})<99999|&nbsp;|&#32;}}[[{{{t|{{{n}}}}}}|{{#ifexpr:{{{1|2}}} < 1.0001 and {{{1|2}}} > 0|{{{u|{{{n}}}}}}|{{{u|{{{l|{{{n}}}s}}}}}}}}]] ({{convert/{{#if:{{{2|}}}|{{{o}}}|{{{3}}}}}|{{{1}}}|( {{{1}}} )*{{{b}}}|{{#if:{{{2|}}}|{{{3|}}}|{{{4|}}}}}|{{{s|}}}|r={{{r}}}|j={{{j}}}|d=LoffAonSoff}})<noinclude>

When working properly, the current results, below, will match the expected:

  • Expected: {{Convert|2+1/2|cord |cuft|abbr=on|lk=in}}   gives:   21/2 cords (320.0 cu ft)
  • Currently: {{Convert|2+1/2|cord |cuft|abbr=on|lk=in}}   gives:   2+12 cord (320 cu ft)
  • Expected: {{Convert|4|cord|cuft|abbr=on|lk=in|disp=x| or }}   →   4 cords or 512 cu ft
  • Currently: {{Convert|4|cord|cuft|abbr=on|lk=in|disp=x| or }}   →   4 cord or 510 cu ft
  • Expected: {{Convert|1|cord|cuft|abbr=on|lk=in|disp=x| wood (|)}} →   1 cord wood (128 cu ft)
  • Currently: {{Convert|1|cord|cuft|abbr=on|lk=in|disp=x| wood (|)}} →   1 cord wood (130 cu ft)

After updating, results should match. -Wikid77 11:30, 2 January 2011 (UTC)

 Done KrakatoaKatie 05:12, 3 January 2011 (UTC)

Fix Convert/LoutAonDbSoff fraction and {u}

{{editprotected|Template:Convert/LoutAonDbSoff}}
02-Jan-11: The converter Template:Convert/LoutAonDbSoff must calculate fractions (2+1/2) and allow symbol {u} to default to {n}, when {u} is not defined for some units such as "cord".

Line 1 of the template should be the following copy/paste text:
{{convert/numdisp|{{{1|2+1/2}}}}}{{#ifexpr:abs({{{1|2}}})<99999|&nbsp;|&#32;}}{{#ifexpr:{{{1|2}}} < 1.0001 and {{{1|2}}} > 0|{{{u|{{{n}}}}}}|{{{u|{{{l|{{{n}}}s}}}}}}}} ({{convert/{{#if:{{{2|}}}|{{{o}}}|{{{3}}}}}|{{{1}}}|( {{{1}}} )*{{{b}}}|{{#if:{{{2|}}}|{{{3|}}}|{{{4|}}}}}|{{{s|}}}|r={{{r}}}|j={{{j}}}|d=LonAonSoff}})<noinclude>

When working properly, the current results, below, will match the expected:

  • Expected: {{Convert|2+1/2|cord |cuft|abbr=on|lk=out}}   gives:   21/2 cords (320.0 cu ft)
  • Currently: {{Convert|2+1/2|cord |cuft|abbr=on|lk=out}}   gives:   2+12 cord (320 cu ft)
  • Expected: {{Convert|4|cord|cuft|abbr=on|lk=out|disp=x| or }}   →   4 cords or 512 cu ft
  • Currently: {{Convert|4|cord|cuft|abbr=on|lk=out|disp=x| or }}   →   4 cord or 510 cu ft
  • Expected: {{Convert|1|cord|cuft|abbr=on|lk=out|disp=x| piled (|)}} →   1 cord piled (128 cu ft)
  • Currently: {{Convert|1|cord|cuft|abbr=on|lk=out|disp=x| piled (|)}} →   1 cord piled (130 cu ft)

After updating, results should match. -Wikid77 11:30, 2 January 2011 (UTC)

 Done KrakatoaKatie 05:12, 3 January 2011 (UTC)

Fix Convert/LonAonDbSon fraction and {u}

{{editprotected|Template:Convert/LonAonDbSon}}
03-Jan-11: The converter Template:Convert/LonAonDbSon must calculate fractions (2+1/2) and allow symbol {u} to default to {n}, when {u} is not defined for some units such as "cord".

Line 1 of the template should be the following copy/paste text:
{{convert/numdisp|{{{1|2+1/2}}}}}{{#if:{{{u|}}}|&nbsp;|-}}[[{{{t|{{{n}}}}}}|{{{u|{{{h|{{{n}}}}}}}}}]] ({{convert/{{#if:{{{2|}}}|{{{o}}}|{{{3}}}}}|{{{1}}}|( {{{1}}} )*{{{b}}}|{{#if:{{{2|}}}|{{{3|}}}|{{{4|}}}}}|{{{s|}}}|r={{{r}}}|j={{{j}}}|d=LonAonSon}})<noinclude>

When working properly, the current results, below, will match the expected:

  • Expected: {{Convert|2+1/2|cord |cuft|abbr=on|adj=on|lk=on}}   →   21/2-cord (320.0 cu ft)
  • Currently: {{Convert|2+1/2|cord |cuft|abbr=on|adj=on|lk=on}}   →   2+12 cord (320 cu ft)
  • Expected: {{Convert|4|cord|cuft|abbr=on|adj=on|lk=on|disp=x| or }}   →   4-cord or 512 cu ft
  • Currently: {{Convert|4|cord|cuft|abbr=on|adj=on|lk=on|disp=x| or }}   →   4 cord or 510 cu ft
  • Expected: {{Convert|1|cord|cuft|abbr=on|adj=on|lk=on|disp=x| (| total)}} →   1-cord (128 cu ft total)
  • Currently: {{Convert|1|cord|cuft|abbr=on|adj=on|lk=on|disp=x| (| total)}} →   1 cord (130 cu ft total)

After updating, results should match. -Wikid77 19:12, 3 January 2011 (UTC)

Done Dabomb87 (talk) 02:50, 4 January 2011 (UTC)

Fix Convert/LinAonDbSon fraction and {u}

{{editprotected|Template:Convert/LinAonDbSon}}
03-Jan-11: The converter Template:Convert/LinAonDbSon must calculate fractions (2+1/2) and allow symbol {u} to default to {n}, when {u} is not defined for some units such as "cord".

Line 1 of the template should be the following copy/paste text:
{{convert/numdisp|{{{1|2+1/2}}}}}{{#if:{{{u|}}}|&nbsp;|-}}[[{{{t|{{{n}}}}}}|{{{u|{{{h|{{{n}}}}}}}}}]] ({{convert/{{#if:{{{2|}}}|{{{o}}}|{{{3}}}}}|{{{1}}}|( {{{1}}} )*{{{b}}}|{{#if:{{{2|}}}|{{{3|}}}|{{{4|}}}}}|{{{s|}}}|r={{{r}}}|j={{{j}}}|d=LoffAonSon}})<noinclude>

When working properly, the current results, below, will match the expected:

  • Expected: {{Convert|2+1/2|cord |cuft|abbr=on|adj=on|lk=in}}   →   21/2-cord (320.0 cu ft)
  • Currently: {{Convert|2+1/2|cord |cuft|abbr=on|adj=on|lk=in}}   →   2+12 cord (320 cu ft)
  • Expected: {{Convert|3|cord|cuft|abbr=on|adj=on|lk=in|disp=x| or }}   →   3-cord or 384 cu ft
  • Currently: {{Convert|3|cord|cuft|abbr=on|adj=on|lk=in|disp=x| or }}   →   3 cord or 380 cu ft
  • Expected: {{Convert|1|cord|cuft|abbr=on|adj=on|lk=in|disp=x| load (|)}} →   1-cord load (128 cu ft)
  • Currently: {{Convert|1|cord|cuft|abbr=on|adj=on|lk=in|disp=x| load (|)}} →   1 cord load (130 cu ft)

After updating, results should match. -Wikid77 19:12, 3 January 2011 (UTC)

Done Dabomb87 (talk) 02:51, 4 January 2011 (UTC)

Fix Convert/LoutAonDbSon fraction and {u}

{{editprotected|Template:Convert/LoutAonDbSon}}
03-Jan-11: The converter Template:Convert/LoutAonDbSon must calculate fractions (2+1/2) and allow symbol {u} to default to {n}, when {u} is not defined for some units such as "cord".

Line 1 of the template should be the following copy/paste text:
{{convert/numdisp|{{{1|2+1/2}}}}}{{#if:{{{u|}}}|&nbsp;|-}}{{{u|{{{h|{{{n}}}}}}}}} ({{convert/{{#if:{{{2|}}}|{{{o}}}|{{{3}}}}}|{{{1}}}|( {{{1}}} )*{{{b}}}|{{#if:{{{2|}}}|{{{3|}}}|{{{4|}}}}}|{{{s|}}}|r={{{r}}}|j={{{j}}}|d=LonAonSon}})<noinclude>

When working properly, the current results, below, will match the expected:

  • Expected: {{Convert|2+1/2|cord |cuft|abbr=on|adj=on|lk=out}}   →   21/2-cord (320.0 cu ft)
  • Currently: {{Convert|2+1/2|cord |cuft|abbr=on|adj=on|lk=out}}   →   2+12 cord (320 cu ft)
  • Expected: {{Convert|4|cord|cuft|abbr=on|adj=on|lk=out|disp=x| or }}   →   4-cord or 512 cu ft
  • Currently: {{Convert|4|cord|cuft|abbr=on|adj=on|lk=out|disp=x| or }}   →   4 cord or 510 cu ft
  • Expected: {{Convert|1|cord|cuft|abbr=on|adj=on|lk=out|disp=x| heap (|)}} → 1-cord heap (128 cu ft)
  • Currently: {{Convert|1|cord|cuft|abbr=on|adj=on|lk=out|disp=x| heap (|)}} → 1 cord heap (130 cu ft)

After updating, results should match. -Wikid77 19:12, 3 January 2011 (UTC)

Done Dabomb87 (talk) 02:52, 4 January 2011 (UTC)

Fix Convert/inHg for parameters 5, 6 & 7

{{editprotected|Template:Convert/inHg}}
03-Jan-2011: The inch-mercury converter Template:Convert/inHg needs to pass parameters 5, 6 & 7 to enable more options to be specified.

Line 1 of the template should be replaced with the following copy/paste text:
{{convert/{{{d}}}|{{{1}}}|{{{2|}}}|{{{3|}}}|{{{4|}}}|{{{5|}}}|{{{6|}}}|{{{7|}}}|s={{{s|}}}|r={{{r}}}

When working properly, the current results, below, will match the expected:

  • Expected: {{Convert|4|or|5|inHg|0|adj=mid|[[sum]]}} → 4-or-5-inch-of-mercury sum (14 or 17 kPa)
  • Currently: {{Convert|4|or|5|inHg|0|adj=mid|[[sum]]}} → 4-or-5-inch-of-mercury sum (14 or 17 kPa)
  • Expected: {{Convert|2|or|3|inHg|0|adj=mid|gain}} → 2-or-3-inch-of-mercury gain (7 or 10 kPa)
  • Currently: {{Convert|2|or|3|inHg|0|adj=mid|gain}} → 2-or-3-inch-of-mercury gain (7 or 10 kPa)

After update, the results should match. -Wikid77 23:33, 3 January 2011 (UTC)

Done Dabomb87 (talk) 02:54, 4 January 2011 (UTC)

Fix Convert/kPa for parameters 5, 6 & 7

{{editprotected|Template:Convert/kPa}}
03-Jan-2011: The kilopascal converter Template:Convert/kPa needs to pass parameters 5, 6 & 7 to enable more options to be specified.

Line 1 of the template should be replaced with the following copy/paste text:
{{convert/{{{d}}}|{{{1}}}|{{{2|}}}|{{{3|}}}|{{{4|}}}|{{{5|}}}|{{{6|}}}|{{{7|}}}|s={{{s|}}}|r={{{r}}}

When working properly, the current results, below, will match the expected:

  • Expected: {{Convert|4|or|7|kPa|inHg|adj=mid|[[low]]}} → 4-or-7-kilopascal low (1.2 or 2.1 inHg)
  • Currently: {{Convert|4|or|7|kPa|inHg|adj=mid|[[low]]}} → 4-or-7-kilopascal low (1.2 or 2.1 inHg)
  • Expected: {{Convert|8|-|10|kPa|inHg|adj=mid|gain}} → 8–10-kilopascal gain (2.4–3.0 inHg)
  • Currently: {{Convert|8|-|10|kPa|inHg|adj=mid|gain}} → 8–10-kilopascal gain (2.4–3.0 inHg)

After update, the results should match. -Wikid77 23:33, 3 January 2011 (UTC)

 Done Ronhjones  (Talk) 01:30, 4 January 2011 (UTC)

Fix Convert/ftlb for parameters 5, 6 & 7

{{editprotected|Template:Convert/ftlb}}
19-Jan-2011: The foot-pound converter Template:Convert/ftlb needs to pass parameters 5, 6 & 7 to enable more options to be specified.

Line 1 of the template should be replaced with the following copy/paste text:
{{convert/{{{d}}}|{{{1}}}|{{{2|}}}|{{{3|}}}|{{{4|}}}|{{{5|}}}|{{{6|}}}|{{{7|}}}|s={{{s|}}}|r={{{r}}}

When working properly, the current results, below, will match the expected:

  • Expected: {{Convert|4|or|7|ftlb|0|adj=mid|[[tug]]}} → 4-or-7-foot-pound tug (5 or 9 N·m)
  • Currently: {{Convert|4|or|7|ftlb|0|adj=mid|[[tug]]}} → 4-or-7-foot-pound tug (5 or 9 J)
  • Expected: {{Convert|8|-|10|ftlb|0|adj=mid|pull}} → 8–10-foot-pound pull (11–14 N·m)
  • Currently: {{Convert|8|-|10|ftlb|0|adj=mid|pull}} → 8–10-foot-pound pull (11–14 J)

After update, the results should match. -Wikid77 12:55, 19 January 2011 (UTC)

 Done  Ronhjones  (Talk) 23:40, 19 January 2011 (UTC)

Fix Convert/sround for parser errors

{{editprotected|Template:Convert/sround}}
19-Jan-2011: The precision rounder Template:Convert/sround needs use noinclude'd data to avoid parser errors.

Line 1 of the template should be replaced with the following copy/paste text:
{{formatnum<noinclude>?</noinclude>:{{rnd<noinclude>{{{?}}}</noinclude>|{{{2}}}|({{{4}}}-{{Order of magnitude<noinclude>{{{?}}}</noinclude>|{{{2}}}}}-1)}}}}<noinclude>

When working properly, the current results, below, will match the expected:

  • Expected: {{formatnum?:{{rnd{{{?}}}|{{{2}}}|({{{4}}}-{{Order of magnitude{{{?}}}|{{{2}}}}}-1)}}}}
  • Currently: See Template:Convert/sround to check for the current result, when viewed as a non-included template.

After update, the results should match. -Wikid77 12:55, 19 January 2011 (UTC)

Well I've done it and they don't match, and I've checked with another browser - in case the cache is getting in the way.  Ronhjones  (Talk) 23:45, 19 January 2011 (UTC)
  • Wait, you did the correct update, but this is a situation which cannot be tested here, because the test relies on being viewed in "noinclude" mode and everything here is "included". I have changed the instructions, above, to say, "See Template:Convert/sround to check for the current result...". Sorry, I didn't think earlier about the implication of a change using "noinclude" which cannot be tested when included on this talk-page. -Wikid77 00:12, 20 January 2011 (UTC)
No problem, It didn't seem to break anything, which is why I left the update stand.  Ronhjones  (Talk) 13:18, 20 January 2011 (UTC)

Fix Convert/LoffAonSoff for wrapping unit

{{editprotected}}
01-March-2011: The conversion-display Template:Convert/LoffAonSoff needs to be updated from Template:Convert/LoffAonSoff/sandbox, to change the format to not wrap between a small number and the unit in the result.

The results can be seen in a View-source, of the formatted page, during edit-preview of this topic, to compare the following examples for the placement of "&#160;" after the numbers.

  • Expected: {{Convert|1|mi|ft}} → internally 1&#160;mile (5,300&#160;ft)
  • Currently: {{Convert|1|mi|ft}} → 1 mile (5,300 ft) internally view-source of this topic.
Expected: {{Convert|1|mi|ft}} → 1 mile
(5,300 ft)
Currently: {{Convert|1|mi|ft}} → 1 mile (5,300 ft)
  • Expected: {{Convert|9|mi|ft}} → internally 9&#160;miles (48,000 ft)
  • Currently: {{Convert|9|mi|ft}} → 9 miles (48,000 ft) internally view-source of this topic.
Expected: {{Convert|9|mi|ft}} → 9 miles (48,000
ft)
Currently: {{Convert|9|mi|ft}} → 9 miles (48,000 ft)

The wrapping between "5,300" and "ft" should stop. -Wikid77 17:06, 1 March 2011 (UTC)

Done. Plastikspork ―Œ(talk) 03:06, 9 March 2011 (UTC)

Fix Convert/LonAonSoff for wrapping unit

{{editprotected}}
01-March-2011: The conversion-display Template:Convert/LonAonSoff, for wikilinked units, needs to be updated from the sandbox Template:Convert/LonAonSoff/sandbox, to change the format to not wrap between a small number and the unit in the result.

The results can be seen in a View-source, of the formatted page, during edit-preview of this topic, to compare the following examples for the placement of "&#160;" after the numbers.

  • Expected: {{Convert|1|mi|ft|lk=on}} → internally 1&#160;[[Mile|mile]] (5,300&#160;[[Foot (length)|ft]])
  • Currently: {{Convert|1|mi|ft|lk=on}} → 1 mile (5,300 ft) internally view-source of this topic.
Expected: {{Convert|1|mi|ft|lk=on}} → mile (5,300 ft)
Currently: {{Convert|1|mi|ft|lk=on}} → 1 mile (5,300 ft)
  • Expected: {{Convert|90|mi|ft|lk=on}} → internally 90&#160;[[Mile|miles]] (480,000&#160;[[Foot (length)|ft]])
  • Currently: {{Convert|90|mi|ft|lk=on}} → 90 miles (480,000 ft) internally view-source of this topic.
Expected: {{Convert|90|mi|ft|lk=on}} → 90 miles (480,000
ft)
Currently: {{Convert|90|mi|ft|lk=on}} → 90 miles (480,000 ft)

It should wrap between "480,000" and "ft". -Wikid77 17:06, 1 March 2011 (UTC)

Done. Plastikspork ―Œ(talk) 03:05, 9 March 2011 (UTC)

Fix Convert/USgal for parameters 5/6/7 & 8

{{editprotected}}
03-March-2011: The US-gallon converter Template:Convert/USgal needs to be updated from the sandbox Template:Convert/USgal/sandbox, to pass parameters 5, 6, 7 and 8 to allow more options.

Compare the following examples:

  • Expected: {{Convert|2|USgal|USquart|disp=x| total (| total)}} → 2 US gallons total (8.0 US qt total)
  • Currently: {{Convert|2|USgal|USquart|disp=x| total (| total)}} → 2 US gallons total (8.0 US qt total)
  • Expected: {{Convert|4|USgal|USquart|disp=x| leaked (| leaked)}} → 4 US gallons leaked (16 US qt leaked)
  • Currently: {{Convert|4|USgal|USquart|disp=x| leaked (| leaked)}} → 4 US gallons leaked (16 US qt leaked)

The results should be identical. -Wikid77 05:27, 3 March 2011 (UTC)

Done. Plastikspork ―Œ(talk) 03:08, 9 March 2011 (UTC)

Fix Convert/L for parameters 5/6/7 & 8

{{editprotected}}
03-March-2011: The litre converter Template:Convert/L needs to pass parameters 5, 6, 7 and 8 to enable more options to be specified.

Line 1 of the template should be replaced with the following copy/paste text:
{{convert/{{{d}}}|{{{1}}}|{{{2|}}}|{{{3|}}}|{{{4|}}}|{{{5|}}}|{{{6|}}}|{{{7|}}}|{{{8|}}}|s={{{s|}}}|r={{{r}}}

When working properly, the current results, below, will match the expected:

  • Expected: {{Convert|2|L|USquart|disp=x| total (| total)}} → 2 litres total (2.1 US qt total)
  • Currently: {{Convert|2|L|USquart|disp=x| total (| total)}} → 2 litres total (2.1 US qt total)
  • Expected: {{Convert|4|L|USquart|disp=x| of ale [| beer]}} → 4 litres of ale [4.2 US qt beer]
  • Currently: {{Convert|4|L|USquart|disp=x| of ale [| beer]}} → 4 litres of ale [4.2 US qt beer]

The results should be identical. -Wikid77 15:29, 3 March 2011 (UTC)

Done. Plastikspork ―Œ(talk) 03:09, 9 March 2011 (UTC)

Fix Convert/l for parameters 5/6/7 & 8

{{editprotected}}
04-March-2011: The litre converter Template:Convert/l (shows symbol as lower-case ell "l" rather than upper-case "L" by Convert/L) needs to pass parameters 5, 6, 7 and 8 to enable more options to be specified.

Line 1 of the template should be replaced with the following copy/paste text:
{{convert/{{{d}}}|{{{1}}}|{{{2|}}}|{{{3|}}}|{{{4|}}}|{{{5|}}}|{{{6|}}}|{{{7|}}}|{{{8|}}}|s={{{s|}}}|r={{{r}}}

When working properly, the current results, below, will match the expected:

  • Expected: {{Convert|2|l |USquart|disp=x| used (| used)}} → 2 litres used (2.1 US qt used)
  • Currently: {{Convert|2|l |USquart|disp=x| used (| used)}} → 2 litres used (2.1 US qt used)
  • Expected: {{Convert|4|l |USquart|disp=x| of soda [| soda]}} → 4 litres of soda [4.2 US qt soda]
  • Currently: {{Convert|4|l |USquart|disp=x| of soda [| soda]}} → 4 litres of soda [4.2 US qt soda]

The results should match. -Wikid77 07:20, 4 March 2011 (UTC)

Done. Plastikspork ―Œ(talk) 03:11, 9 March 2011 (UTC)

Fix Convert/ml for parameters 5/6/7 & 8

{{editprotected}}
04-March-2011: The millilitre converter Template:Convert/ml (with lower-case em-ell "ml") needs to pass parameters 5, 6, 7 and 8 to enable more options to be specified.

Line 1 of Convert/ml should be replaced with the following copy/paste text:
{{convert/{{{d}}}|{{{1}}}|{{{2|}}}|{{{3|}}}|{{{4|}}}|{{{5|}}}|{{{6|}}}|{{{7|}}}|{{{8|}}}|s={{{s|}}}|r={{{r}}}

When updated, the current results & expected should match:

  • Expected: {{Convert|200|ml |USquart|disp=x| max (| max)}} → 200 millilitres max (0.21 US qt max)
  • Currently: {{Convert|200|ml |USquart|disp=x| max (| max)}} → 200 millilitres max (0.21 US qt max)
  • Expected: {{Convert|400|ml |USquart|disp=x| of THC [| THC]}} → 400 millilitres of THC [0.42 US qt THC]
  • Currently: {{Convert|400|ml |USquart|disp=x| of THC [| THC]}} → 400 millilitres of THC [0.42 US qt THC]

The millilitres & text should match. -Wikid77 07:37, 4 March 2011 (UTC)

Done. Plastikspork ―Œ(talk) 03:13, 9 March 2011 (UTC)

Fix Convert/Cal for Calorie and doc text

{{editprotected}}
04-March-2011: The Calorie converter Template:Convert/Cal (with upper-case "Cal") should be updated from the sandbox Template:Convert/Cal/sandbox to show capitalized large "Calorie" rather than the lower-case gram calorie. Also, doc text will be shown.

When updated, the current results & expected should match:

  • Expected: {{Convert|1|Cal}} → 1 Calorie (4.2 kJ)
  • Currently: {{Convert|1|Cal}} → 1 calorie (4.2 kJ)
  • Expected: {{Convert|200|Cal|0|disp=x| (| value)}} → 200 Calories (837 kJ value)
  • Currently: {{Convert|200|Cal|0|disp=x| (| value)}} → 200 calories (837 kJ value)

It should show capitalized "Calorie". -Wikid77 05:00, 6 March 2011 (UTC)

Done. Plastikspork ―Œ(talk) 03:15, 9 March 2011 (UTC)

Fix Convert/3 to allow any separators

{{editprotected}}
15-March-2011: The 3-amount converter Template:Convert/3 should be updated from the sandbox Template:Convert/3/sandbox to no longer restrict the range-word between amounts 1 & 2 and allow a comma separator ("11.4, 22.6"). IMPACT: Only 20 articles will be affected, because Convert/3 was only recently added to the documentation, so very few people knew to use it.

When updated, the current results & expected should match:

  • Expected: {{convert/3 |11|,|22|, or|33|m}} → 11, 22, or 33 metres (36, 72, or 108 ft)
  • Currently: {{convert/3 |11|,|22|, or|33|m}} → {{convert/3|11|,|22|, or|33|m}}
  • Expected: {{convert/3 |5|or|6|up to|9|mi|km}} → {{convert/3/sandbox|5|or|6|up to|9|mi|km}}
  • Currently: {{convert/3 |5|or|6|up to|9|mi|km}} → {{convert/3|5|or|6|up to|9|mi|km}}

Basically, any text should be allowed between amounts 1 & 2. -Wikid77 22:16, 15 March 2011 (UTC)

Done. Plastikspork ―Œ(talk) 01:38, 16 March 2011 (UTC)

Expand Convert to allow 8 parameters

{{editprotected}}
02-April-2011: The top-level Template:Convert should be expanded to pass parameters {{{7}}} & {{{8}}} to allow more options in range conversions, by using the logic "|{{{6|}}}|{{{7|}}}|{{{8|}}}" at parameter 6.
IMPACT: Over 325,000 articles (using Convert) would be reformatted.

When updated, the current results & expected should match:

  • Expected: {{convert |11|-|22|m|ft|disp=x| <<|>>}} → 11–22 metres <<36–72 ft>>
  • Currently: {{convert |11|-|22|m|ft|disp=x| <<|>>}} → 11–22 metres <<36–72 ft>>
  • Expected: {{convert|4|by|9|in|cm|abbr=on|disp=x| (| approx.)}} → 4 by 9 in (10 by 23 cm approx.)
  • Currently: {{convert|4|by|9|in|cm|abbr=on|disp=x| (| approx.)}} → 4 by 9 in (10 by 23 cm approx.)
  • Expected: {{convert|3|or|7|in|cm|abbr=on|disp=x| [|]| -1}} → 3 or 7 in [10 or 20 cm]
  • Currently: {{convert|3|or|7|in|cm|abbr=on|disp=x| [|]| -1}} → 3 or 7 in [10 or 20 cm]

Convert had been omitting parameters 7 & 8. -Wikid77 17:09, 2 April 2011 (UTC)

Done. Plastikspork ―Œ(talk) 17:15, 2 April 2011 (UTC)

Fix Convert/kJ/g for parameters 5/6/7

{{editprotected}}
04-April-2011: The kilojoule-per-gram converter Template:Convert/kJ/g needs to pass parameters 5, 6 and 7 to enable more options to be specified.

Line 1 of {Convert/kJ/g} should be replaced with the following copy/paste text:
{{convert/{{{d}}}|{{{1}}}|{{{2|}}}|{{{3|}}}|{{{4|}}}|{{{5|}}}|{{{6|}}}|{{{7|}}}|s={{{s|}}}|r={{{r}}}

When updated, the current results & expected should match:

  • Expected: {{Convert|200|kJ/g |BTU/lb|disp=x| max (| max)}} → 200 kilojoules per gram max (470,000 BTU/lb max)
  • Currently: {{Convert|200|kJ/g |BTU/lb|disp=x| max (| max)}} → 200 kilojoules per gram max (86,000 BTU/lb max)

The end text should match. -Wikid77 06:10, 4 April 2011 (UTC)

Done. Plastikspork ―Œ(talk) 02:04, 5 April 2011 (UTC)

Fix Convert/USqt for parameters 5/6/7

{{editprotected}}
04-April-2011: The US-quart converter Template:Convert/USqt needs to pass parameters 5, 6 and 7 to enable more options to be specified.

Line 1 of {Convert/USqt} should be replaced with the following copy/paste text:
{{convert/{{{d}}}USre|{{{1}}}|{{{2|}}}|{{{3|}}}|{{{4|}}}|{{{5|}}}|{{{6|}}}|{{{7|}}}|s={{{s|}}}|r={{{r}}}

When updated, the current results & expected should match:

  • Expected: {{Convert|3|USqt |L|disp=x| volume (| volume)}} → 3 quarts volume (2.8 L volume)
  • Currently: {{Convert|3|USqt |L|disp=x| volume (| volume)}} → 3 US quarts volume (2.8 L volume)

The end text should match. -Wikid77 06:10, 4 April 2011 (UTC)

Done. Plastikspork ―Œ(talk) 02:04, 5 April 2011 (UTC)

Fix Convert/impqt for parameters 5/6/7

{{editprotected}}
04-April-2011: The imperial-quart converter Template:Convert/impqt needs to pass parameters 5, 6 and 7 to enable more options to be specified.

Line 1 of {Convert/impqt} should be replaced with the following copy/paste text:
{{convert/{{{d}}}Imp|{{{1}}}|{{{2|}}}|{{{3|}}}|{{{4|}}}|{{{5|}}}|{{{6|}}}|{{{7|}}}|s={{{s|}}}|r={{{r}}}

When updated, the current results & expected should match:

  • Expected: {{Convert|2|impqt |L|disp=x| total (| total)}} → 2 imperial quarts total (2.3 L total)
  • Currently: {{Convert|2|impqt |L|disp=x| total (| total)}} → 2 imperial quarts total (2.3 L total)

The end text should match. -Wikid77 06:10, 4 April 2011 (UTC)

Done. Plastikspork ―Œ(talk) 02:04, 5 April 2011 (UTC)

Fix Convert/m2 for parameters 5/6/7

{{editprotected|Template:Convert/m2}}
20-May-2011: The square-metre converter Template:Convert/m2 needs to pass parameters 5, 6 and 7 to enable more options to be specified.

Line 1 of {Convert/m2} should be replaced with the following copy/paste text:
{{convert/{{{d}}}|{{{1}}}|{{{2|}}}|{{{3|}}}|{{{4|}}}|{{{5|}}}|{{{6|}}}|{{{7|}}}|s={{{s|}}}|r={{{r}}}

When updated, the current results & expected should match:

  • Expected: {{Convert|2|m2|sqft|disp=x| total (| total)}} → 2 square metres total (22 sq ft total)
  • Currently: {{Convert|2|m2|sqft|disp=x| total (| total)}} → 2 square metres total (22 sq ft total)

The end-text after "sq ft" should match. -Wikid77 20:09, 20 May 2011 (UTC)

Done. Plastikspork ―Œ(talk) 01:04, 21 May 2011 (UTC)

Fix Convert/m3 for parameters 5/6/7

{{editprotected|Template:Convert/m3}}
20-May-2011: The cubic-metre converter Template:Convert/m3 needs to pass parameters 5, 6 and 7 to enable more options to be specified.

Line 1 of {Convert/m3} should be replaced with the following copy/paste text:
{{convert/{{{d}}}|{{{1}}}|{{{2|}}}|{{{3|}}}|{{{4|}}}|{{{5|}}}|{{{6|}}}|{{{7|}}}|s={{{s|}}}|r={{{r}}}

When updated, the current results & expected should match:

  • Expected: {{Convert|6|m3|cuft|disp=x| in all (| in all)}} → 6 cubic metres in all (210 cu ft in all)
  • Currently: {{Convert|6|m3|cuft|disp=x| in all (| in all)}} → 6 cubic metres in all (210 cu ft in all)

The end-text after "cu ft" should match. -Wikid77 20:09, 20 May 2011 (UTC)

Done. Plastikspork ―Œ(talk) 01:01, 21 May 2011 (UTC)

Fix Convert/LoffAoffDbSoffTs to nowrap degrees

{{editprotected|Template:Convert/LoffAoffDbSoffTs}}
20-May-2011: The temperature converter Template:Convert/LoffAoffDbSoffTs needs to use 2 instances of the nowrap span-style tag: <span style="white-space:nowrap;"> preventing the split of "°" and "C" when wrapping the degree symbol. IMPACT: only about 105 pages.

Line 1 of {Convert/LoffAoffDbSoffTs} should be replaced with the following copy/paste text:
<span style="white-space:nowrap;">{{convert/numdisp|{{{1|2+1/2}}} }} {{{u}}}</span> <span style="white-space:nowrap;">({{convert/{{#if:{{{2|}}}|{{{o}}}|{{{3}}}}}|{{#expr:{{{1|0}}} }}|{{{b}}}|{{#if:{{{2|}}}|{{{3|}}}|{{{4|}}}}}|{{{s|}}}|d=Loff}})</span><noinclude>

When updated, the current results & expected should match:

  • Expected: {{Convert|14|C|F}} → 14 °C (57 °F)
  • Currently: {{Convert|14|C|F}} → 14 °C (57 °F)
  • Expected: {{Convert|21|C|F|disp=x| average (| average)}} → 21 °C average (70 °F average)
  • Currently: {{Convert|21|C|F|disp=x| average (| average)}} → 21 °C average (70 °F average)

The end-text after "°F" should match. Also, when viewing the edit-preview by the browser option <View><Source>, then a span-tag should appear before the temperature "14 °C" as:

  • Look inside <View><Source> for:   <span style="white-space:nowrap;">14 °C<span>

Formerly, the prior version did not use "<span style..>" tags, so that will be an obvious difference inside the markup text. -Wikid77 20:09, 20 May 2011 (UTC)

Done. Note, I updated Template:Convert/LoffAonDbSoffT as well. Are there more? Plastikspork ―Œ(talk) 00:52, 21 May 2011 (UTC)

Fix Convert/LT to abbreviate and allow 5/6/7

{{editprotected|Template:Convert/LT}}
21-May-2011: The long-ton converter Template:Convert/LT needs to allow option "abbr=on" to abbreviate as "LT" for long tons, and allow parameters 5, 6 and 7.

Line 1 of {Convert/m2} should be replaced with the following 2 lines of copy/paste text:
{{convert/{{{d}}}|{{{1}}}|{{{2|}}}|{{{3|}}}|{{{4|}}}|{{{5|}}}|{{{6|}}}|{{{7|}}}|s={{{s|}}}|r={{{r}}}
|u=LT

When updated, the current results & expected should match:

  • Expected: {{Convert|8|ST|LT|abbr=on}} → 8 short tons (7.1 LT)
  • Currently: {{Convert|8|ST|LT|abbr=on}} → 8 short tons (7.1 long tons)
  • Expected: {{Convert|6|t|LT|disp=x| total (| total)}} → 6 tonnes total (5.9 LT total)
  • Currently: {{Convert|6|t|LT|disp=x| total (| total)}} → 6 tonnes total (5.9 long tons total)

When "u=LT" is defined, then end-text at "LT" should match. -Wikid77 18:30, 21 May 2011 (UTC)

Done. Plastikspork ―Œ(talk) 18:59, 21 May 2011 (UTC)
Don't use "ST", "LT" or "MT" per WP:MOSNUM#Specific units. JIMp talk·cont 06:18, 25 May 2011 (UTC)
Please remove the "|u=LT" from Template:Convert/LT as per Jimp. Frietjes (talk) 23:34, 26 May 2011 (UTC)
I reverted the addition of "u=LT" per request, it can be re-added, but it appears this is contentious. Thanks! Plastikspork ―Œ(talk)
Wait and see what comes to pass at WT:MOSNUM#LT and ST symbols for long ton and short ton. I was going to mention the missing Na (stands for "no abbreviation") but it looks like the subtemplates are working fine without them. JIMp talk·cont 01:05, 27 May 2011 (UTC)
There is a problem after all. JIMp talk·cont 12:21, 27 May 2011 (UTC)

Fix Convert/and/frn1 for any fraction

{{editprotected|Template:Convert/and/frn1}}
22-May-2011: The unit-and-fraction formatter Template:Convert/and/frn1 needs to allow any fraction, in the same format as other fractions (but not using the fraction glyph characters, so all fractions will use a consistent format).

Most lines of {Convert/and/frn1} should be replaced with the following 3 lines of copy/paste text:
{{Convert/numdisp/fracparts
  |{{{1|-1200-3/118}}}|{{#titleparts:{{{1|-1200-3/118}}}|1|1}}|{{#titleparts:{{{1|-1200-3/118}}}|1|2}}}}<!--split at "/" --
--> {{{3}}}<noinclude>

When updated, current & expected should match for any fraction:

  • Expected: {{Convert|8|ft|6+1/2|in|cm}} → 8 feet 6 12 inches (260.4 cm)
  • Currently: {{Convert|8|ft|6+1/2|in|cm}} → 8 feet 6+12 inches (260.4 cm)
  • Expected: {{Convert|4|ft|10+27/100|in|m|abbr=on}} → 4 ft 10 27100 in (1.480 m)
  • Currently: {{Convert|4|ft|10+27/100|in|m|abbr=on}} → 4 ft 10+27100 in (1.4801 m)

After update, then any fraction should work. -Wikid77 00:41, 22 May 2011 (UTC)

Done, and unprotected, since there are under 100 transclusions. Thanks! Plastikspork ―Œ(talk) 00:54, 27 May 2011 (UTC)

Fix Convert/t for parameters 5/6/7

{{editprotected|Template:Convert/t}}
25-May-2011: The tonne converter Template:Convert/t needs to pass parameters 5, 6 and 7 to enable more options to be specified.

Line 1 of {Convert/t} should be replaced with the following copy/paste text:
{{convert/{{{d}}}|{{{1}}}|{{{2|}}}|{{{3|}}}|{{{4|}}}|{{{5|}}}|{{{6|}}}|{{{7|}}}|s={{{s|}}}|r={{{r}}}

When updated, the current results & expected should match:

  • Expected: {{Convert|4|t|LT|disp=x| total (| total)}} → 4 tonnes total (3.9 LT total)
  • Currently: {{Convert|4|t|LT|disp=x| total (| total)}} → 4 tonnes total (3.9 long tons total)

The end-text after "LT" should match. -Wikid77 06:48, 26 May 2011 (UTC)

Done. Plastikspork ―Œ(talk) 00:56, 27 May 2011 (UTC)

Fix Convert/ST to abbreviate and allow 5/6/7

{{editprotected|Template:Convert/ST}}
21-May-2011: The short-ton converter Template:Convert/ST needs to allow option "abbr=on" to abbreviate as "ST" for long tons, and allow parameters 5, 6 and 7.

Line 1 of {Convert/m2} should be replaced with the following 2 lines of copy/paste text:
{{convert/{{{d}}}|{{{1}}}|{{{2|}}}|{{{3|}}}|{{{4|}}}|{{{5|}}}|{{{6|}}}|{{{7|}}}|s={{{s|}}}|r={{{r}}}
|u=ST

When updated, the current results & expected should match:

  • Expected: {{Convert|8|LT|ST|abbr=on}} → 8 LT (9.0 ST)
  • Currently: {{Convert|8|LT|ST|abbr=on}} → 8 long tons (9.0 short tons)
  • Expected: {{Convert|6|t|ST|disp=x| total (| total)}} → 6 tonnes total (6.6 ST total)
  • Currently: {{Convert|6|t|ST|disp=x| total (| total)}} → 6 tonnes total (6.6 short tons total)

When "u=ST" is defined, then end-text at "ST" should match. -Wikid77 06:48, 26 May 2011 (UTC)

We shouldn't add the "u=ST" part as discussed in Wikipedia:MOSNUM#Specific_units. We should also remove the "u=LT" from template:convert/LT for the same reason. Frietjes (talk) 23:34, 26 May 2011 (UTC)
Partially done, since the ST part is contentious. Thanks! Plastikspork ―Œ(talk) 00:59, 27 May 2011 (UTC)

Fix Convert/Dual/LoffAonDbSoff and Convert/- to allow nocomma

{{editprotected}}
26-May-2011: The dual conversions need to be updated to allow for "nocomma".

{Convert/Dual/LoffAonDbSoff} should be replaced with the following

{{formatnum:{{convert/{{{2}}}/AonSoff|{{{1}}}|{{{3}}}|u={{{u}}}|U={{{u}}}}}}} ({{convert/{{#ifeq:{{{4}}}|def|{{{o}}}|{{{4}}}}}|{{{1}}}|{{{2}}}/AonSoff|{{{3}}}|{{{s}}}+{{{b}}}|r={{{r}}}|j={{{j}}}|d=Dual/Loff}})

{Convert/-} should be replaced with the following

{{convert/{{{4}}}|{{{1}}}|-|{{{3}}}<!--
-->|{{#ifeq:{{#expr:({{{5}}}+0)*0}}|0|def|{{{5}}}}}<!--param. 4
-->|{{{6|}}}<!--set parameter 5--
-->|{{{7|}}}<!--set parameter 6--
-->|s=({{#ifeq:{{#expr:({{{5|a}}})*0}}|0|{{{5}}}|{{#ifeq:{{#expr:({{{6|a}}})*0}}|0|{{{6}}}|{{#ifeq:{{#expr:({{{8|a}}})*0}}|0|{{{8}}}|0.5}} }} }})+(0{{{s}}})<!--set precision as numeric {5},{6} or {8}
-->|r={{{r}}}|d=Dual/{{{d}}}}}

When updated, the current results & expected should match:

  • Expected: {{convert|8000|–|9000|kg|lb|abbr=on|disp=nocomma}} → 8000–9000 kg (18000–20000 lb)
  • Currently: {{convert|8000|–|9000|kg|lb|abbr=on|disp=nocomma}} → 8,000–9,000 kg (18,000–20,000 lb)*
  • Expected: {{convert|8000|–|9000|kg|lb|abbr=on}} → 8,000–9,000 kg (18,000–20,000 lb)
  • Currently: {{convert|8000|–|9000|kg|lb|abbr=on}} → 8,000–9,000 kg (18,000–20,000 lb)

Updates to other dual conversion templates are most likely needed, but this change will not make things worse (just add a redundant "formatnum"). Frietjes (talk) 23:32, 26 May 2011 (UTC)

Done. I see how adding the "formatnum" won't change anything, but it seems as though removing it from {{convert/-}} might remove the numeric formatting in some cases. However, I don't see any major problems at the moment. Let me know if this needs more changes. Thanks! Plastikspork ―Œ(talk) 01:30, 27 May 2011 (UTC)

Missing space

{{editprotected}} Re: Template:Convert/LoffAonDbSoffper (edit | talk | history | links | watch | logs)
The above subtemplate is missing an &nbsp;

Please copy and paste the code from edit mode. <includeonly>{{{$|}}}{{convert/numdisp|{{{1}}}}} {{{u|}}}/{{{/u}}} ({{convert/{{#if:{{{2|}}}|{{{o}}}|{{{3}}}}}|{{{1}}}|({{{1}}})*{{{b}}}|{{#if:{{{2|}}}|{{{3|}}}|{{{4|}}}}}|{{{s|}}}|r={{{r}}}|j={{{j}}}|D={{{D}}}|$D={{{$D|}}}|d=LoffAonSoff}})</includeonly> JIMp talk·cont 01:59, 31 May 2011 (UTC)

Will do. Plastikspork ―Œ(talk) 02:05, 31 May 2011 (UTC)
Thanks. JIMp talk·cont 02:06, 31 May 2011 (UTC)

Thanks for fixing the subtemplate but I'm afraid I've just found the nbsp showing up somewhere it doesn't belong (i.e. $123/ha ($50/acre)). An #if should fix it. The new code is below (in edit mode). <includeonly>{{{$|}}}{{convert/numdisp|{{{1}}}}}{{#if:{{{u|}}}| {{{u}}}}}/{{{/u}}} ({{convert/{{#if:{{{2|}}}|{{{o}}}|{{{3}}}}}|{{{1}}}|({{{1}}})*{{{b}}}|{{#if:{{{2|}}}|{{{3|}}}|{{{4|}}}}}|{{{s|}}}|r={{{r}}}|j={{{j}}}|D={{{D}}}|$D={{{$D|}}}|d=LoffAonSoff}})</includeonly> JIMp talk·cont 06:24, 31 May 2011 (UTC)

Done Dabomb87 (talk) 18:39, 31 May 2011 (UTC)

Extra bracket

{{editprotected}} Template:Convert/englout (edit | talk | history | links | watch | logs)

The subtemplate above has an extra square bracket. I've marked it in red below.

{{formatnum:{{{1}}}}} {{convert/SpellnumSrtLon{{{k}}}}}{{convert/{{{y}}}/Lon|Aoff|#32}}{{convert/engout/{{#if:{{{q|}}}|q}}{{#ifeq:{{{l}}}|s||n{{#expr:({{{1}}}=1)*({{{k}}}=0)}}}}|{{{x}}}/Lon|#32|[[{{{g}}}|{{{q}}}]]|[[[{{{t}}}|{{{n}}}]]|[[{{{t}}}|{{{l}}}]]}}<noinclude>[[category:Subtemplates of Template Convert]]</noinclude>

Here the corrected version.

{{formatnum:{{{1}}}}} {{convert/SpellnumSrtLon{{{k}}}}}{{convert/{{{y}}}/Lon|Aoff|#32}}{{convert/engout/{{#if:{{{q|}}}|q}}{{#ifeq:{{{l}}}|s||n{{#expr:({{{1}}}=1)*({{{k}}}=0)}}}}|{{{x}}}/Lon|#32|[[{{{g}}}|{{{q}}}]]|[[{{{t}}}|{{{n}}}]]|[[{{{t}}}|{{{l}}}]]}}<noinclude>[[category:Subtemplates of Template Convert]]</noinclude>

and again

{{formatnum:{{{1}}}}} {{convert/SpellnumSrtLon{{{k}}}}}{{convert/{{{y}}}/Lon|Aoff|#32}}{{convert/engout/{{#if:{{{q|}}}|q}}{{#ifeq:{{{l}}}|s||n{{#expr:({{{1}}}=1)*({{{k}}}=0)}}}}|{{{x}}}/Lon|#32|[[{{{g}}}|{{{q}}}]]|[[{{{t}}}|{{{n}}}]]|[[{{{t}}}|{{{l}}}]]}}<noinclude>[[category:Subtemplates of Template Convert]]</noinclude>

JIMp talk·cont 03:35, 1 June 2011 (UTC)

Done. Plastikspork ―Œ(talk) 05:17, 1 June 2011 (UTC)

End notes

All requests should be proofread. Put new requests above here. Wikid77 12:19, 5 January 2011 (UTC)

Deletions

The standard measurement-converter Template:Convert, on the English Wikipedia, has many subtemplates which have become obsolete or could be replaced by a few reduced subtemplates. There are hundreds which could be deleted. Many of the unneeded subtemplates for conversions are still being debated for future deletion, as discussed on the talk-page here.

Some of the templates which should be removed, long-term, are:

Also look for discussions about template-deletions in the main talk-page, Template_talk:Convert.

Purpose

The subtemplate Template:Convert/deletions was created by long-term user Wikid77 on 23 March 2010, to focus issues about subtemplate-deletions (removing those unneeded), as a separate discussion. Because the main talk-page for {{Convert}} covers so many topics, extensive details about any major topic tend to get scattered and eclipsed by all the other topics which clutter that main talk-page. By having a separate subpage as {{Convert/deletions}}, then those issues can be condensed, as an overview there, and later discussed with that dedicated focus. -Wikid77 13:15, 23 March 2010 (UTC)

Changing to not use subtemplates USre or USer

Many conversions about the imperial units and U.S. units can be modified to bypass dozens of special subtemplates, which could then later be deleted. The basic change, to be edited into those conversions, is to set U.S. units to show either "US" or "U.S.", while imperial units show "imperial" or symbols have "imp". For the U.S. units, set the wording of the unit name, at the outset, as either "US" or "U.S." depending on the spelling-style parameter {r} (for either British or U.S. spellings), rather than have hundreds of specialized subtemplates which insert "US" or "U.S." when displayed in the final step. In each unit-conversion subtemplate (such as Template:Convert/USgal), the 3 parameters {u}, {n} & {h} would need to be reset to either specify "U.S." (or "US"), or choose which spelling based on parameter {r}, as follows:

To update U.S. units, use:
|u={{#ifeq:{{{r|re}}}|re|US|U.S.}}&nbsp;gal
|n={{#ifeq:{{{r|re}}}|re|US|U.S.}} gallon
|h={{#ifeq:{{{r|re}}}|re|US-|U.S.&#32;}}gallon

To update imperial units, use:
|u=imp&nbsp;gal
|n=imperial gallon
|h=imperial-gallon

By setting those values for {u}, {n} and {h} inside about 78 unit-conversion subtemplates, then hundreds of Convert display subtemplates named "...USre" or "...USer" can be bypassed and later deleted.

The following are the subtemplates to be changed:

From the index-list Special:PrefixIndex/Template:Convert/U.S.:
From the index-list Special:PrefixIndex/Template:Convert/US:

Among the many, many subtemplates to be deleted, long-term, are:

Not only could those be deleted, but also, hundreds of future subtemplates could be avoided which would be needed to implement new features involving those unit names containing either "U.S." or "US". Some of the new features are: disp=x or disp=flip. -Wikid77 13:15, 23 March 2010, revised 14:09, 24 January 2011 (UTC)

This wasn't the best solution but ...

Sure there is a whole bunch of clutter here that needn't have been put there in the first place. When I went and redid the template all those years ago I thought I'd be finished in a couple of weeks ... hmmm. But let's slow down a little. Replace this with |u=imp&nbsp;gal etc.? This is missing the point of these subtemplates. The "imp"/"imperial" and "US"/U.S." was meant to link separately to the articles on the systems with the units to link to unit articles (like Gallon). We don't need one for "imp"/"imperial", one for "US" and one for "U.S."; we could handle these three by using a single subtemplate (and reduce the number by a third). Let's stop throwing the babies out with their bath water (I see the US gallon baby is already gone). JIMp talk·cont 07:38, 31 May 2011 (UTC)

Actually this has inspired me somewhat to go back to something I'd had in mind ... even better than rolling these three into one (if it gets off the drawing board) ... stay tuned. JIMp talk·cont 00:20, 1 June 2011 (UTC)

Still used

I've been on a deletion spree. Here are some subtemplates which I've left (since they're in use)

From Template:Convert/Maintenance/outputs/US
Template:Convert/LoffAonDorSoffUSre (edit | talk | history | links | watch | logs)
Template:Convert/LonAonDbSoffUSre (edit | talk | history | links | watch | logs)
Template:Convert/LonAoffDbSoffUSre (edit | talk | history | links | watch | logs)
Template:Convert/Dual/LoffAonDbSoffUSre (edit | talk | history | links | watch | logs)
Template:Convert/LoffAonDbSoffUSre (edit | talk | history | links | watch | logs)
Template:Convert/LoffAoffDbSonUSre (edit | talk | history | links | watch | logs)
Template:Convert/Dual/LoffAoffDbSoffUSre (edit | talk | history | links | watch | logs)
Template:Convert/LoffAoffDbSoffUSre (edit | talk | history | links | watch | logs)
Template:Convert/LonAonSonUSre (edit | talk | history | links | watch | logs)
Template:Convert/LonAonSoffUSre (edit | talk | history | links | watch | logs)
Template:Convert/LonAoffSoffUSre (edit | talk | history | links | watch | logs)
Template:Convert/LoffAonSonUSre (edit | talk | history | links | watch | logs)
Template:Convert/LoffAonSoffUSre (edit | talk | history | links | watch | logs)
Template:Convert/LoffAoffSoffUSre (edit | talk | history | links | watch | logs)

JIMp talk·cont 16:48, 2 August 2011 (UTC)

A far greater scope

{{Convert/valdisp}}, only in its embryonic phase right now, promises not only to eliminate the USre and USer subtemplates but to hit the Imp, Eng and per ones too ... but wait, there's more, if all goes well, it also will let us get rid of the Na subtemplates ... but that's not all either; by threading the linking, abbreviation and part-of-speech (noun vs adjective) options through the unit subtemplates we can also eliminate Loff, Lon, Lin, Lout, Aon, Aoff, Anone, Soff and Son. In other words, the hundreds of display subtemplates now needed for this monster to function will be collapsed into a handful. In this way we can simplify the structure without compromising such things as the independant linking of unit and system (as with the imperial and US measures of capacity). If it works, this should free us up to create a vast array of display options without having to write thousands of subtemplates (many of which will hardly be used). Concerns might be raised wrt how well {{convert/valdisp}} stays within the template limits. Template nesting is probably not the big concern since it's more a branching structure than a nesting one but there are some extra #ifs, #switchs, etc. I reckon it's probably worth it though. Of course, we're talking a major overhaul though, this'll take time and planning. Consider what options we want (e.g. when converting miles and chains link only chains, when converting stones and pounds link only pounds, when converting billions of miles link only billions or miles, BTU per hour only BTU, allow for scientific notation in the input unit, allow thousands to be delimited by gaps, introduce dimensional analysis accorss the board, wrap the special versions such as {{convert/3}} into the main template, etc., etc.) and consider what things we have to fix (like how |disp=flip doesn't work too well with multiple output units). One thing I'd like to do whilst we're at it is get rid of j; the software allows us to do logarithms now so we don't need it. JIMp talk·cont 06:49, 6 July 2011 (UTC)

Some issues to consider:

  • Checking for empty {{{u}}}: Well, to eliminate "-Na" I had started changing many subtemplates to look for empty {{{u}}}, and they always check if singular {{{1}}} < 1.0001, then {{{u|{{{n}}} }}} else plural {{{u|{{{l|{{{n}}}s}}} }}}. Yet, sometimes, they could NOT "default" when {{{u}}} was empty, so I had to force when {{{u}}} was empty, by "{{#if: {{{u|}}}|...}}". I eventually found a case which could not be handled, where {{{n}}} was not available where empty {{{u}}}} is passed, as if "-Na" was required because of the special, rare case. It was as if the whole world changed to using motorcycles to allow narrow streets, but they forgot a large motorcycle can pull a wide trailer, and discovered "Oops! Wide streets are needed when pulling trailers". Perhaps, the new Convert/valdisp will soon bypass this issue, and an empty {{{u}}} can be treated as {{{n}}}, where {{{n}}} is available "everywhere".
  • Condensing simple options uses only +100 bytes: I already confirmed that Template:Convertx/LxAxDxSx is a workable way to condense simple 1-amount conversions, and the result was only +100 bytes more (per conversion) in the total size within the preprocessor limits. Convertx/LxAxDxSx is only for single-amount conversions, while the larger Template:Convertx/Dual/LxAxDxSx handles the typical 2-amount ranges, and shows the complexity needed.
  • Wrappers as Convert/xx keep clutter outside: I still think more Convert/xx-style wrappers could be used to handle the rare options, rather than support every option inside "Convert/valdisp". For example, new Template:Convert/2 could handle the rare cases of the 2-amount range conversions, such as "disp=flip" rather than embed flipped range conversions into the core areas of Convert.
  • Get precision before rounding: The Convert depth can be reduced 5-10 levels by getting the precision of {{{1}}}, earlier, and passing that precision into the Convert/round of the calculation of {{{2}}}. Waiting to check {{{1}}}'s precision, inside of Convert/round, causes the precision to be the deepest part of the nesting. Hence, {Precision/2010} directly increases total depth by 10 levels. Instead, run get-precision much higher in the nested Convert subtemplates, and pass the precision down.
  • Do not add commas/x10 in rounding: Using formatnum to add commas, and then x109, in Convert/round will add more levels there, which must be undone by yet another level, to un-comma to check for +1/-1 singular or other aspects of the result number. Consider a top-level display which has the rounded result, and then decides when to show x109.

Those are some issues to consider. More later. -Wikid77 21:23, 6 July 2011, revised 04:37, 7 July 2011 (UTC)

The motorcycle with trailer
Neither {{{u}}} nor {{{n}}} ... which was that exactly (I was guessing e3acre, e6acre, etc. ... but it turns out these use a completely different trick)? Using {{{u|{{{n}}}}}} & {{{u|{{{l|{{{n}}}s}}}}}} is pretty interesting but what about non breaking spaces & adjective forms?
LxAxDxSx
I've had a look at {{convertx}} and I think we definitely should incorporate these new features and improvements into the new convert. I have to admit, I'm still picking through to see how it works.
Wrappers
Definitely a sensible approach. When I stumbled upon the template in '07 everything was on one big huge monster page. By splitting it into several we've been able to get this far. Yes, we should keep the main road clear of obstructions. I envisage a number of versions lurking in their own subspace. We could be able to escape into this subspace via a special parameter (or, in certain instances, automatically). We've been using disp, adj and abbr (any others?) for this but it would be nice if we could keep it simple. Sorry, it's a bit vague at present but that's how the idea looks. If possible, though, it might be nice if we could keep users out of the template subspace (i.e. something like Lua error in Module:Template_link_general at line 132: attempt to concatenate local 'titlePart' (a nil value). as opposed to {{convert/2|12|or even|13|lb}}) before all hell breaks loose. It's hard enough to the average user to get their head around parameters without asking them to transclude a subpage ... just my feeling but ...
Getting precision earlier
Nice, this is a good idea. We could check as early as the (current) LxAxDxSx level. As you know, the position of the rounding parameter is not fixed.
Don't format just to unformat
No, formatting is best left till the end.
JIMp talk·cont 02:22, 8 July 2011 (UTC)

Convert/valdisp with 11 nest levels

When having a new design, to delete the old subtemplates, the total Convert nesting depth should remain around only 20 levels deep, and above 25 levels, then users have complained that Convert was "too big". Currently, Convert/valdisp uses only 11 nesting levels, so it seems like it could work within the 20-deep nesting. Example of Convert/valdisp showing use of 11 levels (nested 29 deep):

  • NESTED 29 LEVELS: {{ convert/valdisp|$=|45+1/2|u=mi|n=mile|l=miles|k=0|lk=off|y=empty|/y=US|/n=gallon|adj=off}} → {{ convert/valdisp|$=|45+1/2|u=mi|n=mile|l=miles|k=0|lk=off|y=empty|/y=US|/n=gallon|adj=off}}


By comparison, Convert/numdisp (to show just number+fraction) needs 7 levels to show a fraction, so with Convert/valdisp using only 11 levels, then the design seems feasible for the total Convert nesting to stay within 20 levels. -Wikid77 (talk) 04:37, 7 July 2011 (UTC)

Selecting different d for simple cases

I was thinking to control the access to complex options by checking to switch to various major subtemplates as being "d". For example, if no options are used, then set "d=LoffQuick" where Convert/LoffQuick (or similar name) would be the fastest way to convert m-to-ft conversions with default options. In comparison, once an option has been triggered then set "d=LxAxDxSxComplex" to check for all possible combinations of complex options, which cannot use the simple LoffQuick to handle a rapid, tiny conversion. Many other subtemplates could be deleted because "Lx...Complex" would handle the rare cases which formerly required a special subtemplate, for each case. Looking at the template-usage stats:

The Template:Convert is used in 405,000 pages, where half of them use no options, so Convert/LoffAoffDbSoff has been invoked in 210,566 pages. By having Convert check for the uses-no-options case, then those conversions can be formatted using a special, ultra-simple version as "d=LoffQuick" or such. Consider allowing the precision rounding to also use a quick version of d. -Wikid77 (talk) 23:34, 2 August 2011 (UTC)

This is an interesting idea. I s'pose it could look something like |d=display/{{#if:{{{lk|}}}{{{abbr|}}} ... etc.|{{{disp|paren}}|quick}} (using the idea in sandbox/0). Then lead to other quick versions of subtemplates (e.g. valdisp). JIMp talk·cont 01:28, 3 August 2011 (UTC)
.. or perhaps |d=display/{{{disp|paren}}{{#if:{{{lk|}}}{{{abbr|}}} ... etc.||/quick}} so each disp has a quick (we might want this for large tables). JIMp talk·cont 17:16, 3 August 2011 (UTC)
Of all these fancy features the one we might also like to make quick might be abbr=on. To do so we
  • could replace the {{{abbr|}}} in the #if with {{#ifeq:{{{abbr|on}}}|on||X}} but slow quick down or
  • could use |d=display/{{{disp|paren}}{{#if:{{{lk|}}} ... etc.||/Abbr{{#ifeq:{{{abbr|on}}}|on|on|default}}}} but triple the number of display subtemplates (rather than doubling them)
The second option is still viable, we're not talking two vs three thousand subtemplates ... more like two vs three dozen ... maybe ... JIMp talk·cont 17:41, 3 August 2011 (UTC)