[Xfce4-commits] <postler:master> Don't display seconds in message times

Christian Dywan noreply at xfce.org
Wed Jul 20 23:16:01 CEST 2011


Updating branch refs/heads/master
         to 25fc2958f078051bac8d71362c67a47dc932de07 (commit)
       from 0bc92512f1405d6e9f7af2398e2f5ef2142ed938 (commit)

commit 25fc2958f078051bac8d71362c67a47dc932de07
Author: Christian Dywan <christian at twotoasts.de>
Date:   Wed Jul 20 23:07:34 2011 +0200

    Don't display seconds in message times
    
    Fixes: https://bugs.launchpad.net/postler/+bug/741802

 postler/postler-content.vala |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/postler/postler-content.vala b/postler/postler-content.vala
index 0f8079b..d28d6c5 100644
--- a/postler/postler-content.vala
+++ b/postler/postler-content.vala
@@ -420,16 +420,18 @@ public class Postler.Content : WebKit.WebView {
 
     internal static string format_date (DateTime the_time) {
         var now = new DateTime.now_local ();
+        /* i18n: strftime format for hour and minute */
+        string pretty_time = " " + the_time.format (_("%I:%M %P"));
         if (the_time.get_day_of_month () == now.get_day_of_month ())
-            return _("Today") + the_time.format (" %X");
+            return _("Today") + pretty_time;
         if (the_time.get_day_of_year () == now.get_day_of_year () - 1)
-            return _("Yesterday") + the_time.format (" %X");
+            return _("Yesterday") + pretty_time;
         if (the_time.get_year () == now.get_year ()) {
             /* i18n: strftime format for full month name and day number */
-            return the_time.format (_("%B %e") + (" %X"));
+            return the_time.format (_("%B %e")) + pretty_time;
         }
         /* i18n: strftime format for full month name, day number and year */
-        return the_time.format (_("%B %e, %Y") + (" %X"));
+        return the_time.format (_("%B %e, %Y")) + pretty_time;
     }
 
     internal static DateTime date_from_string (string date) {



More information about the Xfce4-commits mailing list