Friday, March 06, 2009

Unit conversion in 4.3


I wanted to use conversion code outside runner so now all conversion code is in a library. It also has few new categories: currency, energy, fuel efficiency, power, pressure and time.

Unit Converter Runner

Converter runner now shows all conversions that text matches.

Unit Converter Widget

I got permission from Gerhard (original author of unit converter widget) to convert widget to use same library converter runner uses. Now widget has same categories and units runner has.

Some people have complained that there is no way to know what units Unit Converter Runner supports. Hopefully these changes to runner and widget help also on that.

Hmmm, no wonder my head hurts...


Anonymous Christoph Bartoschek said...

In your last screenshot the label is not aligned to the combobox. Is this the default configuration or just a misconfiguration?

Blogger Damu said...

Alignment now fixed in SVN.

Blogger CD1 said...

is there any documentation to the syntax of the conversion string? the symbol ">" isn't very intuitive to me.

Anonymous Anonymous said...

I’m a die-hard British metric user, but seeing conversions like this make me twinge: eugh, decimal feet, such a bastardisation of Imperial units.
3 feet 3 inches is the actual answer.

Blogger tmafcerqueira said...

This comment has been removed by the author.

Blogger tmafcerqueira said...

Hey there,
I did something like this a few years back, in C. I don't know if you've finished or not, but if you aren't check out this forum:,7781.0.html
My code might be able to fasten the process. If it is indeed helpful, let me know and I'll translate the comments.
It's a portuguese forum, but you should be able to find the code right away...

Anonymous Anonymous said...

ugh, it's "litre"

Blogger André said...

@anonymous: wouldn't that depend on whether you were using US or UK English?

Anonymous Anonymous said...

André: No, but do read on:

It’s not as clear as people always assume.

British English, which is the basis for the majority of English-derivatives around the world, uses litre. That would include the UK, Australia, Canada, India, various African countries, and more from the Commonwealth.
Liter is used in America, and a few of their colonies.

The only locale that should output ‘liter’ in English is _US. So try to avoid thinking it’s just a US/UK issue.

There are European languages that use liter in their native spelling, but we can ignore that for this argument.

Anonymous Anonymous said...

I find it rather ironic that the US, despite not using metric, feels it has to impose its (mis-)spellings of metre and litre on the rest of the world.

The talk page on Wikipedia article for metres is a prime example of this.

We have SI units for a reason, so everyone uses the same standards. Why anyone has to break them is beyond me, especially a country which still uses imperial.


Post a Comment

<< Home