unify used comment-tags, no box-comments except for the file-headers

yahoo_weather
Jens Lody 11 years ago
parent 434823ada0
commit baea30d368
  1. 200
      src/extension.js

@ -623,154 +623,154 @@ const WeatherMenuButton = new Lang.Class({
}, },
get_weather_icon: function(code) { get_weather_icon: function(code) {
/* see http://developer.yahoo.com/weather/#codetable */ // see http://developer.yahoo.com/weather/#codetable
/* fallback icons are: weather-clear-night weather-clear weather-few-clouds-night weather-few-clouds weather-fog weather-overcast weather-severe-alert weather-showers weather-showers-scattered weather-snow weather-storm */ // fallback icons are: weather-clear-night weather-clear weather-few-clouds-night weather-few-clouds weather-fog weather-overcast weather-severe-alert weather-showers weather-showers-scattered weather-snow weather-storm
switch (parseInt(code, 10)) { switch (parseInt(code, 10)) {
case 0: case 0:
/* tornado */ // tornado
return ['weather-severe-alert']; return ['weather-severe-alert'];
case 1: case 1:
/* tropical storm */ // tropical storm
return ['weather-severe-alert']; return ['weather-severe-alert'];
case 2: case 2:
/* hurricane */ // hurricane
return ['weather-severe-alert']; return ['weather-severe-alert'];
case 3: case 3:
/* severe thunderstorms */ // severe thunderstorms
return ['weather-severe-alert']; return ['weather-severe-alert'];
case 4: case 4:
/* thunderstorms */ // thunderstorms
return ['weather-storm']; return ['weather-storm'];
case 5: case 5:
/* mixed rain and snow */ // mixed rain and snow
return ['weather-snow-rain', 'weather-snow']; return ['weather-snow-rain', 'weather-snow'];
case 6: case 6:
/* mixed rain and sleet */ // mixed rain and sleet
return ['weather-snow-rain', 'weather-snow']; return ['weather-snow-rain', 'weather-snow'];
case 7: case 7:
/* mixed snow and sleet */ // mixed snow and sleet
return ['weather-snow']; return ['weather-snow'];
case 8: case 8:
/* freezing drizzle */ // freezing drizzle
return ['weather-freezing-rain', 'weather-showers']; return ['weather-freezing-rain', 'weather-showers'];
case 9: case 9:
/* drizzle */ // drizzle
return ['weather-showers']; return ['weather-showers'];
case 10: case 10:
/* freezing rain */ // freezing rain
return ['weather-freezing-rain', 'weather-showers']; return ['weather-freezing-rain', 'weather-showers'];
case 11: case 11:
/* showers */ // showers
return ['weather-showers']; return ['weather-showers'];
case 12: case 12:
/* showers */ // showers
return ['weather-showers']; return ['weather-showers'];
case 13: case 13:
/* snow flurries */ // snow flurries
return ['weather-snow']; return ['weather-snow'];
case 14: case 14:
/* light snow showers */ // light snow showers
return ['weather-snow']; return ['weather-snow'];
case 15: case 15:
/* blowing snow */ // blowing snow
return ['weather-snow']; return ['weather-snow'];
case 16: case 16:
/* snow */ // snow
return ['weather-snow']; return ['weather-snow'];
case 17: case 17:
/* hail */ // hail
return ['weather-snow']; return ['weather-snow'];
case 18: case 18:
/* sleet */ // sleet
return ['weather-snow']; return ['weather-snow'];
case 19: case 19:
/* dust */ // dust
return ['weather-fog']; return ['weather-fog'];
case 20: case 20:
/* foggy */ // foggy
return ['weather-fog']; return ['weather-fog'];
case 21: case 21:
/* haze */ // haze
return ['weather-fog']; return ['weather-fog'];
case 22: case 22:
/* smoky */ // smoky
return ['weather-fog']; return ['weather-fog'];
case 23: case 23:
/* blustery */ // blustery
return ['weather-few-clouds']; return ['weather-few-clouds'];
case 24: case 24:
/* windy */ // windy
return ['weather-few-clouds']; return ['weather-few-clouds'];
case 25: case 25:
/* cold */ // cold
return ['weather-few-clouds']; return ['weather-few-clouds'];
case 26: case 26:
/* cloudy */ // cloudy
return ['weather-overcast']; return ['weather-overcast'];
case 27: case 27:
/* mostly cloudy (night) */ // mostly cloudy (night)
return ['weather-clouds-night', 'weather-few-clouds-night']; return ['weather-clouds-night', 'weather-few-clouds-night'];
case 28: case 28:
/* mostly cloudy (day) */ // mostly cloudy (day)
return ['weather-clouds', 'weather-overcast']; return ['weather-clouds', 'weather-overcast'];
case 29: case 29:
/* partly cloudy (night) */ // partly cloudy (night)
return ['weather-few-clouds-night']; return ['weather-few-clouds-night'];
case 30: case 30:
/* partly cloudy (day) */ // partly cloudy (day)
return ['weather-few-clouds']; return ['weather-few-clouds'];
case 31: case 31:
/* clear (night) */ // clear (night)
return ['weather-clear-night']; return ['weather-clear-night'];
case 32: case 32:
/* sunny */ // sunny
return ['weather-clear']; return ['weather-clear'];
case 33: case 33:
/* fair (night) */ // fair (night)
return ['weather-clear-night']; return ['weather-clear-night'];
case 34: case 34:
/* fair (day) */ // fair (day)
return ['weather-clear']; return ['weather-clear'];
case 35: case 35:
/* mixed rain and hail */ // mixed rain and hail
return ['weather-snow-rain', 'weather-showers']; return ['weather-snow-rain', 'weather-showers'];
case 36: case 36:
/* hot */ // hot
return ['weather-clear']; return ['weather-clear'];
case 37: case 37:
/* isolated thunderstorms */ // isolated thunderstorms
return ['weather-storm']; return ['weather-storm'];
case 38: case 38:
/* scattered thunderstorms */ // scattered thunderstorms
return ['weather-storm']; return ['weather-storm'];
case 39: case 39:
/* 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
case 40: case 40:
/* scattered showers */ // scattered showers
return ['weather-showers-scattered', 'weather-showers']; return ['weather-showers-scattered', 'weather-showers'];
case 41: case 41:
/* heavy snow */ // heavy snow
return ['weather-snow']; return ['weather-snow'];
case 42: case 42:
/* scattered snow showers */ // scattered snow showers
return ['weather-snow']; return ['weather-snow'];
case 43: case 43:
/* heavy snow */ // heavy snow
return ['weather-snow']; return ['weather-snow'];
case 44: case 44:
/* partly cloudy */ // partly cloudy
return ['weather-few-clouds']; return ['weather-few-clouds'];
case 45: case 45:
/* thundershowers */ // thundershowers
return ['weather-storm']; return ['weather-storm'];
case 46: case 46:
/* snow showers */ // snow showers
return ['weather-snow']; return ['weather-snow'];
case 47: case 47:
/* isolated thundershowers */ // isolated thundershowers
return ['weather-storm']; return ['weather-storm'];
case 3200: case 3200:
/* not available */ // not available
default: default:
return ['weather-severe-alert']; return ['weather-severe-alert'];
} }
@ -792,147 +792,147 @@ const WeatherMenuButton = new Lang.Class({
get_weather_condition: function(code) { get_weather_condition: function(code) {
switch (parseInt(code, 10)) { switch (parseInt(code, 10)) {
case 0: case 0:
/* tornado */ // tornado
return _('Tornado'); return _('Tornado');
case 1: case 1:
/* tropical storm */ // tropical storm
return _('Tropical storm'); return _('Tropical storm');
case 2: case 2:
/* hurricane */ // hurricane
return _('Hurricane'); return _('Hurricane');
case 3: case 3:
/* severe thunderstorms */ // severe thunderstorms
return _('Severe thunderstorms'); return _('Severe thunderstorms');
case 4: case 4:
/* thunderstorms */ // thunderstorms
return _('Thunderstorms'); return _('Thunderstorms');
case 5: case 5:
/* mixed rain and snow */ // mixed rain and snow
return _('Mixed rain and snow'); return _('Mixed rain and snow');
case 6: case 6:
/* mixed rain and sleet */ // mixed rain and sleet
return _('Mixed rain and sleet'); return _('Mixed rain and sleet');
case 7: case 7:
/* mixed snow and sleet */ // mixed snow and sleet
return _('Mixed snow and sleet'); return _('Mixed snow and sleet');
case 8: case 8:
/* freezing drizzle */ // freezing drizzle
return _('Freezing drizzle'); return _('Freezing drizzle');
case 9: case 9:
/* drizzle */ // drizzle
return _('Drizzle'); return _('Drizzle');
case 10: case 10:
/* freezing rain */ // freezing rain
return _('Freezing rain'); return _('Freezing rain');
case 11: case 11:
/* showers */ // showers
return _('Showers'); return _('Showers');
case 12: case 12:
/* showers */ // showers
return _('Showers'); return _('Showers');
case 13: case 13:
/* snow flurries */ // snow flurries
return _('Snow flurries'); return _('Snow flurries');
case 14: case 14:
/* light snow showers */ // light snow showers
return _('Light snow showers'); return _('Light snow showers');
case 15: case 15:
/* blowing snow */ // blowing snow
return _('Blowing snow'); return _('Blowing snow');
case 16: case 16:
/* snow */ // snow
return _('Snow'); return _('Snow');
case 17: case 17:
/* hail */ // hail
return _('Hail'); return _('Hail');
case 18: case 18:
/* sleet */ // sleet
return _('Sleet'); return _('Sleet');
case 19: case 19:
/* dust */ // dust
return _('Dust'); return _('Dust');
case 20: case 20:
/* foggy */ // foggy
return _('Foggy'); return _('Foggy');
case 21: case 21:
/* haze */ // haze
return _('Haze'); return _('Haze');
case 22: case 22:
/* smoky */ // smoky
return _('Smoky'); return _('Smoky');
case 23: case 23:
/* blustery */ // blustery
return _('Blustery'); return _('Blustery');
case 24: case 24:
/* windy */ // windy
return _('Windy'); return _('Windy');
case 25: case 25:
/* cold */ // cold
return _('Cold'); return _('Cold');
case 26: case 26:
/* cloudy */ // cloudy
return _('Cloudy'); return _('Cloudy');
case 27: case 27:
/* mostly cloudy (night) */ // mostly cloudy (night)
case 28: case 28:
/* mostly cloudy (day) */ // mostly cloudy (day)
return _('Mostly cloudy'); return _('Mostly cloudy');
case 29: case 29:
/* partly cloudy (night) */ // partly cloudy (night)
case 30: case 30:
/* partly cloudy (day) */ // partly cloudy (day)
return _('Partly cloudy'); return _('Partly cloudy');
case 31: case 31:
/* clear (night) */ // clear (night)
return _('Clear'); return _('Clear');
case 32: case 32:
/* sunny */ // sunny
return _('Sunny'); return _('Sunny');
case 33: case 33:
/* fair (night) */ // fair (night)
case 34: case 34:
/* fair (day) */ // fair (day)
return _('Fair'); return _('Fair');
case 35: case 35:
/* mixed rain and hail */ // mixed rain and hail
return _('Mixed rain and hail'); return _('Mixed rain and hail');
case 36: case 36:
/* hot */ // hot
return _('Hot'); return _('Hot');
case 37: case 37:
/* isolated thunderstorms */ // isolated thunderstorms
return _('Isolated thunderstorms'); return _('Isolated thunderstorms');
case 38: case 38:
/* scattered thunderstorms */ // scattered thunderstorms
case 39: case 39:
/* scattered thunderstorms */ // scattered thunderstorms
return _('Scattered thunderstorms'); return _('Scattered thunderstorms');
case 40: case 40:
/* scattered showers */ // scattered showers
return _('Scattered showers'); return _('Scattered showers');
case 41: case 41:
/* heavy snow */ // heavy snow
return _('Heavy snow'); return _('Heavy snow');
case 42: case 42:
/* scattered snow showers */ // scattered snow showers
return _('Scattered snow showers'); return _('Scattered snow showers');
case 43: case 43:
/* heavy snow */ // heavy snow
return _('Heavy snow'); return _('Heavy snow');
case 44: case 44:
/* partly cloudy */ // partly cloudy
return _('Partly cloudy'); return _('Partly cloudy');
case 45: case 45:
/* thundershowers */ // thundershowers
return _('Thundershowers'); return _('Thundershowers');
case 46: case 46:
/* snow showers */ // snow showers
return _('Snow showers'); return _('Snow showers');
case 47: case 47:
/* isolated thundershowers */ // isolated thundershowers
return _('Isolated thundershowers'); return _('Isolated thundershowers');
case 3200: case 3200:
/* not available */ // not available
default: default:
return _('Not available'); return _('Not available');
} }

Loading…
Cancel
Save