[evolution] Bug #591939 - Use ngettext in e-datetime-format.c



commit 915beda60280ee6cf70cd07a416421b89428ac3c
Author: Milan Crha <mcrha redhat com>
Date:   Tue Apr 6 19:34:38 2010 +0200

    Bug #591939 - Use ngettext in e-datetime-format.c

 e-util/e-datetime-format.c |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/e-util/e-datetime-format.c b/e-util/e-datetime-format.c
index 0595d58..37226d4 100644
--- a/e-util/e-datetime-format.c
+++ b/e-util/e-datetime-format.c
@@ -206,10 +206,13 @@ format_relative_date (time_t tvalue, time_t ttoday, const struct tm *value, cons
 			else
 				res = g_strdup (_("Yesterday"));
 		} else {
-			if (future)
-				res = g_strdup_printf (_("%d days from now"), diff);
-			else
-				res = g_strdup_printf (_("%d days ago"), diff);
+			if (future) {
+				/* Translators: %d is replaced with a number of days. It's always greater than 1 */
+				res = g_strdup_printf (ngettext ("%d day from now", "%d days from now", diff), diff);
+			} else {
+				/* Translators: %d is replaced with a number of days. It's always greater than 1 */
+				res = g_strdup_printf (ngettext ("%d day ago", "%d days ago", diff), diff);
+			}
 		}
 	}
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]