Jump to content

Template talk:Convert

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

This is an old revision of this page, as edited by Lightmouse (talk | contribs) at 14:41, 12 October 2011 (New option adj=pre for prefix text: I think * ''"107 free acres of land" really means * ''"107 acres of free land" A word between the number and unit looks odd to me. Similarly with "a hillside of 12 wooded acres", it's the hillside that's wooded). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

For the technical discussion of template design see Template talk:Convert/Technical

Please change default double output to default single output: "1 carat (0.20 g; 3.1 gr)" to "1 carat (0.20 g)"

The default output for carats is:

  • "1 carat (0.20 g; 3.1 gr)"

please can we change it to

  • "1 carat (0.20 g)"

Regards Lightmouse (talk) 09:41, 28 July 2011 (UTC)[reply]

Why? A. di M.plédréachtaí 12:02, 31 July 2011 (UTC)[reply]

Consider the following:

The grain value is only necessary if Americans understand neither the carat nor the gram values. Is it normal in America to say "a 160 grain sapphire ring"? Lightmouse (talk) 12:29, 31 July 2011 (UTC)[reply]

Any more comments? Lightmouse (talk) 16:35, 20 August 2011 (UTC)[reply]
I can't speak for Americans, but I don't see any reason to change the default here. I'm presuming the reason we default to two units is that none of the three unit is universally more commonly understood than the others. If for stylistic or other reasons two conversions are not appropriate in some circumstances then the default can be overridden for those pages without reducing the informativeness elsewhere. Thryduulf (talk) 21:44, 20 August 2011 (UTC)[reply]


i vote for removing the grain amount, and only showing gram. my reasoning is that people who use traditional units (carats, grains), use one unit for one purpose. they won't want to know a gem in grains, they want to know it in carats. one-unit-for-everything is the SI philosophy.Bewareircd (talk) 08:18, 29 August 2011 (UTC)[reply]

The default-default is one output only. Each case of non_default-default needs a strong case. Some, like this one, are just legacy that hasn't been challenged lately. This should be reset to the default single output unless anyone claims formats like "a large 52 carat (10 g) sapphire ring" need the value in grains. Lightmouse (talk) 13:07, 21 August 2011 (UTC)[reply]

Any further thoughts? Lightmouse (talk) 14:50, 10 September 2011 (UTC)[reply]

The default should be "a large 52 carat (10 g) sapphire ring". As far as I know, the grain value adds no value in that phrase. Can we make the change please? Lightmouse (talk) 11:54, 2 October 2011 (UTC)[reply]
Done. JIMp talk·cont 04:47, 3 October 2011 (UTC)[reply]

Thank you. Lightmouse (talk) 07:45, 3 October 2011 (UTC)[reply]

Please change US pint default output to suit majority need

  • 8 US pints (3.8 L; 6.7 imp pt)

The US pint is converted by default to ml and imp fl oz. The majority need for US pint conversion doesn't include imp fl oz. It may also be that litre is better than ml, but that's another issue. We have (or should have) a higher standard for multiple output defaults. In the few cases where the imp fl oz is needed, it can be specified. Please can the default be updated? Lightmouse (talk) 11:44, 31 July 2011 (UTC)[reply]

It should convert to litres and imperial pints, for consistency with the imperial pint which converts to litres and US pints (13 imperial pints (7 L)): in the situations where an American uses small pints, a Briton uses large pints and a continental European uses litres. A. di M. plé dréachtaí 12:01, 31 July 2011 (UTC)[reply]

You say there's 1:1 usage between Americans and British pints but the ratio is a *lot* more imbalanced. The pint commonplace in the US but legacy in the UK except for one notable exception: draught beer (bottles and cans are ml). The litre is the default unit in the UK. There's no need for Wikipedia to turn back the clock to the days of Empire and the colonies. Lightmouse (talk) 12:41, 31 July 2011 (UTC)[reply]

Don't they use (milli)litres and/or fluid ounces for bottles and cans in the US, too? Also, that “one notable exception” makes up for a sizeable fraction (if not the majority) of all the times I've ever used any unit of volume when speaking English. A. di M. plé dréachtaí 12:46, 31 July 2011 (UTC)[reply]

Yes, Americans use fluid ounces but it's the US one, not the old British Empire version. Yes, the pint of draught beer is a *notable* exception and your experience fits with that. It's great that the template permits multiple outputs by choice. But Wikipedia articles aren't dominated by beer usage. they add clutter and are only *default* as exceptions. In this case, we should reset it back to the normal convention of only a single default output. Lightmouse (talk) 13:20, 31 July 2011 (UTC)[reply]

My point is that even in American articles pints are much more likely to be beer or milk than petrol or Sprite (the latter would likely use gallons and litres/ounces respectively, instead), so converting to imperial pints seems reasonable to me. (Also, the difference between a US fluid ounce and an imperial one is quite small, so I wouldn't normally worry about that: if they are rounded to two sigfigs you can't even always see the difference (12 US fluid ounces (12 imp fl oz)) and more precise measurements than that are likely to come from technical contexts where it's unlikely they'd use ounces in the first place). A. di M. plé dréachtaí 14:34, 31 July 2011 (UTC)[reply]

As far as I can detect, the 'USpt' or 'U.S.pt' template option is only used as input in:

Article Default chosen? What was done Default imp fl oz output appropriate? imp pt output appropriate? L or ml only output appropriate?
Energy star No Chose to output in litres only No No Yes
Hypovolemia No. Chose to output in litres only No No Yes
Ink cartridge Yes No No Yes
Milk Yes No No Yes

In all cases here, the litre-only output was either chosen or would have been appropriate. It may only be four instances for this unit but it's an indication that other multi-output *defaults* are excessive. Lightmouse (talk) 11:38, 1 August 2011 (UTC)[reply]

How is the imperial pint inappropriate in Milk? According to *that same article*, in the UK “[m]ost stores stock imperial sizes: ... or a combination including both metric and imperial sizes. Glass milk bottles ... are typically pint-sized...” As for hypovolemia, I did heard about pints of blood in Ireland once (though I admit that a sample size of 1 is insufficient). (I have no idea of how dehumidifiers are rated in the UK and I didn't even know they sold printer ink in bulk, so I won't comment on the other two.) A. di M. plé dréachtaí 13:12, 1 August 2011 (UTC)[reply]

Let's look at each conversions within the article:

  • In the Milk article it has a section about *America* that says:
    • The .5 US pints (0.24 L; 0.42 imp pt) milk carton is the traditional unit as a component of school lunches, though some companies have replaced that unit size with a plastic bottle, which is also available at retail in 6 and 12-pack size.
    • It's describing an American carton of 0.5 US pint. The ml conversion as required by UK law is appropriate for British readers. The "8.3 imp fl oz" is weird and "0.42 imp pints" wouldn't be an improvement.
  • In the hypovolemia, the editor chose to convert US pints into litres. I would have done the same. British and Irish medicine uses litres to measure blood. Any mention of 'pints' is colloquial and just means an amount that could range from 400 to 600 ml. In any case, we're straying from the point - real conversions from US pints only need ml or litres.

I hope that helps Lightmouse (talk) 14:09, 1 August 2011 (UTC)[reply]

The one in hypovolemia isn't about “medicine”, it's about a f***in' film, for heaven's sake. What would be wrong with using a “colloquial” unit there? I'm not sure the movie used US pints in the first place because that's what US medicine uses, either. (And the fact that UK law “requires” millilitres doesn't, by itself, mean that they're commonly used: for that matter, the EU requires energy values in kilojoules on food labels, but I don't think I've ever heard an European use kilojoules for that unless they were compelled to. A. di M. plé dréachtaí 15:14, 2 August 2011 (UTC)[reply]

The Hypovolemia article has a litre-only conversion. We don't know what you think it should say. Please can you show us? 15:46, 3 August 2011 (UTC)

Any response? We'd like to make progress. Lightmouse (talk) 15:24, 10 August 2011 (UTC)[reply]

Any response from anyone? Lightmouse (talk) 16:34, 20 August 2011 (UTC)[reply]

Any further thoughts? Lightmouse (talk) 14:50, 10 September 2011 (UTC)[reply]

This has been fully explored. Can we make the change please? Lightmouse (talk) 11:54, 2 October 2011 (UTC)[reply]
Done. JIMp talk·cont 04:48, 3 October 2011 (UTC)[reply]

Thank you. Lightmouse (talk) 07:45, 3 October 2011 (UTC)[reply]

Convert e9m3 with abbr=off

I have a rare case of converting a "33-billion-cubic-meter" amount, but the "abbr=off" did not work with adj=on, so I hard-coded the conversion as the "1,200-billion-cubic-foot" result (in article "Economy of Israel"). As always, I hard-code the conversion when it is a rare option, to allow more weeks to fix it. The current status:

  • {{convert|33|e9m3|e9cuft|adj=on}}       → 33-billion-cubic-metre (1,200×10^9 cu ft)
  • {{convert|33|e9m3|e9cuft|abbr=off}}      → 33 billion cubic metres (1,200 billion cubic feet)
  • {{convert|33|e9m3|e9cuft|adj=on|abbr=off}} → 33-billion-cubic-metre (1,200-billion-cubic-foot)

I am still looking, in Template:Convert/LoffAnoneDbSonEng, to see why the final "cubic-foot" gets a calculation error, after correctly showing "1,200 billion". Internally, the singular {{{n}}} should be "cubic foot" but shows "{{{n}}}" by plural "cubic feet" for {{{l}}}. It is a very rare conversion, so there is no hurry to fix the problem. -Wikid77 (talk) 11:19, 17 September 2011 (UTC)[reply]

Somehow a comma was finding its way into an #expr ... JIMp talk·cont 02:15, 20 September 2011 (UTC)[reply]
That's got half the problem fixed but somehow the template seems to be forgetting adj=on by the time it gets to the output unit. JIMp talk·cont 03:27, 20 September 2011 (UTC)[reply]

Fixed. JIMp talk·cont 06:16, 20 September 2011 (UTC)[reply]

There is still some problems as {{convert|2.8|to|3.3|e12oilbbl|e9m3|abbr=off}} for Oil shale article does not work. Another problem occurred with [edit] by Lightbot. Beagel (talk) 16:05, 26 September 2011 (UTC)[reply]

I notice from your contributions you've been helping a lot with oil and gas articles. Thanks. I'm a frequent user of this template but I don't understand all permutations. I look forward to seeing what others say about these problems. Lightmouse (talk) 16:22, 26 September 2011 (UTC)[reply]

Volume divided by time

Can we have volume divided by time conversion? For example:

  • 1,000 cubic feet per year (0.90 m3/Ms)
  • 1,000 cubic feet per minute (28 m3/min)
  • 1,000 cubic metres per minute (35,000 cu ft/min)

Lightmouse (talk) 15:38, 20 September 2011 (UTC)[reply]

Cubic feet per year exists in the form of cuft/a ("a" for "annum"). I'll look into the other two. JIMp talk·cont 23:21, 20 September 2011 (UTC)[reply]
1,000 cubic feet per annum (28 m3/a)
Done. JIMp talk·cont 00:19, 21 September 2011 (UTC)[reply]

Thanks. Can you also do other unit permutations:

  • 1,000 inches per day (290 mm/ks)
  • 1,000 square kilometres per day (4.5 sq mi/ks)
  • 1,000 kilometres per day (620 mi/d)
  • 1,000 cubic centimetres per day (0.71 cu in/ks)
  • 1,000 cubic millimetres per day (0.00071 cu in/ks)
  • 1,000 cubic kilometres per day (3.5×1013 cu ft/d)
  • 1 to 1,000 cubic kilometres per day (3.5×1010 to 3.5315×1013 cu ft/d)
  • 1,000 billion US gallons per day (44,000 m3/s)
  • 1 to 1,000 US gallons per day (4.4×10−8 to 4.3813×10−5 m3/s)
  • 1 to 1,000 billion US gallons per day (44 to 43,813 m3/s)

Lightmouse (talk) 11:28, 21 September 2011 (UTC)[reply]

Also:

  • 1 to 1,000 barrels per second (9.5 to 9,539.2 m3/min)
  • 1,000 barrels per second (9,500 m3/min)
  • 1,000 barrels per minute (2.6 m3/s)
  • 1,000 barrels per hour (44 m3/ks)
  • 1,000 million barrels (160,000,000 m3)
  • 1,000 billion barrels per day (1.6×1011 m3/d)

Regards Lightmouse (talk) 14:24, 22 September 2011 (UTC)[reply]

An apparent inconsistency

Look at the following:

  • 1 million cubic feet (28×10^3 m3)
  • 1 million cubic feet (28,000 m3)

Why are the output formats different? Lightmouse (talk) 14:37, 22 September 2011 (UTC)[reply]

The formats are different because the output default for e6cuft is not m3 but e3m3 or e6m3 (depending on size). These e3, e6, e9, etc. codes serve two purposes: they either add "thousand", "million", "billion", etc. or they output engineering notation. Which of these is actually output depends on whether or not we're using the abbreviated form. When they were created what I had in mind is that it would make sense to go from e3, e6, e9, etc. to e3, e6, e9, etc. (e.g. e3cuft to e3m3). Well, it does make sense if the input and output are in the same form (with respect to abbreviation) but where they are different (as in the example above) it doesn't. I wouldn't mind if we change it but it would be good if we could have a bot go through and find any transclusions with an e3, e6, e9, etc. input plus abbr and/or disp set (to something other than the default) since abbr or disp can be used to make the output & input the same with respect to abbreviation. JIMp talk·cont 23:59, 25 September 2011 (UTC)[reply]

I'd be happy to do this by bot although I don't quite understand all the permutations. Can you provide:

  • A sample list of target units to get me started - it doesn't need to be complete. If this extends into units outside my existing bot scope, I'll need to apply for an extension. That's not a bad thing, it's just to let you know there'll be a delay before I can address those units.
  • The range of 'e'. I know it goes from 3 to 12 but I don't know if it goes lower or higher.
  • If it applies to all values of 'disp'. It's much easier to code if I simply detect the presence or absence of disp. I don't quite understand the role of 'disp' in this issue.
  • Some examples of the before and after permutations you'd like. I understand the principle of your explanation but I don't quite get how it works in detail.

Lightmouse (talk) 08:43, 26 September 2011 (UTC)[reply]

What's the difference

Between 'e6' and 'M' in the following:

  • 1 million cubic feet (28×10^3 m3)
  • 1 million barrels (160×10^3 m3)

Lightmouse (talk) 17:11, 22 September 2011 (UTC)[reply]

The difference shows up when the input is abbreviatied.
  • 1×10^6 cu ft (28×10^3 m3)
  • 1 Mbbl (160×10^3 m3)
JIMp talk·cont 00:01, 26 September 2011 (UTC)[reply]

Ah. I see. Thanks. Lightmouse (talk) 08:28, 26 September 2011 (UTC)[reply]

Possible validation of first number

Important: I think we need to validate the first number, despite the overhead, to reject a decimal comma, of the form "1,35" and require "1.35" because "1,35" is treated as "135" and quietly gives the wrong conversion:

• {{convert|1.35|m|ft}} → 1.35 metres (4.4 ft)
• {{convert|1,35|m|ft}} → 135 metres (443 ft) -- as of 7 Oct 2011

As you know, there are thousands of articles being translated from other languages where the "decimal point" is the comma, such as "4,73" meaning "4.73" and unfortunately, that gets accepted as 473 because, in recent years, we ran decomma by {FORMATNUM:|R} for readability of "20,000,000" (not 20000000). Note: these decimal commas had been rejected by Convert years ago, but then we used FORMATNUM and we did not create a "smart" {{Decomma}} to check for invalid use of commas. The overhead could be kept minimal by only validating input which contains commas:

  • {{#ifeq: z{{{1}}}|z{{FORMATNUM:{{{1}}}|R}}
         |<!--then no comma-->{{{1}}}
         |<!--else validate for commas-->{{Decomma|{{{1}}} }} }}

Then check for invalid-comma numbers, such as too short, when "55,6" or "1,35" (without commas) compares as less than 1000. That would even quickly reject "1,00.97" as invalid, rather than convert it as 100.97.

The validation by Template:Decomma would only be run on the first number, after a 2-depth-level check for commas. Due to all the interwiki translations, as well as many English-as-second-language editors, I think this might be a critical issue. In many German-based articles, the areas are given as 2-decimals, "xx,xx". The result for "1,35" (as 135) is off by a factor of 100x, not just a 5% error, but a 10,000% error in some articles. I try to focus on major issues of concern. There's no hurry on this, and we could create a temporary category (for Decomma) to log how often 1 or 2-place decimal commas are being used in Convert, to prove what size numbers are a common problem. -Wikid77 (talk) 10:34, 23 September, revised 12:55, 7 October 2011 (UTC)[reply]

I have the following comments:
  • It's a pity that we can't accept both the period and the comma as a decimal separator. Could we have an option?
  • It's common for Indians to express numbers as 1,00,000 because of they way their numbering system works. We need to be careful not to reject those as incorrect decimals.
Lightmouse (talk) 10:46, 23 September 2011 (UTC)[reply]
But how can you tell what 1.001 and 1,001 mean? Do they mean a number close to one or one thousand? Sadly, there is no way to tell in these cases and we must therefore default to the symbols used by native English speakers. Other languages Wikipedias should, of course, default to their own styles.  Stepho  talk  13:52, 23 September 2011 (UTC)[reply]
  • Limit within 4-digit numbers: If we restrict validation to comma-only numbers, I think we could also limit validation to at most 10,000, rejecting "xx,xx" or "xxx,x" or "x,xx" (etc.) by checking for "x," in 4-digit amounts or reject n < 1,000 as not valid with commas. So that would allow any large numbers, such as "1,00,000" to be valid. I favor rejecting only the troublesome amounts, and not accept "1,50" (as neither 1.50 nor 1500) but an invalid typo. Meanwhile, FORMATNUM in other-language Wikipedias removes dots "." and leaves the decimal-comma such as in "20.000.000,125". -Wikid77 14:23, 23 September 2011 (UTC)[reply]
This is a worthwhile idea. {{Decomma}} could place all those articles which have a number formatting problem into a special category. Editors could then go to these problem articles and fix them by hand. I'm afraid, Lightmouse, that I must respectfully disagree with what I read you as suggesting. We cannot and should not accept the comma as anything but a separator for positive integer powers of one thousand (when it comes to numbers, sentences are another story). "1,35" for 1+35100 is not valid in English nor is "1,00,000". This is the English WP. We should be writing in English, not German, not French, not Hindi. JIMp talk·cont 00:22, 26 September 2011 (UTC)[reply]

This change is the first (that I'm aware of) that destroys international neutrality in the template. It's easy for the dominant cultural users to take international conveniences away in many small pieces, particularly if the programmers are in that culture. It's possible to require multiple regional interfaces but it's better if a universal high-quality interface has international scope.

I'm not convinced you're correct to say 1,00,000 isn't valid in English, although it may depend on your definition of 'valid'. I think that format is used in India, Bangladesh, Nepal, and Pakistan, some of those countries have English as an official language and it's not just used by Hindi speakers. I'm not sure about cause and effect but it's consistent with the use of crore and lakh. I'm not a big fan of crore and lakh or that format but I'm trying to make sure we don't add an inconvenience. I'm more concerned about resolving the decimal separator issue. Is the convert template really only used on en.wiki? Lightmouse (talk) 08:26, 26 September 2011 (UTC)[reply]

User:Jimp wrote "This is the English WP. We should be writing in English, not German, not French, not Hindi". Which variant of English should we be using? The variant used in the SI Brochure uses spaces as 1000's separators, not commas. South Africa, where English is an offical language, the mother tongue of a sizable minority and that country's lingua franca uses commas as a decimal separator. I think that we should take note of the conventions adopted by The Times of India regarding the use of the crore and the lakh in matters pertaining to the South Asian subcontinent - after all The Times of India is the world's largest English language newspaper. Martinvl (talk) 09:49, 26 September 2011 (UTC)[reply]
If you write things in Hindi style then only Hindi readers will understand it - leaving out the rest of the world. If you write it in US or UK style then all English readers will understand it. Aim for the wider audience. Aim for it to be unambiguous.  Stepho  talk  10:04, 26 September 2011 (UTC)[reply]

What is 'Hindi style'? Lightmouse (talk) 10:19, 26 September 2011 (UTC)[reply]

I meant the 1,00,000 style that you mentioned in the context of Hindi speakers. Apologies if I got the name wrong or offended anyone.  Stepho  talk  10:50, 26 September 2011 (UTC)[reply]

The 1,00,000 style isn't related to Hindi. It's used by English speakers. Lightmouse (talk) 11:01, 26 September 2011 (UTC)[reply]

I see the template is used directly or translated into at least 16 languages. It may be used on more than one wiki within each language. I suspect translation only involves unit names. If this is an important issue, could we:
  1. reject all 1000 separators in numbers with up to 5 digits. I think that would be equally inconvenient all numbering systems.
  2. reject all 1000 separators for up to 5 digits to the left of the decimal separator
  3. reject all 1000 separators for up to 5 digits to the right of the decimal separator
  4. provide a global setting for the separators which could be configured by the translators for each wiki
Would that resolve most of the issues raised in this thread? Lightmouse (talk) 11:46, 26 September 2011 (UTC)[reply]

Sorry for the multiple consecutive posts. The threshold of five digits is an inconvenience the forbids one 1000 separator. If the threshold is three, then that inconvenience disappears. If we have a global switch for template translators to define the meaning of comma and period (which I now accept may be required), then this issue becomes easier. We only need to look for invalid locations of the period and comma. Lightmouse (talk) 12:29, 26 September 2011 (UTC)[reply]

Which varient of English should we be using? Australian, of course ... no, it depends, it's best to follow WP:ENGVAR but WP:ENGVAR says nothing specific about this issue. MOSNUM, however, does. MOSNUM recomends grouping digits by threes (or fives in certain maths contexts). MOSNUM allows commas to the left of the decimal separator or gaps both sides (the style recommended by the SI). MOSNUM allows only a dot as the decimal separator. This is the norm in almost all varieties of English. The Indian style or the continental European style is bound to confuse the majority of English speakers. We must keep in mind that we're writing for an international audience. I'm all for encouraging the use of different varieties of English but we should avoid confusion. This template may have been copied into a dozen or so other languages but it would have to have been adjusted to accomodate them. Let {{decomma}} be adjusted similarly. JIMp talk·cont 00:34, 27 September 2011 (UTC)[reply]

OK. I think you've persuaded me. I only ask that we try to keep regional settings to the minimum and in a way that makes them easy to change at point of copy/translate. I'll leave the decision to you guys. Thanks. Lightmouse (talk) 09:40, 27 September 2011 (UTC)[reply]

  • I have noticed several uses of 2-digit comma style ("10,00,000") but not in conversions, so I think editors working on articles about India would not be affected much. However, I guess we should count the frequency in a sample of such cases. Meanwhile rejecting "1,35" as invalid should not be delayed, because such numbers are incorrect by a factor of 100x. -Wikid77 (talk) 12:55, 7 October 2011 (UTC)[reply]

Experimenting with Template:Decomma

I have created a simple Template:Decomma to show the rejection of improper commas:

  • {{Decomma|1,600}} → 1600
  • {{Decomma|1,60}} → 160
  • {{Decomma|16,0}} → 160

However, when considering how other users often change templates (without prior discussion with even the people who recently edited those templates), then I think it is too dangerous for Convert to use common utility templates, and instead we should create a {Convert/decomma} which is specifically optimized for Convert and not an easy target for non-discussed "improvements". Because working on WP involves a zillion details, many people do not have time to "gain consensus" for changes, so they just change templates with no prior discussion and no post discussion to explain what all has been changed. That seems to be human nature in busy situations, so {Convert/decomma} should be controlled to avoid unneeded changes. Hence, Template:Decomma can be used to try various comma-validation tests, but do not be surprised when it is radically changed by other users, some day when having the least time for unexpected problems. The main concern, now, is to try using some specific markup to reject improper commas. -Wikid77 (talk) 12:16, 27 September 2011 (UTC)[reply]

Use of "|to|" or "|and|" in {convert|x|LT|t...}

Here are examples of conversions that give me headaches:
950 to 1,000 long tons (965 to 1,016 tonnes)
950 and 1,000 long tons (965 and 1,016 tonnes)

Using "to" or "and" in most other units I've needed it in so far, works just fine. Examples:
950 to 1,000 miles (1,529 to 1,609 kilometres)
950 and 1,000 miles (1,529 and 1,609 kilometres)
950 to 1,000 pounds (431 to 454 kilograms)
950 and 1,000 pounds (431 and 454 kilograms)

Please help! André Kritzinger (talk) 21:39, 26 September 2011 (UTC)[reply]

fixed by creating a redirect here. Frietjes (talk) 22:33, 26 September 2011 (UTC)[reply]
Perfect, thank you! André Kritzinger (talk) 23:40, 26 September 2011 (UTC)[reply]

acre foot

In the template, I see people use 'ft', 'foot', 'feet'. People using hyphens, dots, and spaces between 'acre' and 'foot'. Yet, I see two templates:

  • Template:Convert/acre.ft
  • Template:Convert/acre.foot

Do two templates cover all the permutations? If so, why can't it be just one? Lightmouse (talk) 12:41, 28 September 2011 (UTC)[reply]

Are we talking output or input?
  • If you mean what the template spits out, I don't believe we should be trying to cover all possible permutations. We should settle on what is to be used. The acre-foot is like the newton-metre and kilowatt-hour: hyphens when spelt out and dots when abbreviated ... but there is no abbreviation for the acre (and it wouldn't do to half abbreviate) so "acre-foot" (in some varieties of English, as far as I know, "foot" pluralises to "foot") and "acre-feet".
  • If you mean the template code, I notice acre-feet & the three versions with spaces all redirecting to the dot versions & all hardly used. We could dispose of them.
JIMp talk·cont 04:51, 29 September 2011 (UTC)[reply]

I was talking about the template code. We can't conclude the current permutations are evidence of what editors do. I did a bot run to eliminate all permutations apart from 'acre.ft' and 'acre.foot'. Furthermore, I've added a lot of acre feet templates over the years, so a lot of what was there may be permutations I chose. Other instances may be due to people copying formats I've used within the same page or others. I've not been consistent so it doesn't surprise me that others aren't.

I asked the question because the number of input permutations exceeds the number of templates, I'm merely curious about whether having two templates is efficient. If we can reduce complexity in the code without reducing flexibility for editors, that would be ideal.

You raise a new point that acre foot is similar to newton metre and kilowatt hour. I just looked and found article titles are inconsistent. See:

I note that editors use several template input permutations for those units too. The BIPM says "Multiplication must be indicated by a space or a half-high (centred) dot (·)"]. I note the SI unit titles are compliant with that. I'm not sure what to conclude. Lightmouse (talk) 09:16, 29 September 2011 (UTC)[reply]

A bug or a feature

Is the following a bug or some feature I don't understand?

{{Convert|-18|C}}→−18 °C (0 °F)

Thanks.—Ëzhiki (Igels Hérissonovich Ïzhakoff-Amursky) • (yo?); September 28, 2011; 15:58 (UTC)

Google converter says -18 degrees Celsius is -0.4 degrees Fahrenheit. It looks like the template is using integer precision. What do you think it should say? Lightmouse (talk) 16:02, 28 September 2011 (UTC)[reply]
I think it should say "0 °F", not "−0 °F". Normal people might have a problem with the latter :)—Ëzhiki (Igels Hérissonovich Ïzhakoff-Amursky) • (yo?); September 28, 2011; 16:10 (UTC)

Ah yes. I agree. Lightmouse (talk) 16:33, 28 September 2011 (UTC)[reply]

The problem is that the decision of whether or not the result is positive or negative is made using the unrounded number, in template:convert/LoffT. If the unrounded result is negative, this template calls template:convert/roundT1, but that template has no check to see what happens after rounding. So, one could either put in an additional check for zero after rounding in template:convert/roundT1, or one could put in an additional check for zero in template:convert/LoffT. In both cases, it looks like you are going to be increasing the complexity of the template. It might work to just nudge the value up by 0.5 where it is used in the check before branching to either template:convert/roundT0 or template:convert/roundT1, since {{rnd}} can technically handle negative numbers, but there must be a reason why we needed to branch to these two different templates? Frietjes (talk) 19:26, 28 September 2011 (UTC)[reply]
Yes, it's a bug all right. JIMp talk·cont 04:36, 29 September 2011 (UTC)[reply]
  • Some scientists think "-0" is a feature: Because the calculation is rounding a negative number, to zero, then "-0" has been interpreted by some scientists, for many years, to indicate a rounding towards zero from a negative number. Hence, it is somewhat of a feature (rather than just always a bug). Instead, a real bug is when "1,35" in a German-based article is treated as being "135" such as:
  • {{convert|1,35|m|ft}} → 135 metres (443 ft)
  • {{convert|1.35|m|ft}} → 1.35 metres (4.4 ft)
Because the result of converting "1,35" is off by a factor of 100, then it is a very real bug; however, we do not know how many times such numbers are being used in WP articles. That is why a {Convert/decomma} could categorize articles with numbers < 1,000 which have commas, as an estimate of how many articles have that bug. Hopefully, we could quickly edit to fix each of those articles. -Wikid77 (talk) 13:26, 29 September 2011 (UTC)[reply]
  • At the risk of sounding anti-elitist, Wikipedia is written for general populace, not for some scientists. Most regular people would have a real problem with seeing a negative zero—to the point of discarding the whole section which uses it as "bug-ridden"! If it could be fixed, I think it would only be an improvement. After all, in an article about some town does anyone really care that a temperature in a climate box has been rounded to zero from a negative number? This is an encyclopedia, after all, not a scientific paper.—Ëzhiki (Igels Hérissonovich Ïzhakoff-Amursky) • (yo?); October 10, 2011; 13:51 (UTC)
  • Scientists were allowed to enter the general populace over 90 years ago: At the urging of world-famous physicist Albert Einstein in 1920, scientists were finally allowed to mingle in public and have become part of the general populace (just kidding) :-). Wikipedia has been reworded, over the past years, to describe topics in article text readable by the general public but also contain extra sections oriented towards scientists, specialists, or other experts, while remaining largely readable for laymen. The term "negative zero" redirects to article "Signed zero" which has noted, for more than 4 years, how "−0" can be used to "denote a small negative number that has been rounded to zero". I have been a math tutor for many years, and I have never heard of people seeing negative zero and deciding that all the nearby information was completely erroneous. Many people are not that judgmental. It might be surprising how many people will say, "Oh, I see, a small negative temperature can be rounded as −0, so what did you think about the final score in yesterday's game?" Thank you for helping to clarify how most people have a remarkable ability to learn, and tolerate ideas commonly used by scientists. -Wikid77 (talk) 16:57, 11 October 2011 (UTC)[reply]

US fluid ounce: default should be ml only

The current default for US fluid ounce is:

  • 1 US fluid ounce (30 ml)

I added the default template to "12 ounce beers" and received the following complaint:

  • "Changing 119 12-ounce beers in 6 hours to 119 12-US-fluid-ounce (350 ml; 12 imp fl oz) beers in 6 hours is not my idea of a sane conversion"

I agree. The ml value is sufficient, even in the UK. UK and US fluid ounce values are very close. They're identical in many instances, such as this. The reasoning is similar to that used for the change we've just made to US pints. We can increase support for 'sane conversion' and eliminate an anomalous double output by changing this. Lightmouse (talk) 08:24, 3 October 2011 (UTC)[reply]

  • The phrase "12-ounce" is part of the cultural language (as in "12 ounce curls"), and with beer being a liquid, I do not see the need to specify "12-US-fluid-ounce". So, the phrase "12-ounce beer" should be kept in that context. Similarly, the phrase "40-ounce malt liquor" should be kept, or "5-gallon gas can" likewise. Otherwise, there is a sense of excess precision, such as calling a "2-liter bottle" to be a "2.0-litre bottle" or "1.90–2.10-litre bottle" or whatever the precision of contents of such bottles. In cases of ambiguity, then prefix with "US" such as a "US 5-gallon gas can" or such. These cases are probably so rare that hand-coding of conversions would be fine. -Wikid77 (talk) 23:48, 3 October 2011 (UTC)[reply]

I have no real objection to defaulting to millilitres only. Pints were changed, it would make sense for fliud ounces to follow suit.

As for the example, as I mentioned last time I ran across this conversion, the real insanity here is converting the bottle size when what we're really interested in is the amount of beer drunk. The conversion really should have been something like "119 twelve-US-fluid-ounce bottles of beer (42 L) in 6 hours". We could include gallon conversions too to make it clearer to those of us who think in gallons: "119 twelve-US-fluid-ounce bottles of beer (42 L, 11 US gal or 9 imp gal) in 6 hours".

I do, though, see Wikid's point that it's undesirable to disturb the flow by adding the clarifiers "US" and/or "fluid". Context can make these unecessary, here, for example, we're talking about beer so it must be fluid ounces. If need be we could put the US in brackets ("119 twelve-ounce (US) bottles of beer (42 L) in 6 hours") or in a footnote. JIMp talk·cont 01:56, 4 October 2011 (UTC)[reply]

OK the example is a bit of a distraction. What's the next step in making the change to ml output only? Lightmouse (talk) 17:51, 4 October 2011 (UTC)[reply]

The next step is done. JIMp talk·cont 02:01, 6 October 2011 (UTC)[reply]

Thanks. Lightmouse (talk) 09:27, 6 October 2011 (UTC)[reply]

Degrees (angle/temperature)

{{convert|100|F|C}} generates "100 °F (38 °C)". As WP:MOS#Units of measurement (4th bullet from the end) states: "Units of degrees, minutes and seconds for angles and coordinates, and the percent sign, are unspaced.", please could it be changed to generate "100°F (38°C)"? --Stfg (talk) 17:58, 5 October 2011 (UTC)[reply]

This guideline applies to degrees of angle not temperature. Read it again "Units of degrees, minutes and seconds for angles and coordinates," (emphasis WP:MOS's but do note it well). For further detail see WP:MOSNUM#Unit symbols.
  • Values and unit symbols are separated by a non-breaking space. The {{nowrap}} template or the &nbsp; character can be used for this purpose. For example, use 10 m or 29 kg, not 10m or 29kg.
    • Exceptions: Non-alphabetic symbols for degrees, minutes and seconds for angles and coordinates and the percent sign are unspaced (for example, 5° 24′ 21.12″ N for coordinates, 90° for an angle, 47% for a percentage, but 18 °C for a temperature). See also Manual of Style—Geographical Coordinates.
Note the "but 18 °C for a temperature". Thank you nonetheless for your concern. JIMp talk·cont 01:59, 6 October 2011 (UTC)[reply]
Thanks for taking the time, and apologies for my oversight. --Stfg (talk) 08:33, 6 October 2011 (UTC)[reply]

No worries. Perhaps we've uncovered a lack of clarity in the guidance. I wonder whether we should bring it up at WT:MOS. JIMp talk·cont 23:14, 6 October 2011 (UTC)[reply]

US pint and quart: default should be single output

Current defaults are:

  • 1 US dry pint (550 ml)
  • 1 US quart (950 ml)
  • 1 US dry quart (1,100 ml)

Please can we make those single output to match the others? Lightmouse (talk) 09:38, 6 October 2011 (UTC)[reply]

What's good for the goose is good for the gander ... how about these ducks though ...
  • 1 imperial fluid ounce (28 ml; 0.96 US fl oz)
  • 1 imperial quart (1,100 ml; 38 US fl oz)
  • 1 imperial pint (0.57 L)
  • 1 imperial gallon (4.5 L; 1.2 US gal)
... or even these swans?
  • 1 millilitre (0.035 imp fl oz; 0.034 US fl oz)
  • 1 litre (0.22 imp gal; 0.26 US gal)
  • 1 kilolitre (35 cu ft)
JIMp talk·cont 23:19, 6 October 2011 (UTC)[reply]

Fair points. But (to change the metaphor) my last attempt at listing all dead trees in the wood ended up with no dead trees being removed. Can we cut the three dead trees on the edge of the wood first? Thus USdrypt, USqt, and USdryqt. Lightmouse (talk) 16:58, 8 October 2011 (UTC)[reply]

Dynamic conversion

Copied from by talk page: begin
I question the benefit of using {{convert}} to do dynamic conversion of (e.g.) km to miles (as you have done in various articles), especially where the equvialent has already been provided. Such conversions need to be done only once, not every time an article is generated. And if an editor feels a "round" number is appropriate then you should not be unilaterally replacing it without prior discussion. – J. Johnson (JJ) (talk) 22:38, 4 October 2011 (UTC)[reply]

Thanks for contacting me. I welcome feedback. Just on the technical side of things, can you clarify what you mean by:
  • "conversions need to be done only once, not every time an article is generated"
? Lightmouse (talk) 22:43, 4 October 2011 (UTC)[reply]

...the dynamic conversion is where the conversion is calculated everytime the article text is rendered for someone. As opposed to an editor -- or even a bot -- calculating the conversion once and inserting it into the article text. Dynamic calculations are useful where something is frequently changing, but although it is suspected that the kilogram bar is gaining weight it is not at a rate we need to be concerned about. _ J. Johnson (JJ) (talk) 21:29, 7 October 2011 (UTC) Copied from by talk page: end[reply]

It's an important question that deserves an answer. I know benefits but not cost. So I can't do a cost-benefit analysis. Please can somebody answer user:johnson? Lightmouse (talk) 15:51, 8 October 2011 (UTC)[reply]
IIRC, it's not exactly a dynamic conversion; internally, it's only redone when {{convert}} (or a subtemplate) is edited, and when the article is edited or purged. There are internal storage costs, but I think we've been directed by the developers not to consider those, unless we're hitting the maximum template expansion count in the article. In some cases, it's been strongly suggested that we substitute citation templates, because of that problem. — Arthur Rubin (talk) 16:11, 8 October 2011 (UTC)[reply]
I'll let Lightmouse talk about the benefits in more detail Although I believe his bots and semi-automated edits sometimes make serious mistakes, if the {{convert}} template is properly in place, it's much easier to maintain if the numbers do change or are corrected; and it shortens the editable article text. — Arthur Rubin (talk) 16:15, 8 October 2011 (UTC)[reply]
And how often do we expect the km/mile conversion to change? _ J. Johnson (JJ) (talk) 19:55, 8 October 2011 (UTC)[reply]
And how often do we expect someone to edit "1.5 km (0.9 mi)" and change "1.5" to "1.6", without changing the "0.9" to "1.0"? — Arthur Rubin (talk) 00:27, 9 October 2011 (UTC)[reply]
I prefer the use of 'convert' over manual conversions because I can trust it. If I see an instance of 'convert' then I know that I don't have to check its arithemetic (except perhaps to explicitly make the rounding factor to a certain number of digits). Whereas manual conversions often have mistakes. Also, many articles have mixes of miles first of km first. By adding 'disp=flip' to some of them I can make them consistent while keeping the input value true to the source reference.
  • Convert km/miles is actually lightning fast: I am a computer scientist and have developed or used text-formatting systems for decades. I cannot emphasize enough how quickly the conversion of km/miles actually runs these days (even though it can seem overly complex). I think speed analysis will show how using Convert is over 1000x (one thousand times) faster than formatting references by {{Cite web}} or {{Cite book}}, but those cite templates are widely used. Also, I have no objection to hand-coding some conversions, such as "80&nbsp;kilometers (50&nbsp;mi)" especially near the top of an article, but we really have seen several people change one amount and not hand-convert the equivalent unit. Of course, we try not to gunnysack the mistakes made by users, so we just remember that general users might change a speed limit of 50 to "70 mph" leaving "80&nbsp;km/h" rather than 70 miles per hour (110 km/h). As for rounding of amounts, we have discussed the rounding for years, and searching into articles will confirm that most people put whole hundreds when they mean "approximately 200" or "nearly 400" and it is rare when an amount is exactly 300, so feel free to put "300.0" (or round "300|0") to force the precision in those rare cases. Anyway, most of us share the same concerns, so rest assured that we also worry to avoid similar problems in writing and rendering of article pages. Meanwhile, over 80% of articles do not show any conversions, which can be viewed as "very wrong" for users who do understand amounts in only kilometres or miles. Every time you edit an article to update facts or fix grammar, look to also convert amounts that others might not understand. -Wikid77 (talk) 23:04, 9 October 2011 (UTC)[reply]
I think you missed my point. If a process takes any time to do (distinct from having negative speed, where it would take less time than not doing it all), it usually takes more time to repeat the operation than do it once and store the result.
Arthur says it is easier from the editor's point of view to use {{convert}}. Which is largely true, but why does it have to be embedded in the article? How about a converter tool available in the editor? Or at elast a link to such a tool? Or if you want to get real fancy, a function where you can highlight a conversion, click on a "check" (verify) button, and then (at the editor's discretion) a "replace" button? I can think of several alternatives, all of which are more efficient in speed, storage, and editor convenience than converting repeatedly. _ J. Johnson (JJ) (talk) 19:35, 10 October 2011 (UTC)[reply]
You can check with the developers, but I believe the result is stored; only reset when this template or a used subtemplate is edited. Hence there's only a small marginal cost, as opposed to the effort required to maintain two or more units. — Arthur Rubin (talk) 20:09, 10 October 2011 (UTC)[reply]
Taking any time is a bad metric. The real question is whether it takes significant time - ie does it adversely affect the reader or the server. Wikid77 has already said that it takes negligible time, so removing the use of convert for efficiency reasons is a gain that nobody will even notice.
As for your suggestion to embed the final result (ie not dynamic), this is indistinguishable from a manual conversion by an editor. If I see a manual conversion I can not automatically assume that it is correct because editors often make mistakes. As mentioned above, some editors will change the first figure but not change the second. Or they make a mistake in the conversion formula. Or they simple make a typo. Whereas 'convert' can be trusted because once the formula is worked out correctly it will continue to work correctly. And editors only have to change a single number, leaving 'convert' to correctly adjust the remaining number(s).
Also, source references are sometimes in one unit (eg km) and sometimes in the other unit (eg miles). If we find and error like '50 miles (90 km)' in the article then we don't know if the source was 50 miles or 90 km unless we go through the tedious process of following the source. By using 'convert', we only need the single value from the source and then we choose which unit is displayed first by insert '|disp=flip' or not. This is also handy when it is decided to swap the order, instead of doing tedious and error prone manual swapping of the unit order.
In short, 'convert' has no significant impact on timing and has a lot of advantages.  Stepho  talk  03:15, 11 October 2011 (UTC)[reply]
  • Years of discussions have supported Convert: I was a computer-lab tutor as an undergrad, and you would be surprised the number of college sophomores who cannot use a computer to solve a partial differential equation within 3 minutes (just kidding). Bear in mind how the case of converting km/miles is just one example, among hundreds of different conversions. We had a highly intelligent developer who thought that Convert could be replaced by a built-in internal parser function to spit out "161" as kilometers for 100 miles (or hundreds of other units), until he realized that complex formatting of the results was also wanted by editors, such as numbers spelled out as words:
Then, there are people who want to convert huge numbers of kilometres into astronomical units, not just miles, and so the variations become almost unlimited, but Convert handles some very extreme cases, such as gaps instead of commas:
Consequently, over the years, when hundreds of issues have been considered, we have recommended to continue using Convert, and avoid any attempts to create built-in functions, or converter tools, which typically focus on only a tiny subset of the issues which have been raised over the past several years. For experimenting with converter tools, then users could try using Google Search conversions, such as "51 km in mi" to give "51 kilometers = 31.6899308 mi" but then much discussion can occur when people want to type precisely "31.6899308 miles" as the result in an article. Hence, considering all the viewpoints, over the years, the decision has been to continue using Convert, for overall convenience. -Wikid77 (talk) 05:47, 11 October 2011 (UTC)[reply]

Density

I notice there is a section on population denisty but I couldn't see if the convert template worked for the density of materials

I saw triton (on the main page) and it has this chunk density (2.061 g/cm3), which I tried to convert to {{convert|2.061|g/cm3|lb/in3)}

I'm not sure I applied the template correctly but if not can you explain how to get that in the documentation, and if I did get it correct then it appears not to be supported. I'll watchlist this page for a while Cheers EdwardLane (talk) 21:34, 8 October 2011 (UTC)[reply]

Is "{{convert|2.061|g/cm3|lb/in3)}" what you actually typed or was using a round bracket instead of a curly one done here on purpose. Otherwise it's fine & would give you "2.061 grams per cubic centimetre (0.0745 lb/cu in)". JIMp talk·cont 23:07, 8 October 2011 (UTC)[reply]
Dare I say 'doh' - thanks Jimp, the preview of tha page didn't flag up the erroneus bracket EdwardLane (talk) 15:32, 9 October 2011 (UTC)[reply]

Gill, US quart, US pint, US peck

Lower case 'us' in template:

  • 1 gill (120 ml; 4.2 imp fl oz)
  • 1 US pint (0.47 L; 0.83 imp pt)
  • 1 US dry pint (550 ml)
  • 1 US quart (950 ml)
  • 1 US dry quart (1,100 ml)
  • 1 US peck (8.8 L; 1.9 imp gal)


Upper case 'US' in template:

  • 1 gill (120 ml; 4.2 imp fl oz)
  • 1 US pint (0.47 L; 0.83 imp pt)
  • 1 US dry pint (550 ml)
  • 1 US quart (950 ml)
  • 1 US dry quart (1,100 ml)
  • 1 US peck (8.8 L; 1.9 imp gal)


Dotted upper case 'U.S.' in template:

  • 1 gill (120 ml; 4.2 imp fl oz)
  • 1 U.S. pint (0.47 L; 0.83 imp pt)
  • 1 U.S. dry pint (550 ml)
  • 1 U.S. quart (0.95 L; 0.83 imp qt)
  • 1 U.S. dry quart (1,100 ml)
  • 1 U.S. peck (8.8 L; 1.9 imp gal)


Full spelling in template:

  • 1 US quart (950 ml; 33 imp fl oz)
  • 1 US dry quart (1,100 ml)

Wouldn't it be more efficient to use redirects rather than one template for each code option? Anyway, please can they all be set to single default output. Lightmouse (talk) 15:00, 10 October 2011 (UTC)[reply]

  • Those are 3 different styles of display, where unit-codes (such as "usqt") with the lower-case "us" will allow changing the spelling by "sp=us":
• {{convert|1|usqt|sp=us}} → 1 U.S. quart (950 ml)
• {{convert|1|usqt|sp=en}} → 1 US quart (950 ml)*
• {{convert|1|USqt|sp=us}} → 1 U.S. quart (950 ml)
• {{convert|1|U.S.qt|sp=en}} → 1 U.S. quart (0.95 L; 0.83 imp qt)*
Note how the uppercase unit-codes (with "US" or "U.S.") always force the spelling to match the unit-code and ignore "sp=xx". For that reason, the 3 styles ("us" or "US" or "U.S.") were developed as fully separate templates which do not use redirection. However, all of the upper-case "US" unit-codes could be redirected to the lower-case "us" unit-codes, because the default results use the same capital letters, in showing "1 US". On the other hand, the lower-case "us" unit-codes could be kept separate to list 2 default outputs for each amount. As always, this is part of the 20,000 issues to consider in modifying Convert, and we should prioritize which among the 20,000 issues to change first. -Wikid77 (talk) 09:01, 11 October 2011 (UTC)[reply]

Aha. Thanks for explaining the 'force spelling' issue. Where you say:

  • "all of the upper-case "US" unit-codes could be redirected to the lower-case "us" unit-codes

that seems like a good idea. I know you guys are spinning lots of plates and I appreciate it. I hope Jimp will be along shortly to comment on this section too. Lightmouse (talk) 11:10, 11 October 2011 (UTC)[reply]

Note that the "US" in the US gills is missing because the subtemplate is currently part of an experiment. JIMp talk·cont 00:31, 12 October 2011 (UTC)[reply]
There are two ways of getting "US" and two ways of getting "U.S.":
  • For "U.S." use U.S.gal, U.S.pt, U.S.oz etc. or use usgal, uspt, usoz with sp=us.
  • For "US" use USgal, USpt, USoz etc. or use usgal, uspt, usoz with sp set to anything else (or nothing at all).
Is this an overkill? Probably. Do we need two ways of choosing between dots and no dots? Probably not. Are users in general even aware of this? I really doubt it.
I'd be quite happy to forget about this option & disconnect the dotting from sp altogether. JIMp talk·cont 02:46, 12 October 2011 (UTC)[reply]

Templates that duplicate the convert template

I've just seen 'Category:Geobox unit'. It looks to me like at least some of those templates duplicate the functions within the convert template. Is that true? Lightmouse (talk) 17:28, 11 October 2011 (UTC)[reply]

These should be all "subtemplates" of {{geobox}}, so they should not be called directly. If I recall, {{infobox settlement}} has a similar set of subtemplates, but it's more explicit, since they use a "/" to show that they are subtemplates (e.g., template:infobox_settlement/lengthdisp). One issue is the "expression depth" problem with this template, which is one of the reasons they still exist. There is also template:infobox islands/length and probably many many more of these. Frietjes (talk) 17:36, 11 October 2011 (UTC)[reply]

Subtemplate request

Could one of you template wizards create Template:Convert/LoffAoffDbSmidNa which seems to be needed to allow the speedy repair of several hundred of Lightbot's recent edits similar to this, please? At least if I amend the Convert template in that edit to append |adj=mid|free (per Template:Convert#Parameters), that's the redlink I see when previewing. This section from the 2010 Tech archive is obviously relevant, and there's a bit of surrounding detail at User_talk:Lightmouse#Which_is_right.3F (from the bullet "But much more dramatic"). Thanks in anticipation!  —SMALLJIM  23:21, 11 October 2011 (UTC)[reply]

I redirected it to Template:Convert/LoffAoffDbSmid in the same way that Template:Convert/LoffAoffNa is a redirect, but I don't think this is going to give you what you had before Lightbot's edit, since the "free" will come after the "acre", not before it. Frietjes (talk) 23:37, 11 October 2011 (UTC)[reply]
I speak English very good, no? :) Ah well, many thanks for the quick reply - I think it may help with some of the edits, and I'm glad it was a simple fix, at least. I don't suppose there's any way Convert can be made to change "107 free acres of land" to "107 free acres (0.43 km2) of land", is there?  —SMALLJIM  00:05, 12 October 2011 (UTC)[reply]
Pure magic. Have a nebula :)  —SMALLJIM  11:38, 12 October 2011 (UTC)[reply]

New option adj=pre for prefix text

I have created subtemplates to allow adj=pre to specify the prefix text before the first unit name:

  • {{convert|4.0|m|ft|adj=pre|exact}} → 4.0 exact metres (13.1 ft)
  • {{convert|1|mi|km|adj=pre|statute}} → 1 statute mile (1.6 km)
  • {{convert|155|acre|m2|adj=pre|free}} → 155 free acres (630,000 m2)
  • {{convert|107|acre|km2|adj=pre|free}} → 107 free acres (0.43 km2)
  • {{convert|107|acre|km2|adj=pre|[[green space|green-space]]}} → 107 green-space acres (0.43 km2)

This option should have been created years ago, but there has been a tendency to avoid new features because there are so many subtemplates. However, I think it would be unfair to deny new features to users, at this point, and we can find ways to simplify the subtemplates in the future, as a separate concern. -Wikid77 11:01, revised 11:12, 12 October 2011 (UTC)[reply]

I think

  • "107 free acres of land"

really means

  • "107 acres of free land"

A word between the number and unit looks odd to me. Similarly with "a hillside of 12 wooded acres", it's the hillside that's wooded, not the acres. Some cases use words that add little value e.g. "the lake is 2 surface square miles", "the length increased by 20 additional feet".

I've done a lot of edits by hand to move or rephrase the sentence prior to adding a conversion. With automation-assisted editing, there's a few things that can be done to recast sentences and perhaps I'll investigate this issue further. But the above option will avoid the need to recast the sentence at the same time as adding the conversion. As user:smalljim says, thank you very much. Lightmouse (talk) 14:40, 12 October 2011 (UTC)[reply]