]> git.0d.be Git - empathy.git/commitdiff
log-window: properly translate duration strings
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Thu, 15 Sep 2011 13:06:19 +0000 (15:06 +0200)
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Thu, 15 Sep 2011 13:06:27 +0000 (15:06 +0200)
https://bugzilla.gnome.org/show_bug.cgi?id=659141

libempathy-gtk/empathy-log-window.c

index 896462e88520338e74028fe98ed0133ad57c92f9..7c12ae209a00429fb0366159e52f446c73707935 100644 (file)
@@ -1371,13 +1371,24 @@ log_window_append_call (TplEvent *event,
   if (tpl_call_event_get_end_reason (call) != TPL_CALL_END_REASON_NO_ANSWER)
     {
       gchar *body;
+      gchar *tmp;
 
       span = tpl_call_event_get_duration (TPL_CALL_EVENT (event));
+
       if (span < 60)
-        duration = g_strdup_printf (_("%" G_GINT64_FORMAT " seconds"), span);
+        {
+          tmp = g_strdup_printf ("%" G_GINT64_FORMAT, span);
+          duration = g_strdup_printf (
+              ngettext ("%s second", "%s seconds", span), tmp);
+          g_free (tmp);
+        }
       else
-        duration = g_strdup_printf (_("%" G_GINT64_FORMAT " minutes"),
-            span / 60);
+        {
+          tmp = g_strdup_printf ("%" G_GINT64_FORMAT, span / 60);
+          duration = g_strdup_printf (
+              ngettext ("%s minute", "%s minutes", span / 60), tmp);
+          g_free (tmp);
+        }
 
       finished_date = g_date_time_add (started_date, -span);
       finished = g_date_time_format (finished_date, "%X");