From ccc6a23f686121e967ea3c0f22e36d72024c8947 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Fri, 15 Jan 2010 03:13:57 +0100 Subject: [PATCH] Fix missing translations for 'time ago' strings Replace ngettext with dngettext and set the correct translation domain, so gnome-shell's domain is searched for translations rather than mutter's. https://bugzilla.gnome.org/show_bug.cgi?id=597882 --- src/shell-global.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/shell-global.c b/src/shell-global.c index 3e422b122..680e74664 100644 --- a/src/shell-global.c +++ b/src/shell-global.c @@ -890,16 +890,24 @@ shell_global_format_time_relative_pretty (ShellGlobal *global, *text = g_strdup (_("Less than a minute ago")); *next_update = MINUTE - delta; } else if (delta < HOUR) { - *text = g_strdup_printf (ngettext ("%d minute ago", "%d minutes ago", delta / MINUTE), delta / MINUTE); + *text = g_strdup_printf (dngettext (GETTEXT_PACKAGE, + "%d minute ago", "%d minutes ago", + delta / MINUTE), delta / MINUTE); *next_update = MINUTE - (delta % MINUTE); } else if (delta < DAY) { - *text = g_strdup_printf (ngettext ("%d hour ago", "%d hours ago", delta / HOUR), delta / HOUR); + *text = g_strdup_printf (dngettext (GETTEXT_PACKAGE, + "%d hour ago", "%d hours ago", + delta / HOUR), delta / HOUR); *next_update = HOUR - (delta % HOUR); } else if (delta < WEEK) { - *text = g_strdup_printf (ngettext ("%d day ago", "%d days ago", delta / DAY), delta / DAY); + *text = g_strdup_printf (dngettext (GETTEXT_PACKAGE, + "%d day ago", "%d days ago", + delta / DAY), delta / DAY); *next_update = DAY - (delta % DAY); } else { - *text = g_strdup_printf (ngettext ("%d week ago", "%d weeks ago", delta / WEEK), delta / WEEK); + *text = g_strdup_printf (dngettext (GETTEXT_PACKAGE, + "%d week ago", "%d weeks ago", + delta / WEEK), delta / WEEK); *next_update = WEEK - (delta % WEEK); } }