aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2013-07-30 15:44:11 -0500
committerCharles Kerr <charles.kerr@canonical.com>2013-07-30 15:44:11 -0500
commitd5aaabfd15c782cae1515b5edf221951c43dcb9d (patch)
tree14d2462479a4cd94dc58b5f549dbb0b5993d251d
parente94e06f6d1708ed30aac8ea9503e17cd618bcae3 (diff)
downloadayatana-indicator-datetime-d5aaabfd15c782cae1515b5edf221951c43dcb9d.tar.gz
ayatana-indicator-datetime-d5aaabfd15c782cae1515b5edf221951c43dcb9d.tar.bz2
ayatana-indicator-datetime-d5aaabfd15c782cae1515b5edf221951c43dcb9d.zip
add i18n comments to get_terse_date_format_string() and get_terse_time_format_string()
-rw-r--r--src/utils.c32
1 files changed, 26 insertions, 6 deletions
diff --git a/src/utils.c b/src/utils.c
index 1297981..d18a5cc 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -264,10 +264,24 @@ get_terse_date_format_string (date_proximity_t proximity)
switch (proximity)
{
- case DATE_PROXIMITY_TODAY: fmt = NULL; break;
- case DATE_PROXIMITY_TOMORROW: fmt = T_("Tomorrow"); break;
- case DATE_PROXIMITY_WEEK: fmt = T_("%a"); break;
- default: fmt = T_("%d %b"); break;
+ case DATE_PROXIMITY_TODAY:
+ /* 'Today' is implicit in the terse case, so no string needed */
+ fmt = NULL;
+ break;
+
+ case DATE_PROXIMITY_TOMORROW:
+ fmt = T_("Tomorrow");
+ break;
+
+ case DATE_PROXIMITY_WEEK:
+ /* a strftime(3) fmt string for abbreviated day of week */
+ fmt = T_("%a");
+ break;
+
+ default:
+ /* a strftime(3) fmt string for day-of-month and abbreviated month */
+ fmt = T_("%d %b");
+ break;
}
return fmt;
@@ -279,9 +293,15 @@ get_terse_time_format_string (GDateTime * time)
const gchar * fmt;
if (g_date_time_get_minute (time) != 0)
- fmt = T_("%I:%M %p");
+ {
+ /* a strftime(3) fmt string for a HH:MM 12 hour time */
+ fmt = T_("%I:%M %p");
+ }
else
- fmt = T_("%I %p");
+ {
+ /* a strftime(3) fmt string for a HH 12 hour time */
+ fmt = T_("%I %p");
+ }
return fmt;
}