pickhardt / betty

Friendly English-like interface for your command line. Don't remember a command? Ask Betty.
2.62k stars 215 forks source link

Make Metric/Imperial System configurable #109

Open WhyNotHugo opened 10 years ago

WhyNotHugo commented 10 years ago

As it is right now, betty uses the imperial system by default (for things like, say, the weather).

This makes these answers understandable for only three countries in the world, while people from the other 193 will just stare confused, being unable to interpret these results. Since betty can't convert between units either (#89), this make these results even more useless.

Betty should have an option to use the SI, or, at the very least, use it by default.

pannous commented 10 years ago

add &locale=... parameter to web query

pannous commented 10 years ago

or ask explicitly: how is the london weather in celsius

WhyNotHugo commented 10 years ago

add &locale=... parameter to web query

Where exactly do I add this param? /etc/betty/bettyconfig ?

Also, having something like betty use locale ___ would be useful, in any case.

pannous commented 10 years ago

sounds good. and then use it like this:

  path = "/api?"
  path += "input=#{ encoded }"
  path += "&locale=" + BettyConfig.get("locale") || ENV["LANG"]

(in main.rb .. def web_query )

pannous commented 10 years ago

or via require 'locale' Locale.current

Tamsyn commented 7 years ago

Yes please.