After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 696497 - Mix of ':' (U+003A COLON) and '∶' (U+2236 RATIO) in time format
Mix of ':' (U+003A COLON) and '∶' (U+2236 RATIO) in time format
Status: RESOLVED DUPLICATE of bug 726232
Product: gnome-desktop
Classification: Core
Component: libgnome-desktop
3.9.x
Other Linux
: Normal normal
: ---
Assigned To: Desktop Maintainers
Desktop Maintainers
3.10
Depends on:
Blocks: 699325
 
 
Reported: 2013-03-24 16:31 UTC by Jiro Matsuzawa
Modified: 2014-05-30 12:33 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Screenshot showing the problem (427.94 KB, image/png)
2013-03-24 16:31 UTC, Jiro Matsuzawa
  Details
wall-clock: Do not use colon in time format (2.00 KB, patch)
2013-03-24 17:06 UTC, Jiro Matsuzawa
rejected Details | Review
screenshot from gtk+ wall clock test (1.58 KB, image/png)
2013-03-25 10:40 UTC, Bastien Nocera
  Details
mixed use of RATIO and COLON in ther current 3.8 release (40.45 KB, image/png)
2013-07-22 11:46 UTC, Evgeny Bobkin
  Details
world-clock: Replace COLON with the RATIO prepended with LTR mark. (2.34 KB, patch)
2013-07-22 12:02 UTC, Evgeny Bobkin
none Details | Review
new dconf option (1.60 KB, patch)
2013-07-22 12:09 UTC, Evgeny Bobkin
none Details | Review
screenshot: gtk+ sample of the new string format for hebrew and german (92.22 KB, image/png)
2013-07-22 12:14 UTC, Evgeny Bobkin
  Details
source code of the test case (787 bytes, application/x-compressed-tar)
2013-07-22 12:40 UTC, Evgeny Bobkin
  Details

Description Jiro Matsuzawa 2013-03-24 16:31:10 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.
Comment 1 Jiro Matsuzawa 2013-03-24 17:06:38 UTC
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.
Comment 2 Matthias Clasen 2013-03-24 20:29:15 UTC
Review of attachment 239688 [details] [review]:

Makes sense to me.
Comment 3 Matthias Clasen 2013-03-24 20:29:39 UTC
Review of attachment 239688 [details] [review]:

Makes sense to me. Will have to wait until after string freeze
Comment 4 Matthias Clasen 2013-03-24 20:29:48 UTC
Review of attachment 239688 [details] [review]:

Makes sense to me. Will have to wait until after string freeze
Comment 5 Bastien Nocera 2013-03-25 10:27:49 UTC
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.
Comment 6 Bastien Nocera 2013-03-25 10:36:20 UTC
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.
Comment 7 Bastien Nocera 2013-03-25 10:40:48 UTC
Created attachment 239742 [details]
screenshot from gtk+ wall clock test

11:50 AM in Arabic.
Comment 8 Paolo Borelli 2013-03-25 11:03:25 UTC
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
Comment 9 Bastien Nocera 2013-03-25 11:15:44 UTC
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.
Comment 10 Matthias Clasen 2013-03-25 11:49:34 UTC
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.
Comment 11 Matthias Clasen 2013-03-25 11:51:41 UTC
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
Comment 12 Bastien Nocera 2013-03-25 12:38:07 UTC
(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.
Comment 13 Paolo Borelli 2013-05-10 13:58:39 UTC
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 :
Comment 14 Evgeny Bobkin 2013-07-17 08:41:08 UTC
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
Comment 15 Evgeny Bobkin 2013-07-17 12:08:35 UTC
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
Comment 16 Evgeny Bobkin 2013-07-22 11:43:56 UTC
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
Comment 17 Evgeny Bobkin 2013-07-22 11:46:42 UTC
Created attachment 249789 [details]
mixed use of RATIO and COLON in ther current 3.8 release
Comment 18 Evgeny Bobkin 2013-07-22 12:02:37 UTC
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.
Comment 19 Evgeny Bobkin 2013-07-22 12:09:30 UTC
Created attachment 249791 [details] [review]
new dconf option
Comment 20 Evgeny Bobkin 2013-07-22 12:14:48 UTC
Created attachment 249792 [details]
screenshot: gtk+ sample of the new string format for hebrew and german
Comment 21 Evgeny Bobkin 2013-07-22 12:40:07 UTC
Created attachment 249794 [details]
source code of the test case
Comment 22 Bastien Nocera 2014-05-30 12:33:36 UTC
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 ***