[gnome-shell] Fix missing translations for 'time ago' strings
- From: Florian Müllner <fmuellner src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnome-shell] Fix missing translations for 'time ago' strings
- Date: Fri, 15 Jan 2010 17:17:16 +0000 (UTC)
commit ccc6a23f686121e967ea3c0f22e36d72024c8947
Author: Florian Müllner <fmuellner src gnome org>
Date: Fri Jan 15 03:13:57 2010 +0100
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 files changed, 12 insertions(+), 4 deletions(-)
---
diff --git a/src/shell-global.c b/src/shell-global.c
index 3e422b1..680e746 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);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]