Template talk:Convert/Archive November 2012

"disp=flip" not properly displaying
43.5 × is displaying as

43.5 ×.

Nothing like this happens without "|disp=flip": 43.5 × displays as

43.5 ×.

 C üRly T üRkey  Talk Contribs 02:05, 5 November 2012 (UTC)
 * I made [//en.wikipedia.org/w/index.php?title=Template:Convert/Dual/LoffAoffDflipSoff&diff=prev&oldid=521889760 this change], which seems to have fixed it. Frietjes (talk) 21:34, 7 November 2012 (UTC)


 * It did, but it doesn't seem to play well with "|abbr=on":

43.5 ×

 C üRly T üRkey  Talk Contribs 21:42, 7 November 2012 (UTC)
 * [//en.wikipedia.org/w/index.php?title=Template%3AConvert%2FDual%2FLoffAonDflipSoff&diff=521891896&oldid=431132280 this] probably fixed it. Frietjes (talk) 21:48, 7 November 2012 (UTC)
 * That was quick! I was just about to leave a note that it didn't work in preview, but did after being saved :)  C üRly T üRkey  Talk Contribs 21:51, 7 November 2012 (UTC)

Repair needed
In Presidents' Conference Committee (Toronto LRT car) 4.3 mph/s. The output is not what is intended. Someone messed with this conversion. Peter Horn User talk 16:21, 13 November 2012 (UTC)
 * I requested a fix [//en.wikipedia.org/w/index.php?title=User_talk%3AJimp&diff=522868747&oldid=521132487 here]. Frietjes (talk) 19:21, 13 November 2012 (UTC)
 * Done. J IM ptalk·cont 08:11, 14 November 2012 (UTC) P.S. The above no longer makes sense because it's fixed. J IM ptalk·cont 08:16, 14 November 2012 (UTC)
 * Thanks. Peter Horn User talk 00:14, 16 November 2012 (UTC)

New option "abbr=~" to insert unit symbol
I have created another option as "abbr=~" (tilde) for Convert to show both the full unit name and the unit symbol for the input unit, as: 9 kPa.

The Template:Convert/LoffA~DbSoff shows a conversion for option "abbr=~" (tilde) to insert the unit-symbol abbreviation inside the bracket parentheses, as in the following examples:
 * {&#123;convert|14|cm|abbr=~}}     &rarr; 14 cm
 * {&#123;convert|67|MW|abbr=~}}     &rarr; 67 MW
 * {&#123;convert|90|km/h|abbr=~}}   &rarr; 90 km/h

The option "abbr=~" was introduced in November 2012, and has limited support with other options. There are many cases where an article needs to reuse the unit symbol later in the text, and now option "abbr=~" can show the abbreviated unit symbol as defined in the first conversion. The insertion of the unit symbol, into the bracket parentheses, is a new idea, and there might be some related issues. -Wikid77 (talk) 15:21, 9 November 2012 (UTC)


 * Will readers be making sense of this? It is, of course, less ugly than, e.g., "67 megawatts (MW) (90,000 hp)", but wouldn't that be more logical?  Seriously, when I look at "67 megawatts (MW, 90,000 hp)" my head is spinning.  Sorry but it doesn't read sense to me. I don't claim to be the judge of good grammar but there feels something askew here.  On the other hand, if it's good use will prove its worth.  But, additionally, as for editors, would this make sense in edit mode? ... I know, options are limited and you're making do, but how is this to do with   (abbreviation)? This seems more of a   (display) if anything. And what sense is "~"; how does a tilde relate to this?  Sorry to seems negative towards attempted improvements but we may be able to find a better solution. J IM ptalk·cont 08:41, 14 November 2012 (UTC)


 * Combines abbreviation with output unit: The option "abbr=~" is definitely a form of showing the unit symbol, such as with "abbr=on" showing "km/h" rather than full unit name. Note:
 * {&#123;convert|90|km/h|abbr=~}} &rarr; 90 km/h
 * So, the result is a combination, while also avoiding double parenthesis brackets "(km/h) (...)" similar to a multi2 which shows 2 results together, "60 kts". The choice of tilde ('~') is similar to a dictionary entry where '~' is an abbreviation which means to repeat the word (or phrase), but here the symbol is the "repeated" part, after the unit name. Also, by using a non-letter, the tilde can be used as an interwiki parameter option, such as in Hungarian Wikipedia (Magyar) where {convert} is a big-#switch but lacks options, where "abbr=~" could be joined with "abbr=0" to mean "off" when words such as "off" or "on" have different meanings in another language. -Wikid77 (talk) 14:16, 19 November 2012 (UTC)

Would it be feasible?
For British Rail Class 115 63 6 or 63 ft instead of 63 ft x 9 ft or 63.5 x Peter Horn User talk 23:08, 15 November 2012 (UTC)
 * Ranges of mixed input units are too complicated: The processing needed to handle ranges of 2-unit inputs has been too complex to support. However, it might be feasible some day. There has also been a need for mixed-unit ranges, such as:
 * {&#123;convert|3|in|cm|4|ft|m}} &rarr; 3 in
 * {&#123;convert|3|in|cm|x|4|ft|m}} &rarr; 3 in
 * {&#123;convert|3|in|x|4|ft|m}} &rarr; 3 in
 * Currently, Template:Convert/x is a special type of unit which expects 2 numbers (3 & 4), so parameter 2 as "in" throws an unexpected, complex variation. It is easier to just use separate conversions for each part. Most of the complex variations have been avoided, so far, but perhaps there might be some future solutions for those mixed ranges, such as a wrapper template {convert/mix}. Previously, special wrapper templates have gone mostly unused, after days of writing the specialized logic to handle unusual options, that no one else would be using. -Wikid77 (talk) 14:16, 19 November 2012 (UTC)

Remind me how
For British Rail Class 206, the conversion of 54 tons 2 cwt into tonnes and short tons. Peter Horn User talk 01:36, 24 November 2012 (UTC)
 * → 54.1 LT. Hundredweights are not available for dual conversions. -- Red rose64 (talk) 10:26, 24 November 2012 (UTC)

.300 Winchester Magnum ballistics is not displaying correctly
The .300 Winchester Magnum bullet article is showing 180 grain bullets and 190 grain bullets to be the exact same grams of 12. 190 grains is 12.3 grams. It seems to work properly for bullets of under 12 grams but above this the 1st decimal point is dropped. Can someone fix this please? I seem to remember that this same page worked and displayed the 220 grain bullet as 14.3 grams sometime 6 months ago? 97.85.168.22 (talk) 03:28, 27 November 2012 (UTC)
 * The problem is not that easy to fix. You see, 180 gr is the same as 190 gr to 2 significant figures.  If you want to increase the precision, you either have to use 180 gr and 190 gr or 180 gr and 190 gr.  Given that the problem is in Infobox firearm cartridge/Convert, I suggest you bring up the issue at Template talk:Infobox firearm cartridge.  Thanks! Plastikspork ―Œ (talk)  05:38, 27 November 2012 (UTC)


 * Just add the |sigfig=3 field to the convert template like so 190 gr = 190 gr. -Fnlayson (talk) 23:38, 27 November 2012 (UTC)

Trillion cubic feet
I'm trying to fix up a table on the page titled List of natural gas fields but I'm having trouble with the convert template.

As it stands, the code  has the output:

>>> 1,235×1012 cu ft (35,000 km3)

However, as I regularly use data from Wikipedia, I would like to see the last column of the table split into two columns—one for each unit of measure.

I changed the code to, but adding   looks like it breaks the function.

It's very possible that I am doing something wrong and the template is fine, but I cant figure it out. AdventurousSquirrel (talk) 06:35, 25 November 2012 (UTC)


 * I should mention that when the code reads, the table sort of works...


 * AdventurousSquirrel (talk) 06:38, 25 November 2012 (UTC)
 * how's that? Frietjes (talk) 22:40, 26 November 2012 (UTC)
 * Perfect! Thank you. AdventurousSquirrel (talk) 17:48, 28 November 2012 (UTC)