aboutsummaryrefslogtreecommitdiffstats
path: root/filter
diff options
context:
space:
mode:
authorFridrich Strba <fridrich.strba@bluewin.ch>2009-06-04 00:53:43 +0800
committerFridrich Strba <fridrich.strba@bluewin.ch>2009-06-04 01:26:24 +0800
commit9271d4e8e459608e3cdcc7e0a148f5e6dbba16e7 (patch)
tree7db01cc53584b05e1c957a196469fb523e151c3f /filter
parent0fd4314bc9a6b4fae7772b48a16ac25b67e72100 (diff)
downloadgsoc2013-evolution-9271d4e8e459608e3cdcc7e0a148f5e6dbba16e7.tar.gz
gsoc2013-evolution-9271d4e8e459608e3cdcc7e0a148f5e6dbba16e7.tar.zst
gsoc2013-evolution-9271d4e8e459608e3cdcc7e0a148f5e6dbba16e7.zip
Remove a horrible hack and stuff the localizable strings into if-zero-ed block
Diffstat (limited to 'filter')
-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]))