blackadderkate / weather-widget-2

Updated version of Weather Widget by Kotelnik
GNU General Public License v2.0
106 stars 22 forks source link

First-run "default" units should be based on System Locale #32

Open blackadderkate opened 2 years ago

blackadderkate commented 2 years ago

It would be nice to select "sensible" default units for the user after installation. So UK users would have mph/Centigrade, US would have mph/Farenheight, Europe has mm/Centigrade etc.

Qt has a property called Locale.measurementSystem which would be able to set those units. I need to read the QT Documentation on Configuration Files, to see how we can detect whether the widget is being run for the first time, as we only want to set these defaults when first-run.

solbu commented 2 years ago

Just a note about units. In Norway, Sweden, Finland, Denmark (which includes Greenland and the Faroe Islands) and Iceland we don't measure wind speed in kilometer per hour (km/h), but in meter per second (m/s).

blackadderkate commented 2 years ago

Just a note about units. In Norway, Sweden, Finland, Denmark (which includes Greenland and the Faroe Islands) and Iceland we don't measure wind speed in kilometer per hour (km/h), but in meter per second (m/s).

Locale.measurementSystem only has three settings: US imperial, UK imperial, and metric. So what I set has to be the default for every metric-using country... I'll investigate whether I should make m/s the default for all metric locations, but I'm not going to start coding this on a country-by-country basis as it's not worth the effort involved for such a minor feature...

pickfire commented 2 years ago

Shouldn't it default to metric?