ThingPulse / espaper-weatherstation

WeatherStation for the 2.9" ESPaper modules
https://thingpulse.com/product-category/espaper-epaper-kits/
MIT License
90 stars 46 forks source link

Application fetches data in french but displays in english #14

Closed faquin closed 6 years ago

faquin commented 6 years ago

8<------------------------ BUG REPORT -----------------------------------------

Expected behavior

I setup french in settings.h. I expected to have the data from openweather in French on my screen.

Actual behavior

Data is written in english. The application fetches the data from http://api.openweathermap.org/data/2.5/weather?q=Aureilhan,%20FR&appid=0501############&units=metric&lang=fr When I open it in my laptop, I can see: "weather":[{"id":801,"main":"Clouds","description":"peu nuageux","icon":"02n"}], Instead of showing "peu nuageux", the display shows "Clouds"

Test code

ESPaper Weather Station version

Main branch, latest version downloaded tonight

Hardware

ThingPulse ESPaper Weather Station kit

8<------------------------ END BUG REPORT -------------------------------------

marcelstoer commented 6 years ago

At https://openweathermap.org/current#multi OWM clearly documented that

Translation is only applied for the "description" field.

Yet, at https://github.com/ThingPulse/espaper-weatherstation/blob/master/espaper-weatherstation.ino#L290 we're using main instead of description. Good catch!