aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-09-15 21:06:19 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-09-15 21:06:27 +0800
commit63ad9ebf15467a134ab044969faecbf3f4a2a758 (patch)
treeb9902adc308f93e1607608a488819ded6f01e293
parent051beb6158c98cd2aa6c7219fc3c94a7eb3ae7b0 (diff)
downloadgsoc2013-empathy-63ad9ebf15467a134ab044969faecbf3f4a2a758.tar
gsoc2013-empathy-63ad9ebf15467a134ab044969faecbf3f4a2a758.tar.gz
gsoc2013-empathy-63ad9ebf15467a134ab044969faecbf3f4a2a758.tar.bz2
gsoc2013-empathy-63ad9ebf15467a134ab044969faecbf3f4a2a758.tar.lz
gsoc2013-empathy-63ad9ebf15467a134ab044969faecbf3f4a2a758.tar.xz
gsoc2013-empathy-63ad9ebf15467a134ab044969faecbf3f4a2a758.tar.zst
gsoc2013-empathy-63ad9ebf15467a134ab044969faecbf3f4a2a758.zip
log-window: properly translate duration strings
https://bugzilla.gnome.org/show_bug.cgi?id=659141
-rw-r--r--libempathy-gtk/empathy-log-window.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/libempathy-gtk/empathy-log-window.c b/libempathy-gtk/empathy-log-window.c
index 896462e88..7c12ae209 100644
--- a/libempathy-gtk/empathy-log-window.c
+++ b/libempathy-gtk/empathy-log-window.c
@@ -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");