From ee043ec19653651b7f5e1106a7641440a349e57d Mon Sep 17 00:00:00 2001 From: simon04 Date: Fri, 3 Jun 2011 22:58:18 +0200 Subject: [PATCH] Allow to disable translation of weather condition (for forecast). --- src/extension.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/extension.js b/src/extension.js index 0fbaf3e..dce1db1 100644 --- a/src/extension.js +++ b/src/extension.js @@ -445,10 +445,13 @@ 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); let t_low = forecastData.get_string_member('low'); let t_high = forecastData.get_string_member('high'); + let comment = forecastData.get_string_member('text'); + if (this._translate_condition) + comment = this.get_weather_condition(code); + forecastUi.Day.text = date_string[i] + ' (' + this.get_locale_day(forecastData.get_string_member('day')) + ')'; forecastUi.Temperature.text = t_low + '\u2013' + t_high + ' ' + this.unit_to_unicode(); forecastUi.Summary.text = comment;