GNOME Bugzilla – Bug 745111
The 24h time format in the world's clocks is reverse in RTL
Last modified: 2015-03-04 12:56:09 UTC
See the screenshot. The time in the left-bottom side of the calendar is reverse. Note: the time format in the notif (right-top side) is ok. I played with the string in the .po file, and nothing :-/
Created attachment 297802 [details] Screenshot
See bug #745120.
Created attachment 297929 [details] [review] util: Add formatTime() helper method Displaying a time is more complex than it appears at first glance: it should respect the user's choice regarding 12- our 24-hour format (but only when supported by the locale) and follow the LC_TIME rather than the LC_MESSAGES setting. So rather than getting it more or less right in various places, it makes sense to defer to a helper method which hopefully does the right thing. The method added by this patch is based on _formatTimestamp in telepathyClient with some minor tweaks: - there's an additional params parameter which allows enforcing a time-only format, even on dates other than the current one - only a single desktop settings object is created and shared between invocations
Created attachment 297930 [details] [review] Use formatTime() for timestamps Replace the time formatting in notifications and events with the new utility method - this makes sure that all times are now following the clock-format setting and use LC_TIME.
Created attachment 297931 [details] [review] util: Use GLib.DateTime in formatTime() The world clock uses GLib.DateTime instead of the built-in Date type because of the much superior timezone support, and therefore cannot use the new formatTime() helper. To make this possible, modify the method to support a parameter of either type.
Created attachment 297932 [details] [review] dateMenu: Use formatTime() for world clock
Created attachment 297933 [details] [review] util: Add createTimeLabel() On locales that support it, time formats should follow the 12-hour/24-hour preference, which implies that they should be updated when the setting changes. So add another utility method which creates a label for a specific time and keeps it in sync with the format setting.
Created attachment 297934 [details] [review] Use createTimeLabel() where appropriate
Review of attachment 297929 [details] [review]: LG.
Review of attachment 297930 [details] [review]: LG.
Review of attachment 297931 [details] [review]: OK.
Review of attachment 297932 [details] [review]: OK.
Review of attachment 297933 [details] [review]: OK.
Review of attachment 297934 [details] [review]: LG.
Attachment 297929 [details] pushed as ebf1327 - util: Add formatTime() helper method Attachment 297930 [details] pushed as 1c36ade - Use formatTime() for timestamps Attachment 297931 [details] pushed as 60f6715 - util: Use GLib.DateTime in formatTime() Attachment 297932 [details] pushed as 39fd7b9 - dateMenu: Use formatTime() for world clock Attachment 297933 [details] pushed as 8f424e7 - util: Add createTimeLabel() Attachment 297934 [details] pushed as d850593 - Use createTimeLabel() where appropriate