[gnome-logs/wip/empty-listbox] Make timestamp translatable



commit 763569cc598fafcb69abd5d1eea921f033f4dcad
Author: David King <davidk gnome org>
Date:   Mon Oct 28 16:15:32 2013 +0000

    Make timestamp translatable

 po/POTFILES.in |    1 +
 src/gl-util.c  |   11 ++++++++---
 2 files changed, 9 insertions(+), 3 deletions(-)
---
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 96463e0..7cfceb7 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -4,3 +4,4 @@
 data/gnome-logs.desktop.in
 src/gl-application.c
 src/gl-eventview.c
+src/gl-util.c
diff --git a/src/gl-util.c b/src/gl-util.c
index cd46199..bc28b71 100644
--- a/src/gl-util.c
+++ b/src/gl-util.c
@@ -18,6 +18,8 @@
 
 #include "gl-util.h"
 
+#include <glib/gi18n.h>
+
 void
 gl_util_on_css_provider_parsing_error (GtkCssProvider *provider,
                                        GtkCssSection *section,
@@ -53,12 +55,15 @@ gl_util_timestamp_to_display (guint64 microsecs,
 
     switch (format)
     {
-        /* TODO: Make translatable? */
         case GL_UTIL_CLOCK_FORMAT_12HR:
-            time = g_date_time_format (local, "%l:%M:%S %p");
+            /* Translators: timestamp format for events on the current day,
+             * showing the time (including seconds) in 12-hour format. */
+            time = g_date_time_format (local, _("%l:%M:%S %p"));
             break;
         case GL_UTIL_CLOCK_FORMAT_24HR:
-            time = g_date_time_format (local, "%T");
+            /* Translators: timestamp format for events on the current day,
+             * showing the time (including seconds) in 24-hour format. */
+            time = g_date_time_format (local, _("%T"));
             break;
         default:
             g_assert_not_reached ();


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]