Template talk:Convert/Archive June 2012

Clarification needed
When I do 20 - 35 km, it results in "20 - 35 km". Shouldn't the part in parentheses also display with a dash (i.e., "(12–22-mi)")? Is that a bug or a feature? Thanks.—Ëzhiki (Igels Hérissonovich Ïzhakoff-Amursky) • (yo?); June 6, 2012; 14:18 (UTC)
 * It is a feature which matches formal English usage: The omission of the adjective hyphen "-" with unit-symbol names (such as "3 mi funrun") is a quirk of formal English-language punctuation idioms. Logically, it would be more readable as a "500-ft descent" but perhaps the reasoning is that a unit symbol always connects to the prior number (with no hyphen needed to connect them), so in written text, the hyphen is almost always omitted with an adjective symbol, and we commonly see "9 mm handgun" (rarely "9-mm"). If Convert inserted the hyphen with unit-symbol adjectives, then some users would complain that Convert displayed "non-standard" English punctuation to force the hyphen. As a positive note, consider Convert's generated output to be the "formally correct" manner for displaying conversions with adjectives and unit symbols. -Wikid77 (talk) 11:20, 9 June 2012 (UTC)
 * Ah, didn't know that. Thanks for the response and a detailed explanation!—Ëzhiki (Igels Hérissonovich Ïzhakoff-Amursky) • (yo?); June 9, 2012; 15:27 (UTC)

Plural Units when less than 1
Hi-

Right now, if I 1/2 mi I get 1/2 mi. It would be nice when using fractions (not decimals) {>0, <= 1} to optionally suppress the plural. Right now, the only way I can see to do that is with abbr=on. Thanks. And after that, I'd like to one-half mi and get "one-half mile (0.08 km)" &#9786;  JMOprof (talk) 18:50, 11 June 2012 (UTC)
 * Options already available: Several other people have asked for similar options, so we have "adj=1" and {convert/spell} to show words:
 * Originally:  {&#123;convert|1/2|mi|km}}      &rarr; 1/2 mi
 * Non-plural: {&#123;convert|1/2|mi|km|adj=1}} &rarr; 1/2 mi
 * Spellings: {&#123;convert/spell |1/2|mi|km}} &rarr; 1/2 mi
 * See: Help:Convert for other options. Due to the complexity, spellings are based on numeral inputs ("320"), and there are no plans to support the words; however, Google Search can do it, see: "Google for three hundred twenty miles". So, perhaps some day... -Wikid77 07:03, 13 June 2012 (UTC)
 * Wow! Thanks. That's perfect.  Nice to know stuff.  JMOprof (talk) 14:05, 13 June 2012 (UTC)

Wonky miles per gallon
15 to 32 mpgus is giving me: "15 to 32 mpgus", which has " " instead of the initial units. If we were only converting one rating, à la 15 mpgus, it properly outputs "15 mpgus". Can someone take a look at this? Thanks,  Imzadi 1979  →   10:54, 20 June 2012 (UTC)
 * Use Convert/2 for non-supported ranges: Use {convert/2} or hand-code the conversion in the text. There are several units, among the current hundreds, which do not work in typical 2-number ranges. Instead, use Template:Convert/2 (which has almost no restrictions on unit ranges), but output as "l/100 km" (not both "l/100 km mpgimp"):
 * {&#123;convert/2 |15|to|32|mpgus|l/100 km}} &rarr;
 * {&#123;convert/2 |15|to|32|mpgus|l/100 km mpgimp}} &rarr;
 * There are so many thousands of options with ranges, I have forgotten why the parameter for unit name,, is not defined for those inverse mpgus units. It seems as though it would be easy to fix, but perhaps not, because the input is a mixed unit, of "miles" per "gallon". -Wikid77 (talk) 14:28, 20 June 2012 (UTC)

Re:
Template gives output in kilometres. Should be square kilometres.


 * I'm not quite sure what you mean but if you're looking for the square-kilometre subtemplate it's convert/km2. J IM ptalk·cont 23:01, 5 June 2012 (UTC)