Hi Dr.Best ,
There is an error in WeatherPlugin (MSNWeather.py) where a not that much used local language within Norway is set as standard weather language for Norway. Could this be fixed?
old code:
should be:
Thanks!
Hi Dr.Best ,
There is an error in WeatherPlugin (MSNWeather.py) where a not that much used local language within Norway is set as standard weather language for Norway. Could this be fixed?
old code:
should be:
Thanks!
Well, I can see why there was a # hack in the code. It turns out that the time format for Norwegian standard language is unusual compared to every other language. Norwegian standard language (nb-NO) have timeformat '%H.%M.%S' and the all other countries is '%H:%M:%S'. There must be som bug from MSN Weather forecast regarding Norway. This will unfortunately require another hack in plugin.py
something like this:
language = config.osd.language.value.replace("_","-")
if language == "no-NO": # hack
c = time.strptime(item.observationtime, "%H.%M.%S")
else:
c = time.strptime(item.observationtime, "%H:%M:%S")
And there is som Norwegian hack in the setup.py file also that should be corrected.
from this:
to this:
You are aware that you can change that by yourself? Just change the code on github and open a Pull request to the main repository (https://github.com/opendreambo…/master/weatherplugin/src).
You are aware that you can change that by yourself?
No, not aware of that! Thanks for the information. Will se into that. This hack is also for english language, so the fix seagen is proposing should be the best one.