[gnome-control-center] network: Say 'today' instead of '0 days ago'
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] network: Say 'today' instead of '0 days ago'
- Date: Thu, 13 Sep 2012 14:49:11 +0000 (UTC)
commit 16011384efe4ad5841be067b2856060c949f87b3
Author: Matthias Clasen <mclasen redhat com>
Date: Sat Sep 8 17:47:01 2012 -0400
network: Say 'today' instead of '0 days ago'
'Last used: 0 days ago' is odd. Also, say 'yesterday' instead
of '1 day ago'.
panels/network/net-device-wifi.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/panels/network/net-device-wifi.c b/panels/network/net-device-wifi.c
index 64ebdde..4f45a44 100644
--- a/panels/network/net-device-wifi.c
+++ b/panels/network/net-device-wifi.c
@@ -1657,7 +1657,12 @@ update_saved_last_used (NetDeviceWifi *device_wifi)
then = g_date_time_new_from_unix_utc (timestamp);
diff = g_date_time_difference (now, then);
days = diff / G_TIME_SPAN_DAY;
- last_used = g_strdup_printf (ngettext ("%i day ago", "%i days ago", days), days);
+ if (days == 0)
+ last_used = g_strdup (_("today"));
+ else if (days == 1)
+ last_used = g_strdup (_("yesterday"));
+ else
+ last_used = g_strdup_printf (ngettext ("%i day ago", "%i days ago", days), days);
out:
panel_set_device_widget_details (device_wifi->priv->builder,
"saved_last_used",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]