← Back to team overview

weather-indicator-team team mailing list archive

[Merge] lp:~lucian.grijincu/weather-indicator/degree-fixes into lp:weather-indicator

 

Lucian Adrian Grijincu has proposed merging lp:~lucian.grijincu/weather-indicator/degree-fixes into lp:weather-indicator.

Requested reviews:
  Weather Indicator Team (weather-indicator-team)

For more details, see:
https://code.launchpad.net/~lucian.grijincu/weather-indicator/degree-fixes/+merge/55479

Fix for bug #745504

There's just a C/F displayed.

Unicode has special characters for this:
- http://www.fileformat.info/info/unicode/char/2109/index.htm
- http://www.fileformat.info/info/unicode/char/2103/index.htm

This patch adds those characters.
-- 
https://code.launchpad.net/~lucian.grijincu/weather-indicator/degree-fixes/+merge/55479
Your team Weather Indicator Team is requested to review the proposed merge of lp:~lucian.grijincu/weather-indicator/degree-fixes into lp:weather-indicator.
=== modified file 'bin/indicator-weather'
--- bin/indicator-weather	2011-03-27 10:28:47 +0000
+++ bin/indicator-weather	2011-03-30 07:24:35 +0000
@@ -597,17 +597,17 @@
         if self.__weather_datasource == WeatherDataSource.GOOGLE:
             if (self.__metric_system == MetricSystem.SI):
                 _value = self.__report['current_conditions']['temp_c']
-                _unit  = "C"
+                _unit  = "℃"
             else:
                 _value = self.__report['current_conditions']['temp_f']
-                _unit  = "F"
+                _unit  = "℉"
         if self.__weather_datasource == WeatherDataSource.YAHOO:
             if (self.__metric_system == MetricSystem.SI):
                 _value = "%.1f" % ((float(self.__report['condition']['temp']) - 32) * 5/9)
-                _unit  = "C"
+                _unit  = "℃"
             else:
                 _value = self.__report['condition']['temp']
-                _unit  = "F"
+                _unit  = "℉"
         # Removing unnecessary '.0' in the end, if exists
         return ("%s %s" % (_value, _unit)).replace(".0", "")
 


Follow ups