aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2014-09-15 09:56:29 -0500
committerCharles Kerr <charles.kerr@canonical.com>2014-09-15 09:56:29 -0500
commita705cb47912f6785a3dda0f67eee264938cdf4e0 (patch)
treebe49e1b24a3e508f43a51e80387fe75e6b8e39c7
parent4416b0398eff0a7f0462e72b6111aef8cd090b24 (diff)
downloadayatana-indicator-datetime-a705cb47912f6785a3dda0f67eee264938cdf4e0.tar.gz
ayatana-indicator-datetime-a705cb47912f6785a3dda0f67eee264938cdf4e0.tar.bz2
ayatana-indicator-datetime-a705cb47912f6785a3dda0f67eee264938cdf4e0.zip
add translator comments for the date format string in snap.cpp
-rw-r--r--src/snap.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/snap.cpp b/src/snap.cpp
index b3368a1..c2cbc0a 100644
--- a/src/snap.cpp
+++ b/src/snap.cpp
@@ -94,7 +94,16 @@ public:
b.add_hint (uin::Builder::HINT_TINT);
b.add_hint (uin::Builder::HINT_NONSHAPEDICON);
- const auto timefmt = is_locale_12h() ? _("%a, %l:%M %p") : _("%a, %H:%M");
+ const char * timefmt;
+ if (is_locale_12h()) {
+ /** strftime(3) format for abbreviated weekday,
+ hours, minutes in a 12h locale; e.g. Wed, 2:00 PM */
+ timefmt = _("%a, %l:%M %p");
+ } else {
+ /** A strftime(3) format for abbreviated weekday,
+ hours, minutes in a 24h locale; e.g. Wed, 14:00 */
+ timefmt = _("%a, %H:%M");
+ }
const auto timestr = appointment.begin.format(timefmt);
auto title = g_strdup_printf(_("Alarm %s"), timestr.c_str());
b.set_title (title);