felixhageloh / weather-widget

A weather widget for Übersicht
64 stars 32 forks source link

translation #27

Open bones78 opened 8 years ago

bones78 commented 8 years ago

Hi all, I have successfully changed the English days into German ( in the index.coffee under dayMapping:). But I failed in changing the wheather tags (e.g. cloudy) into a German word. How can I do this?

felixhageloh commented 8 years ago

It is probably weather.condition.text from the api response that provides the text like 'cloudy', 'mostly sunny' etc. If you want to translate it, maybe the best starting place is to use the weather.condition.code instead https://developer.yahoo.com/weather//#codes and then use your own translation mapping (similar to the weekdays)

bones78 commented 8 years ago

unfortunately it does not work. For example it is sunny, I write (I use test as an example): weather.condition.code: 32: test OR 32: 'test' OR 32: "" test

There is an error: Error in widget.... unexpected : If I delete the : in weather.condition.code it says: weather is not defined. What is the correct way to translate it?