Jump to content

Template talk:Convert/Archive November 2012

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


"disp=flip" not properly displaying

{{convert|43.5|×|31|cm|in|0|disp=flip}} is displaying as

 17 by 12 inches (43.5 cm × 31 cm).

Nothing like this happens without "|disp=flip": {{convert|43.5|×|31|cm|in|0}} displays as

 43.5 by 31 centimetres (17 in × 12 in).

CüRlyTüRkeyTalkContribs 02:05, 5 November 2012 (UTC)

I made 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":
 17 in × 12 in (43.5 cm × 31 cm)

CüRlyTüRkeyTalkContribs 21:42, 7 November 2012 (UTC)

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üRlyTüRkeyTalkContribs 21:51, 7 November 2012 (UTC)

Repair needed

In Presidents' Conference Committee (Toronto LRT car) 4.3 mph/s (6.9 km/(h⋅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 here. Frietjes (talk) 19:21, 13 November 2012 (UTC)
Done. JIMp talk·cont 08:11, 14 November 2012 (UTC) P.S. The above no longer makes sense because it's fixed. JIMp talk·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 kilopascals [kPa] (1.3 psi).

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:

  • {{convert|14|cm|abbr=~}}       → 14 centimetres [cm] (5.5 in)
  • {{convert|67|MW|abbr=~}}       → 67 megawatts [MW] (90,000 hp)
  • {{convert|90|km/h|abbr=~}}     → 90 kilometres per hour [km/h] (56 mph)

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 abbr (abbreviation)? This seems more of a disp (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. JIMp talk·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:
  • {{convert|90|km/h|abbr=~}} → 90 kilometres per hour [km/h] (56 mph)
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[convert: unknown unit]". 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#Technical details 63 6[convert: unknown unit] or 63 ft 6 in ([convert: unknown unit])* instead of 63 ft 6 in (19.35 m) x 9 feet 3 inches (2.82 m)* or 63.5 ft × 9.25 ft (19.35 m × 2.82 m) 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:
  • {{convert|3|in|cm|4|ft|m}} → 3 inches (7.6200 cm)*
  • {{convert|3|in|cm|x|4|ft|m}} → 3 inches (7.6 cm)*
  • {{convert|3|in|x|4|ft|m}} → 3 inches ([convert: unknown unit])*
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)

.300 Winchester Magnum ballistics is not displaying correctly

The .300 Winchester Magnum bullet[1] 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 (12 g) is the same as 190 gr (12 g) to 2 significant figures. If you want to increase the precision, you either have to use 180 gr (11.7 g) and 190 gr (12.3 g) or 180 gr (11.7 g) and 190 gr (12.3 g). 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 {{convert|190|gr|g|abbr=on|sigfig=3}} = 190 gr (12.3 g). -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 {{convert|1235|Tcuft|km3|abbr=on}} has the output:

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

Field name Country Recoverable reserves
1 South Pars/North Dome  Iran and  Qatar 1,235×10^12 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 {{convert|1235|Tcuft|km3|abbr=on|disp=table}}, but adding disp=table looks like it breaks the function Tcuft.

Field name Country Recoverable reserves
1 South Pars/North Dome  Iran and  Qatar 1,235×10^12 cu ft 35,000 km3

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 {{convert|1235e12|cuft|km3|abbr=on|disp=table}}, the table sort of works...
Field name Country Recoverable reserves
1 South Pars/North Dome  Iran and  Qatar 1,235×1012 cu ft 3.50×104 km3
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)