aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--filter/filter-datespec.c38
1 files changed, 22 insertions, 16 deletions
diff --git a/filter/filter-datespec.c b/filter/filter-datespec.c
index a7ef49981e..000e64da5b 100644
--- a/filter/filter-datespec.c
+++ b/filter/filter-datespec.c
@@ -69,27 +69,33 @@ typedef struct _timespan {
gfloat max;
} timespan;
-#ifdef ngettext
-#undef ngettext
+#if 0
+ngettext("1 second ago", "%d seconds ago")
+ngettext("1 second in the future", "%d seconds in the future")
+ngettext("1 minute ago", "%d minutes ago")
+ngettext("1 minute in the future", "%d minutes in the future")
+ngettext("1 hour ago", "%d hours ago")
+ngettext("1 hour in the future", "%d hours in the future")
+ngettext("1 day ago", "%d days ago")
+ngettext("1 day in the future", "%d days in the future")
+ngettext("1 week ago", "%d weeks ago")
+ngettext("1 week in the future", "%d weeks in the future")
+ngettext("1 month ago", "%d months ago")
+ngettext("1 month in the future", "%d months in the future")
+ngettext("1 year ago", "%d years ago")
+ngettext("1 year in the future", "%d years in the future")
#endif
-/* This is a nasty hack trying to keep both ngettext function and xgettext tool happy */
-/* It *will* cause problems if ngettext is a macro */
-#define ngettext(a, b) a, b
-
static const timespan timespans[] = {
- { 1, ngettext("1 second ago", "%d seconds ago"), ngettext("1 second in the future", "%d seconds in the future"), 59.0 },
- { 60, ngettext("1 minute ago", "%d minutes ago"), ngettext("1 minute in the future", "%d minutes in the future"), 59.0 },
- { 3600, ngettext("1 hour ago", "%d hours ago"), ngettext("1 hour in the future", "%d hours in the future"), 23.0 },
- { 86400, ngettext("1 day ago", "%d days ago"), ngettext("1 day in the future", "%d days in the future"), 31.0 },
- { 604800, ngettext("1 week ago", "%d weeks ago"), ngettext("1 week in the future", "%d weeks in the future"), 52.0 },
- { 2419200, ngettext("1 month ago", "%d months ago"), ngettext("1 month in the future", "%d months in the future"), 12.0 },
- { 31557600, ngettext("1 year ago", "%d years ago"), ngettext("1 year in the future", "%d years in the future"), 1000.0 },
+ { 1, "1 second ago", "%d seconds ago", "1 second in the future", "%d seconds in the future", 59.0 },
+ { 60, "1 minute ago", "%d minutes ago", "1 minute in the future", "%d minutes in the future", 59.0 },
+ { 3600, "1 hour ago", "%d hours ago", "1 hour in the future", "%d hours in the future", 23.0 },
+ { 86400, "1 day ago", "%d days ago", "1 day in the future", "%d days in the future", 31.0 },
+ { 604800, "1 week ago", "%d weeks ago", "1 week in the future", "%d weeks in the future", 52.0 },
+ { 2419200, "1 month ago", "%d months ago", "1 month in the future", "%d months in the future", 12.0 },
+ { 31557600, "1 year ago", "%d years ago", "1 year in the future", "%d years in the future", 1000.0 },
};
-/* now we let the compiler see the real function call */
-#undef ngettext
-
#define DAY_INDEX 3
#define N_TIMESPANS (sizeof (timespans) / sizeof (timespans[0]))