Fix #90: Print N/S and E/W in the location

This commit is contained in:
Mattias Andrée
2014-08-16 22:34:57 -04:00
committed by Jon Lund Steffensen
parent 1b4d4e94e1
commit 7027488b03
2 changed files with 5 additions and 3 deletions
+1 -1
View File
@@ -296,7 +296,7 @@ class RedshiftStatusIcon(object):
elif key == 'Period':
self.change_period(value)
elif key == 'Location':
self.change_location(tuple(float(x) for x in value.split(', ')))
self.change_location(value.split(', '))
def child_stdout_line_cb(self, line):
if line:
+4 -2
View File
@@ -1000,8 +1000,10 @@ main(int argc, char *argv[])
provider->free(&location_state);
if (verbose) {
/* TRANSLATORS: Append degree symbols if possible. */
printf(_("Location: %f, %f\n"), lat, lon);
/* TRANSLATORS: Append degree symbols after %f if possible. */
printf(_("Location: %f %s, %f %s\n"),
fabs(lat), lat >= 0.f ? _("N") : _("S"),
fabs(lon), lon >= 0.f ? _("E") : _("W"));
printf(_("Temperatures: %dK at day, %dK at night\n"),
temp_day, temp_night);
/* TRANSLATORS: Append degree symbols if possible. */