Back when I looked a the new features of Mac OS X.4, I took a good look at the Dashboard and was disappointed by its lack of proper localisation. This was particularly evident in the Weather widget which not only has the annoying habit of preferring small U.S. towns which nicked the names of their European ancestors when you enter them – and giving very little feedback about it. It also gives you Fahrenheit temperatures for every new widget you open.
That’s not only annoying for the user but also quite stupid. The system knows where I am, which language I prefer and whether I’m using metric units. From these informations quite a good guess regarding the preferred temperature scale could be made: E.g. Having German as the preferred system language, not being located in the U.S. (or Jamaica) and preferring metric units should allow a pretty safe prediction in favour of degrees Celsius.
Looking at the relevant scripts made me realise that closed source software has a definite advantage. While you can’t fix things yourself and can’t learn from what other people did, it also keeps you from thinking that the people who wrote the software should be embarrassed. It seems that the Weather widget gets it wrong in a number of places. Ranging from a lack of resources or interest in localisation to really, erm, odd ways of programming and weaknesses in spelling.
Thus a quick solution for the problem was to just localise the widget myself. With about twenty strings this wasn’t too hard to do and has the advantage of giving me German day names as well for the forecast:
And while I was at it, I also updated the widget’s icon to display a temperature that’s reasonable in Celsius and localised the name as well. Unfortunately you can’t have localised icons so the original icon had to be overwritten for this.
widget.setPreferenceForKey(isCelcius ? true : null, createkey("celcius"));I.e. if the scale is Celsius we save ‘Yes’ and if it isn’t we save nothing at all. In particular this is the reason why I couldn’t save the Fahrenheit scale in my German localisation. Luckily a problem that could be fixed with a few keystrokes.
I put together the files I changed for download:
Enjoy at your own risk.
Do you know the formula to convert celsius to fahrenhiet?
Yup, not that this is particularly hard to find out…
Fahrenheit temperature = (Celsius temperature * 1,8) + 32
do zombies have teeth
I think the formula to convert celsius to fahrenhiet is more like:
Fahrenheit temperature = (Celsius temperature * 0.55) + 32
Celsius temperature = (Fahrenheit temperature / 0.55) - 32
By the way nice website!
Received data seems to be invalid. The wanted file does probably not exist or the guys at last.fm changed something.