--- tools/polkit-gnome-authorization.c.orig 2007-12-06 04:31:23.000000000 +0100 +++ tools/polkit-gnome-authorization.c 2007-12-26 19:48:26.000000000 +0100 @@ -333,25 +333,25 @@ add_authorization (PolKitAuthorizationDB gettimeofday (&now, NULL); delta = (gint64) (now.tv_sec - time_granted); if (delta < 60) - time_string = g_strdup (_("A moment ago")); + time_string = g_strdup (_("Less than one minute ago")); else if (delta < (60 * 60)) { int minutes = (int) (delta / 60); - if (minutes == 1) - time_string = g_strdup (_("1 minute ago")); - else - time_string = g_strdup_printf (_("%d minutes ago"), minutes); + time_string = g_strdup_printf (ngettext ("%d minute ago", "%d minutes ago", minutes), minutes); + } else if (delta < (4 * 60 * 60)) { + int hours = (int) (delta / (60 * 60)); + int minutes = (int) ((delta - (hours * 60 * 60)) / 60); + char *h, *m; + h = g_strdup_printf (ngettext ("%d hour", "%d hours", hours), hours); + m = g_strdup_printf (ngettext ("%d minute", "%d minutes", minutes), minutes); + time_string = g_strconcat (h, ", ", m, " ago", NULL); + g_free (h); + g_free (m); } else if (delta < (24 * 60 * 60)) { int hours = (int) (delta / (60 * 60)); - if (hours == 1) - time_string = g_strdup (_("1 hour ago")); - else - time_string = g_strdup_printf (_("%d hours ago"), hours); + time_string = g_strdup_printf (ngettext ("%s hour ago", "%d hours ago", hours), hours); } else { int days = (int) (delta / (24 * 60 * 60)); - if (days == 1) - time_string = g_strdup (_("1 day ago")); - else - time_string = g_strdup_printf (_("%d days ago"), days); + time_string = g_strdup_printf (ngettext ("%d day ago", "%d days ago", days), days); } for_uid = polkit_authorization_get_uid (auth);