GNOME Bugzilla – Bug 699681
gnome-clocks shows time incorrectly in RTL languages
Last modified: 2013-09-02 22:27:44 UTC
Created attachment 243306 [details] screenshot In Hebrew, gnome-clocks shows the minutes before the hours. In the screenshot, it shows 41:21 instead of 21:41. There is no bug when viewing the settings in gnome-control-center. I am using git master. OS: Arch Linux
Created attachment 243307 [details] gnome-control-center screenshot
(In reply to comment #0) > Created an attachment (id=243306) [details] > screenshot > > In Hebrew, gnome-clocks shows the minutes before the hours. > In the screenshot, it shows 41:21 instead of 21:41. > > There is no bug when viewing the settings in gnome-control-center. > > I am using git master. > OS: Arch Linux thank you for reporting the issue. It's already a known one, see https://bugzilla.gnome.org/show_bug.cgi?id=696497#c5 for more details. I can give you a workaround patch, you can try out, which will not probably go upstream, but you can apply it locally, till this issue is officially resolved.
Created attachment 243787 [details] [review] workaround patch: using a ":"
Also see bug / patch in bug 703569
One solution I have tried successfully to show the time in RTL language correctly is to mark it for translation and then to replace it by the real ":" character, as was suggested by Matthias Clasen https://bugzilla.gnome.org/show_bug.cgi?id=696497#c10 diff --git a/src/utils.vala b/src/utils.vala index 3f5ea1d..61e07b7 100644 --- a/src/utils.vala +++ b/src/utils.vala @@ -126,7 +126,7 @@ 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"); + return date_time.format (format == Format.TWELVE ? _("%I∶%M %p") : _("%H∶%M")); } } and this works. however I have doubts if it's a good solution. Can the RTL marks or whatever be just straightforward inserted without needing to mark the corresponding string for translation?