betty icon indicating copy to clipboard operation
betty copied to clipboard

Make Metric/Imperial System configurable

Open WhyNotHugo opened this issue 10 years ago • 6 comments

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.

WhyNotHugo avatar May 22 '14 08:05 WhyNotHugo

add &locale=... parameter to web query

pannous avatar May 22 '14 09:05 pannous

or ask explicitly: how is the london weather in celsius

pannous avatar May 22 '14 09:05 pannous

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.

WhyNotHugo avatar May 22 '14 09:05 WhyNotHugo

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 avatar May 22 '14 10:05 pannous

or via require 'locale' Locale.current

pannous avatar May 22 '14 10:05 pannous

Yes please.

Tamsyn avatar Nov 22 '16 09:11 Tamsyn