(Hopefully) use correct values for condidtion-code; !Yahoo's weater-api description is obviously wrong

yahoo_weather
Jens Lody 11 years ago
parent baea30d368
commit 0eb1c09dfe
  1. 10
      src/extension.js

@ -744,7 +744,10 @@ const WeatherMenuButton = new Lang.Class({
// scattered thunderstorms // scattered thunderstorms
return ['weather-storm']; return ['weather-storm'];
case 39: case 39:
// The API-description differs from the use by !Yahoo, see:
// http://developer.yahoo.com/forum/YDN-Documentation/Yahoo-Weather-API-Wrong-Condition-Code/1290534174000-1122fc3d-da6d-34a2-9fb9-d0863e6c5bc6 // http://developer.yahoo.com/forum/YDN-Documentation/Yahoo-Weather-API-Wrong-Condition-Code/1290534174000-1122fc3d-da6d-34a2-9fb9-d0863e6c5bc6
// guessed as isolated showers
return ['weather-showers-isolated', 'weather-showers'];
case 40: case 40:
// scattered showers // scattered showers
return ['weather-showers-scattered', 'weather-showers']; return ['weather-showers-scattered', 'weather-showers'];
@ -903,10 +906,13 @@ const WeatherMenuButton = new Lang.Class({
// isolated thunderstorms // isolated thunderstorms
return _('Isolated thunderstorms'); return _('Isolated thunderstorms');
case 38: case 38:
// scattered thunderstorms
case 39:
// scattered thunderstorms // scattered thunderstorms
return _('Scattered thunderstorms'); return _('Scattered thunderstorms');
case 39:
// The API-description differs from the use by !Yahoo, see:
// http://developer.yahoo.com/forum/YDN-Documentation/Yahoo-Weather-API-Wrong-Condition-Code/1290534174000-1122fc3d-da6d-34a2-9fb9-d0863e6c5bc6
// guessed as isolated showers
return _('Isolated showers');
case 40: case 40:
// scattered showers // scattered showers
return _('Scattered showers'); return _('Scattered showers');

Loading…
Cancel
Save