Add translation for days in forecast

Yahoo return abreviated days desc, we parse this to return
a full day desc in the forecast Labels
Translation files were updated according to this changes
yahoo_weather
ecyrbe 14 years ago
parent fa2a7ab41f
commit 5c0e32a848
  1. 138
      po/fr.po
  2. 136
      po/gnome-shell-extension-weather.pot
  3. 20
      src/extension.js

@ -9,8 +9,8 @@ msgid ""
msgstr ""
"Project-Id-Version: 3.0.1\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2011-05-26 08:06+0200\n"
"PO-Revision-Date: 2011-05-26 08:10+0200\n"
"POT-Creation-Date: 2011-05-27 01:22+0200\n"
"PO-Revision-Date: 2011-05-27 01:24+0200\n"
"Last-Translator: ecyrbe <ecyrbe@gmail.com>\n"
"Language-Team: Français <ecyrbe@gmail.com>\n"
"Language: fr\n"
@ -19,214 +19,242 @@ msgstr ""
"Content-Transfer-Encoding: 8bits\n"
"Plural-Forms: nplurals=2; plural=(n!=1);\n"
#: extension.js:72
#: extension.js:73
msgid "..."
msgstr "..."
#: extension.js:227
#: extension.js:228
msgid "Tornado"
msgstr "Tornade"
#: extension.js:229
#: extension.js:230
msgid "Tropical storm"
msgstr "Tempête tropicale"
#: extension.js:231
#: extension.js:232
msgid "Hurricane"
msgstr "Ouragan"
#: extension.js:233
#: extension.js:234
msgid "Severe thunderstorms"
msgstr "Orage sévère"
#: extension.js:235
#: extension.js:236
msgid "Thunderstorms"
msgstr "Orage"
#: extension.js:237
#: extension.js:238
msgid "Mixed rain and snow"
msgstr "Neige et pluie"
#: extension.js:239
#: extension.js:240
msgid "Mixed rain and sleet"
msgstr "Grêle et pluie"
#: extension.js:241
#: extension.js:242
msgid "Mixed snow and sleet"
msgstr "Neige et Grêle"
#: extension.js:243
#: extension.js:244
msgid "Freezing drizzle"
msgstr "Pluie verglaçante"
#: extension.js:245
#: extension.js:246
msgid "Drizzle"
msgstr "Pluie fine"
#: extension.js:247
#: extension.js:248
msgid "Freezing rain"
msgstr "Pluie verglaçante"
#: extension.js:249 extension.js:251
#: extension.js:250 extension.js:252
msgid "Showers"
msgstr "Averses"
#: extension.js:253
#: extension.js:254
msgid "Snow flurries"
msgstr "Neige"
#: extension.js:255
#: extension.js:256
msgid "Light snow showers"
msgstr "Neige"
#: extension.js:257
#: extension.js:258
msgid "Blowing snow"
msgstr "Neige"
#: extension.js:259
#: extension.js:260
msgid "Snow"
msgstr "Neige"
#: extension.js:261
#: extension.js:262
msgid "Hail"
msgstr "Grêle"
#: extension.js:263
#: extension.js:264
msgid "Sleet"
msgstr "Grêlons"
#: extension.js:265
#: extension.js:266
msgid "Dust"
msgstr "Brouillard"
#: extension.js:267
#: extension.js:268
msgid "Foggy"
msgstr "Brouillard"
#: extension.js:269
#: extension.js:270
msgid "Haze"
msgstr "Brume"
#: extension.js:271
#: extension.js:272
msgid "Smoky"
msgstr "Brouillard"
#: extension.js:273
#: extension.js:274
msgid "Blustery"
msgstr "Bourrasques de vent"
#: extension.js:275
#: extension.js:276
msgid "Windy"
msgstr "Venteux"
#: extension.js:277
#: extension.js:278
msgid "Cold"
msgstr "Froid"
#: extension.js:279
#: extension.js:280
msgid "Cloudy"
msgstr "Nuageux"
#: extension.js:282
#: extension.js:283
msgid "Mostly cloudy"
msgstr "Nuageux"
#: extension.js:285 extension.js:311
#: extension.js:286 extension.js:312
msgid "Partly cloudy"
msgstr "Éclaicies"
#: extension.js:287
#: extension.js:288
msgid "Clear"
msgstr "Beau"
#: extension.js:289
#: extension.js:290
msgid "Sunny"
msgstr "Ensoleillé"
#: extension.js:292
#: extension.js:293
msgid "Fair"
msgstr "Beau"
#: extension.js:294
#: extension.js:295
msgid "Mixed rain and hail"
msgstr "Pluie et Grêle"
#: extension.js:296
#: extension.js:297
msgid "Hot"
msgstr "Chaud"
#: extension.js:298
#: extension.js:299
msgid "Isolated thunderstorms"
msgstr "Orageux"
#: extension.js:301
#: extension.js:302
msgid "Scattered thunderstorms"
msgstr "Orageux"
#: extension.js:303
#: extension.js:304
msgid "Scattered showers"
msgstr "Grosses averses"
#: extension.js:305 extension.js:309
#: extension.js:306 extension.js:310
msgid "Heavy snow"
msgstr "Tempête de neige"
#: extension.js:307
#: extension.js:308
msgid "Scattered snow showers"
msgstr "Tempête de neige"
#: extension.js:313
#: extension.js:314
msgid "Thundershowers"
msgstr "Orages"
#: extension.js:315
#: extension.js:316
msgid "Snow showers"
msgstr "Tempête de neige"
#: extension.js:317
#: extension.js:318
msgid "Isolated thundershowers"
msgstr "Orageux"
#: extension.js:320
#: extension.js:321
msgid "Not available"
msgstr "Non disponible"
#: extension.js:377
#: extension.js:336
msgid "Monday"
msgstr "Lundi"
#: extension.js:336
msgid "Tuesday"
msgstr "Mardi"
#: extension.js:336
msgid "Wednesday"
msgstr "Mercredi"
#: extension.js:336
msgid "Thursday"
msgstr "Jeudi"
#: extension.js:336
msgid "Friday"
msgstr "Vendredi"
#: extension.js:336
msgid "Saturday"
msgstr "Samedi"
#: extension.js:336
msgid "Sunday"
msgstr "Dimanche"
#: extension.js:392
msgid "Today"
msgstr "Aujourd'hui"
#: extension.js:377
#: extension.js:392
msgid "Tomorrow"
msgstr "Demain"
#: extension.js:414
#: extension.js:429
msgid "Loading current weather ..."
msgstr "Chargement de la météo ..."
#: extension.js:415
#: extension.js:430
msgid "Loading future weather ..."
msgstr "Chargement des prévisions ..."
#: extension.js:431
#: extension.js:446
msgid "Loading ..."
msgstr "Chargement ..."
#: extension.js:434
#: extension.js:449
msgid "Please wait"
msgstr "Patientez s'il vous plaît"
#: extension.js:452
#: extension.js:467
msgid "Temperature:"
msgstr "Température :"
#: extension.js:454
#: extension.js:469
msgid "Humidity:"
msgstr "Humidité :"
#: extension.js:456
#: extension.js:471
msgid "Pressure:"
msgstr "Pression :"
#: extension.js:458
#: extension.js:473
msgid "Wind:"
msgstr "Vent :"

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2011-05-26 08:06+0200\n"
"POT-Creation-Date: 2011-05-27 01:22+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -17,214 +17,242 @@ msgstr ""
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
#: extension.js:72
#: extension.js:73
msgid "..."
msgstr ""
#: extension.js:227
#: extension.js:228
msgid "Tornado"
msgstr ""
#: extension.js:229
#: extension.js:230
msgid "Tropical storm"
msgstr ""
#: extension.js:231
#: extension.js:232
msgid "Hurricane"
msgstr ""
#: extension.js:233
#: extension.js:234
msgid "Severe thunderstorms"
msgstr ""
#: extension.js:235
#: extension.js:236
msgid "Thunderstorms"
msgstr ""
#: extension.js:237
#: extension.js:238
msgid "Mixed rain and snow"
msgstr ""
#: extension.js:239
#: extension.js:240
msgid "Mixed rain and sleet"
msgstr ""
#: extension.js:241
#: extension.js:242
msgid "Mixed snow and sleet"
msgstr ""
#: extension.js:243
#: extension.js:244
msgid "Freezing drizzle"
msgstr ""
#: extension.js:245
#: extension.js:246
msgid "Drizzle"
msgstr ""
#: extension.js:247
#: extension.js:248
msgid "Freezing rain"
msgstr ""
#: extension.js:249 extension.js:251
#: extension.js:250 extension.js:252
msgid "Showers"
msgstr ""
#: extension.js:253
#: extension.js:254
msgid "Snow flurries"
msgstr ""
#: extension.js:255
#: extension.js:256
msgid "Light snow showers"
msgstr ""
#: extension.js:257
#: extension.js:258
msgid "Blowing snow"
msgstr ""
#: extension.js:259
#: extension.js:260
msgid "Snow"
msgstr ""
#: extension.js:261
#: extension.js:262
msgid "Hail"
msgstr ""
#: extension.js:263
#: extension.js:264
msgid "Sleet"
msgstr ""
#: extension.js:265
#: extension.js:266
msgid "Dust"
msgstr ""
#: extension.js:267
#: extension.js:268
msgid "Foggy"
msgstr ""
#: extension.js:269
#: extension.js:270
msgid "Haze"
msgstr ""
#: extension.js:271
#: extension.js:272
msgid "Smoky"
msgstr ""
#: extension.js:273
#: extension.js:274
msgid "Blustery"
msgstr ""
#: extension.js:275
#: extension.js:276
msgid "Windy"
msgstr ""
#: extension.js:277
#: extension.js:278
msgid "Cold"
msgstr ""
#: extension.js:279
#: extension.js:280
msgid "Cloudy"
msgstr ""
#: extension.js:282
#: extension.js:283
msgid "Mostly cloudy"
msgstr ""
#: extension.js:285 extension.js:311
#: extension.js:286 extension.js:312
msgid "Partly cloudy"
msgstr ""
#: extension.js:287
#: extension.js:288
msgid "Clear"
msgstr ""
#: extension.js:289
#: extension.js:290
msgid "Sunny"
msgstr ""
#: extension.js:292
#: extension.js:293
msgid "Fair"
msgstr ""
#: extension.js:294
#: extension.js:295
msgid "Mixed rain and hail"
msgstr ""
#: extension.js:296
#: extension.js:297
msgid "Hot"
msgstr ""
#: extension.js:298
#: extension.js:299
msgid "Isolated thunderstorms"
msgstr ""
#: extension.js:301
#: extension.js:302
msgid "Scattered thunderstorms"
msgstr ""
#: extension.js:303
#: extension.js:304
msgid "Scattered showers"
msgstr ""
#: extension.js:305 extension.js:309
#: extension.js:306 extension.js:310
msgid "Heavy snow"
msgstr ""
#: extension.js:307
#: extension.js:308
msgid "Scattered snow showers"
msgstr ""
#: extension.js:313
#: extension.js:314
msgid "Thundershowers"
msgstr ""
#: extension.js:315
#: extension.js:316
msgid "Snow showers"
msgstr ""
#: extension.js:317
#: extension.js:318
msgid "Isolated thundershowers"
msgstr ""
#: extension.js:320
#: extension.js:321
msgid "Not available"
msgstr ""
#: extension.js:377
#: extension.js:336
msgid "Monday"
msgstr ""
#: extension.js:336
msgid "Tuesday"
msgstr ""
#: extension.js:336
msgid "Wednesday"
msgstr ""
#: extension.js:336
msgid "Thursday"
msgstr ""
#: extension.js:336
msgid "Friday"
msgstr ""
#: extension.js:336
msgid "Saturday"
msgstr ""
#: extension.js:336
msgid "Sunday"
msgstr ""
#: extension.js:392
msgid "Today"
msgstr ""
#: extension.js:377
#: extension.js:392
msgid "Tomorrow"
msgstr ""
#: extension.js:414
#: extension.js:429
msgid "Loading current weather ..."
msgstr ""
#: extension.js:415
#: extension.js:430
msgid "Loading future weather ..."
msgstr ""
#: extension.js:431
#: extension.js:446
msgid "Loading ..."
msgstr ""
#: extension.js:434
#: extension.js:449
msgid "Please wait"
msgstr ""
#: extension.js:452
#: extension.js:467
msgid "Temperature:"
msgstr ""
#: extension.js:454
#: extension.js:469
msgid "Humidity:"
msgstr ""
#: extension.js:456
#: extension.js:471
msgid "Pressure:"
msgstr ""
#: extension.js:458
#: extension.js:473
msgid "Wind:"
msgstr ""

@ -322,6 +322,20 @@ WeatherMenuButton.prototype = {
}
},
parse_day: function(abr) {
let yahoo_days = ['monday','tuesday','wednesday','thursday','friday','saturday','sunday'];
for(var i =0;i<yahoo_days.length;i++){
if( yahoo_days[i].substr(0,abr.length) == abr.toLowerCase()){
return i;
}
}
return 0;
},
get_locale_day: function(abr) {
let days = [_('Monday'), _('Tuesday'), _('Wednesday'), _('Thursday'), _('Friday'), _('Saturday'), _('Sunday')];
return days[this.parse_day(abr)].substr(0,abr.length);
},
load_json: function(url) {
var session = new Soup.SessionSync();
@ -349,7 +363,7 @@ WeatherMenuButton.prototype = {
this.load_json_async(WEATHER_URL, function(weather) {
let location = CITY_DISPLAYED;
let comment = this.get_weather_condition(weather.get_object_member('condition').get_string_member('code'));//weather.get_object_member('condition').get_string_member('text');
let comment = this.get_weather_condition(weather.get_object_member('condition').get_string_member('code'));
let temperature = weather.get_object_member('condition').get_double_member('temperature');
let temperature_unit = '\u00b0' + weather.get_object_member('units').get_string_member('temperature');
let humidity = weather.get_object_member('atmosphere').get_string_member('humidity') + ' %';
@ -382,11 +396,11 @@ WeatherMenuButton.prototype = {
let forecastData = forecast2[i].get_object().get_object_member('item').get_object_member('forecast');
let code = forecastData.get_string_member('code');
let comment = this.get_weather_condition(code);//forecastData.get_string_member('text');
let comment = this.get_weather_condition(code);
let t_low = forecastData.get_string_member('low');
let t_high = forecastData.get_string_member('high');
forecastUi.Day.text = date_string[i] + ' (' + forecastData.get_string_member('day') + ')';
forecastUi.Day.text = date_string[i] + ' (' + this.get_locale_day(forecastData.get_string_member('day')) + ')';
forecastUi.Temperature.text = t_low + '\u2013' + t_high + ' \u00b0' + UNITS.toUpperCase();
forecastUi.Summary.text = comment;
forecastUi.Icon.icon_name = this.get_weather_icon(code);

Loading…
Cancel
Save