From 30d45a522eb83d519f1ee44ebe06a6696d2b094d Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Thu, 25 Jul 2013 21:06:25 -0500 Subject: in the appointments section, only show the next instance of recurring events. If the event is daily, say so in the time format string. --- src/utils.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'src/utils.c') diff --git a/src/utils.c b/src/utils.c index fa54008..a408f68 100644 --- a/src/utils.c +++ b/src/utils.c @@ -154,6 +154,19 @@ T_(const char *msg) return rv; } +gchar * +join_date_and_time_format_strings (const char * date_string, + const char * time_string) +{ + /* TRANSLATORS: This is a format string passed to strftime to combine the + * date and the time. The value of "%s\xE2\x80\x82%s" will result in a + * string like this in US English 12-hour time: 'Fri Jul 16 11:50 AM'. + * The space in between date and time is a Unicode en space + * (E28082 in UTF-8 hex). */ + return g_strdup_printf (T_("%s\xE2\x80\x82%s"), date_string, time_string); +} + + /* Tries to figure out what our format string should be. Lots of translator comments in here. */ gchar * @@ -218,11 +231,7 @@ generate_format_string_full (gboolean show_day, gboolean show_date) /* Check point, we should have a date string */ g_return_val_if_fail(date_string != NULL, g_strdup(time_string)); - /* TRANSLATORS: This is a format string passed to strftime to combine the - date and the time. The value of "%s\xE2\x80\x82%s" would result in a string like - this in US English 12-hour time: 'Fri Jul 16 11:50 AM'. - The space in between date and time is a Unicode en space (E28082 in UTF-8 hex). */ - return g_strdup_printf(T_("%s\xE2\x80\x82%s"), date_string, time_string); + return join_date_and_time_format_strings (date_string, time_string); } gchar * -- cgit v1.2.3