[gnome-clocks] Fix time representation in RTL languages



commit 0c08f0337ef08fa622d335fa291d88d6bfd862a2
Author: Evgeny Bobkin <evgen ibqn gmail com>
Date:   Wed Jul 17 14:24:05 2013 +0200

    Fix time representation in RTL languages
    
    Replace the RATIO and THIN SPACE charecters by their hex representation.
    To display the order of hours and minutes correctly the LTR mark was
    inserted before the RATIO character.
    https://bugzilla.gnome.org/show_bug.cgi?id=703569

 src/utils.vala |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/utils.vala b/src/utils.vala
index 3f5ea1d..8a0eb90 100644
--- a/src/utils.vala
+++ b/src/utils.vala
@@ -125,8 +125,10 @@ public class WallClock : Object {
     }
 
     public string format_time (GLib.DateTime date_time) {
-        // Note that the format uses unicode RATIO and THIN SPACE characters
-        return date_time.format (format == Format.TWELVE ? "%I∶%M %p" : "%H∶%M");
+        // Note that the format uses unicode RATIO ("∶" \xE2\x88\xB6 or "\u2236")
+        // prepended by the LTR mark(\xE2\x80\x8E or "\u200E") and
+        // THIN SPACE(\xE2\x80\x89 or "\u2009") characters
+        return date_time.format (format == Format.TWELVE ? "%I\xE2\x80\x8E\xE2\x88\xB6%M\xE2\x80\x89%p" : 
"%H\xE2\x80\x8E\xE2\x88\xB6%M");
     }
 }
 


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