From ce941421e9bbb4e0816e5057614a7ada2b66dfe5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mattias=20Andr=C3=A9e?= Date: Tue, 20 May 2014 23:17:58 +0200 Subject: [PATCH 1/2] Print N/S and E/W in the location MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/redshift-gtk/statusicon.py | 2 +- src/redshift.c | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/redshift-gtk/statusicon.py b/src/redshift-gtk/statusicon.py index 2efbc074..3e666498 100644 --- a/src/redshift-gtk/statusicon.py +++ b/src/redshift-gtk/statusicon.py @@ -296,7 +296,7 @@ def child_key_change_cb(self, key, value): 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: diff --git a/src/redshift.c b/src/redshift.c index 6fc28952..f24dce7f 100644 --- a/src/redshift.c +++ b/src/redshift.c @@ -1001,7 +1001,9 @@ main(int argc, char *argv[]) if (verbose) { /* TRANSLATORS: Append degree symbols if possible. */ - printf(_("Location: %f, %f\n"), lat, lon); + 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. */ From e1d61f7fcbd8089f782135b673fa64dbdf004138 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mattias=20Andr=C3=A9e?= Date: Mon, 26 May 2014 02:29:16 +0200 Subject: [PATCH 2/2] Update message to translators to include the degree symbol after the %f:s MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/redshift.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/redshift.c b/src/redshift.c index f24dce7f..e39caa3f 100644 --- a/src/redshift.c +++ b/src/redshift.c @@ -1000,7 +1000,7 @@ main(int argc, char *argv[]) provider->free(&location_state); if (verbose) { - /* TRANSLATORS: Append degree symbols if possible. */ + /* 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"));