[bijiben] dateTime: add gettext for last udpated strings



commit dae54ff03f755f24d32dd186b5f1d9afc0dcc584
Author: Pierre-Yves Luyten <py luyten fr>
Date:   Wed Jan 2 00:56:17 2013 +0100

    dateTime: add gettext for last udpated strings

 po/POTFILES.in               |    1 +
 src/libbiji/biji-date-time.c |   14 ++++++++------
 2 files changed, 9 insertions(+), 6 deletions(-)
---
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 27fc295..cf11e12 100755
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -6,4 +6,5 @@ src/bjb-main-toolbar.c
 src/bjb-note-view.c
 src/bjb-selection-toolbar.c
 src/bjb-settings.c
+src/libbiji/biji-date-time.c
 [type: gettext/glade]src/resources/app-menu.ui
diff --git a/src/libbiji/biji-date-time.c b/src/libbiji/biji-date-time.c
index 05e289d..a049cd8 100644
--- a/src/libbiji/biji-date-time.c
+++ b/src/libbiji/biji-date-time.c
@@ -14,6 +14,8 @@
  * You should have received a copy of the GNU General Public License along
  * with this program.  If not, see <http://www.gnu.org/licenses/>.*/
 
+#include <glib/gi18n.h>
+
 #include "biji-date-time.h"
 
 gchar *
@@ -27,19 +29,19 @@ biji_get_time_diff_with_time (glong sec_since_epoch)
   diff = (now.tv_sec - sec_since_epoch) / 86400 ;
 
   if (diff < 1)
-    return "Today";
+    return _("Today");
 
   if (diff < 2)
-    return "Yesterday";
+    return _("Yesterday");
 
   if (diff < 7)
-    return "This week";
+    return _("This week");
 
   if (diff < 30)
-    return "This month";
+    return _("This month");
 
   if (diff < 365)
-    return "This year";
+    return _("This year");
 
-  return "Unknown";
+  return _("Unknown");
 }



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