GNOME Bugzilla – Bug 696497
Mix of ':' (U+003A COLON) and '∶' (U+2236 RATIO) in time format
Last modified: 2014-05-30 12:33:36 UTC
Created attachment 239687 [details] Screenshot showing the problem Time formats with %R have a mix of ':' (U+003A COLON) and '∶' (U+2236 RATIO). %R is same as %H:%M. The separator is not U+2236 RATIO but U+003A COLON. I attached a screenshot which show the problem. Please refere to it.
Created attachment 239688 [details] [review] wall-clock: Do not use colon in time format I replaced %R with %H∶%M. The separator is U+2236 RATIO.
Review of attachment 239688 [details] [review]: Makes sense to me.
Review of attachment 239688 [details] [review]: Makes sense to me. Will have to wait until after string freeze
Review of attachment 239688 [details] [review]: The ratio character should only be used for ratios, as it has funny effects with RTL languages, and isn't the one usually used in time displays.
I reverted all the changes related to using the ratio character to time in master. I'm pretty sure we'll see problems with the use of the ratio in RTL locales.
Created attachment 239742 [details] screenshot from gtk+ wall clock test 11:50 AM in Arabic.
It is not clear to me how a character or another can break rtl... That said, whatever we choose the decision also affects other modules, in particular gnome-clocks and libgweather
I'll add that, ISO 8601 uses the colon as the separator between units: http://en.wikipedia.org/wiki/ISO_8601 And so do the 12-hour and 24-hour clocks: http://en.wikipedia.org/wiki/12-hour_clock http://en.wikipedia.org/wiki/24-hour_clock So it's not just that I "don't like it", it's the wrong separator to use. (In reply to comment #8) > It is not clear to me how a character or another can break rtl... The string isn't detected as something that shouldn't change direction, so it does. > That said, whatever we choose the decision also affects other modules, in > particular gnome-clocks and libgweather I'm pretty sure it would affect gnome-shell too.
The technical difference is that colon is classified for bidi purposes as CS while ratio is ON. I don't think wikipedia gets to decide how we format our times. Neither do you, for that matter: its a translatable string, so the translators get to decide. Here is a proposal: we keep the colon in the msgid, and use ratio in translations. Translations in LTR languages can just use it as is, translations in RTL languages will have to either revert to using colon, or insert a RLM.
Changing back to : in msgid would break all translations, so it is not something we can easily do in 3.8; it would have to be done with at least some po file munging
(In reply to comment #10) > The technical difference is that colon is classified for bidi purposes as CS > while ratio is ON. > > I don't think wikipedia gets to decide how we format our times. They get to be used as a reference. > Neither do you, for that matter: its a translatable string, so the translators > get to decide. If there are translators for those languages, and if the string is translated. > Here is a proposal: we keep the colon in the msgid, and use ratio in > translations. Translations in LTR languages can just use it as is, translations > in RTL languages will have to either revert to using colon, or insert a RLM. That only involves changing the translator comments on master. On gnome-3-8, somebody will need to come up with a good way to munge the po files, or we could simply e-mail gnome-i18n, and mention the problem, and add the solution to translator comments again.
What's the status here? I am a bit confused what should I do in clocks... should I roll back to plain colon? should I add translation comments? I am fine with either, but I care that we are consistent... Reading the comments above I was under the impression that we kept utf8 and fixed the translations, but at the same time I am on F19 and the shell clock seems to use a plain :
Has any progress been achieved here? What is the current status of this bug report? What is the recommended and the official way to proceed in this case? The similar issue hits gnome-clocks as well, see bug 699681
well, inserting a left-to-right mark seems to fix the issue in general, so no localization procedure(marking string for translation) is needed at all one of the possible solutions is: "%H\xE2\x88\xB6\xE2\x80\x8E%M" where left-to-right mark: \xE2\x80\x8E ration: \xE2\x88\xB6
Despite revert in the code to the colon character, translators still use the centralized character (ratio) for the string format. For example for english, please refer: https://git.gnome.org/browse/gnome-desktop/tree/po/en.po
Created attachment 249789 [details] mixed use of RATIO and COLON in ther current 3.8 release
Created attachment 249790 [details] [review] world-clock: Replace COLON with the RATIO prepended with LTR mark. To simplify the translation process the COLON character should be used by the translators in combination with the %R format. The COLON character is replaced afterwards in the code with the RATIO character, which is prepended with the LTR mark, to fix the time representation in the RTL languages. In LTR languages it has not effect. The COLON replacement can be deactivated with the "clock-replace-colon" dconf option due to the compatibility with the fonts, which do not have a RATIO character.
Created attachment 249791 [details] [review] new dconf option
Created attachment 249792 [details] screenshot: gtk+ sample of the new string format for hebrew and german
Created attachment 249794 [details] source code of the test case
We fixed this in bug 726232, along with a test suite to avoid regressions. Please check that this works for you in all the aforementioned locales, otherwise reopen and we'll update the test suite to match. *** This bug has been marked as a duplicate of bug 726232 ***