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
This commit is contained in:
Florian Müllner 2010-01-15 03:13:57 +01:00
parent c236c501e7
commit ccc6a23f68

View File

@ -890,16 +890,24 @@ shell_global_format_time_relative_pretty (ShellGlobal *global,
*text = g_strdup (_("Less than a minute ago")); *text = g_strdup (_("Less than a minute ago"));
*next_update = MINUTE - delta; *next_update = MINUTE - delta;
} else if (delta < HOUR) { } 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); *next_update = MINUTE - (delta % MINUTE);
} else if (delta < DAY) { } 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); *next_update = HOUR - (delta % HOUR);
} else if (delta < WEEK) { } 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); *next_update = DAY - (delta % DAY);
} else { } 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); *next_update = WEEK - (delta % WEEK);
} }
} }