In Hebrew environment, clock is reversed: minutes are shown before hours

Bug #1900263 reported by Yotam Benshalom
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gnome-desktop
Expired
Medium
gnome-desktop3 (Ubuntu)
Fix Released
High
Unassigned
language-pack-gnome-he (Ubuntu)
Fix Released
High
Unassigned

Bug Description

* Impact

Ubuntu 20.10, normal gnome session.
After recent updates, using right-to-left environment, such as Hebrew, the clock on top of the screen shows the time in reverse.
For example, instead of showing 17:59,it shows 59:17.
See attached screenshot.

* Test case
- install the hebrew language packs
- select the locale
- restart the session

the clock on the top panel should display the hours on the left

* Regression potential

Check the clock in some of the other gnome-desktop API users (gnome-clocks, gnome-control-center, etc)

------------------

ProblemType: Bug
DistroRelease: Ubuntu 20.10
Package: gnome-shell 3.38.1-1ubuntu1
ProcVersionSignature: Ubuntu 5.8.0-23.24-generic 5.8.14
Uname: Linux 5.8.0-23-generic x86_64
NonfreeKernelModules: nvidia_modeset nvidia
ApportVersion: 2.20.11-0ubuntu50
Architecture: amd64
CasperMD5CheckResult: skip
CurrentDesktop: GNOME
Date: Sat Oct 17 19:02:30 2020
DisplayManager: gdm3
InstallationDate: Installed on 2018-09-05 (773 days ago)
InstallationMedia: Ubuntu 18.10 "Cosmic Cuttlefish" - Alpha amd64 (20180822)
RelatedPackageVersions: mutter-common 3.38.1-1ubuntu1
SourcePackage: gnome-shell
UpgradeStatus: Upgraded to groovy on 2020-09-17 (30 days ago)

Revision history for this message
In , matanya moses (matanya) wrote :

Hello,

I have installed gnome-clocks and got this:

https://commons.wikimedia.org/wiki/File:RTL_bug_in_gnome.png

How to reproduce:

1) choose a hebrew locale in the gnome lang setting
2) install gnome-clocks
3) create a new world clock
4) see if it looks like: https://commons.wikimedia.org/wiki/File:RTL_bug_in_gnome.png

and a bonus:

order of cityname and country are also wrong.

Revision history for this message
In , Andre Klapper (a9016009) wrote :

and I can confirm this in 3.8.

Revision history for this message
In , Evgen (ibqn) wrote :

Thank you for reporting it, however this issue is well known already, in other words, this bug is a duplicate of https://bugzilla.gnome.org/show_bug.cgi?id=699681

moreover the bug report I am referring to is a duplicate of another one, see https://bugzilla.gnome.org/show_bug.cgi?id=699681#c2 for more details))

the bonus you mentioned however should be fixed by us))

Revision history for this message
In , Jiro Matsuzawa (jmatsuzawa) wrote :

Created attachment 248383
world: Fix location order issue in RTL lang

I wrapped the string of location info with the gettext funciton. Now translators can change the order of a city name and a nation name.

Revision history for this message
In , Paolo-borelli (paolo-borelli) wrote :

Review of attachment 248383:

Makes sense, but I guess it needs a translator comment

Revision history for this message
In , Andre Klapper (a9016009) wrote :
Revision history for this message
In , Evgen (ibqn) wrote :

(In reply to comment #2)
> Thank you for reporting it, however this issue is well known already, in other
> words, this bug is a duplicate of
> https://bugzilla.gnome.org/show_bug.cgi?id=699681
>
> moreover the bug report I am referring to is a duplicate of another one, see
> https://bugzilla.gnome.org/show_bug.cgi?id=699681#c2 for more details))
>
> the bonus you mentioned however should be fixed by us))
 I changed my mind)) I have tried this patches, like "%s, %s" and "%1$s, %2%s"
and even tried to translate the string. And I must say, I do not see any visible change. If both city and country names are localized the displayed order is correct, other wise it looks like it looks. The only solution I see, is to translate the remaining city names into Hebrew.

Revision history for this message
In , Evgen (ibqn) wrote :

Created attachment 248400
screenshot: clock in bottom, right stays for berlin, germany is on correct order. am I right?

Revision history for this message
In , matanya moses (matanya) wrote :

yes, you are. if both are hebrew it is ok, the problem is only with mixed RTL and LTR.

Revision history for this message
In , Jiro Matsuzawa (jmatsuzawa) wrote :

Hi Evgeny and matanya,

I might have misunderstood you. Reading Evgeny's mail [1], I understood that you were concerned about the order of a city and a nation. But I want to make it more clear what is the main point of this report. Is it the order of TIME, not that of a city and a nation? If you say both of them have a problem, you can file each problem as different bugs.

[1] https://mail.gnome.org/archives/gnome-i18n/2013-July/msg00001.html

Revision history for this message
In , Paolo-borelli (paolo-borelli) wrote :

As far as I can tell the problem with time is tracked in 699681

The problem with the city name is not a bug, it is a problem when the translation of libgweather is incomplete. I do not think we can fix it

Revision history for this message
In , Evgen (ibqn) wrote :

(In reply to comment #10)
> As far as I can tell the problem with time is tracked in 699681
>
> The problem with the city name is not a bug, it is a problem when the
> translation of libgweather is incomplete. I do not think we can fix it

I thought the same all the time, but I have investigated a little bit and have discovered, that the city names are actually very well translated, and it turned out to be a real bug 704021 in libgweather, it is due to serialization and inability of the libgweather to output the name of the location properly ((

I mean it only respects the locale settings once at runtime, and all other changes via GLib.Intl.setlocale are ignored.

Revision history for this message
In , Evgen (ibqn) wrote :

To solve the time issue, I suggest just to use the left-to-right mark!

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. In LTR languages it is just ignored. For the RTL languages is fixes the issue.

one of the possible solutions is: "%H\xE2\x88\xB6\xE2\x80\x8E%M"

where

left-to-right mark: \xE2\x80\x8E
ratio character: \xE2\x88\xB6

Revision history for this message
In , Evgen (ibqn) wrote :

Created attachment 249401
patch proposal

Revision history for this message
In , Paolo-borelli (paolo-borelli) wrote :

I like this approach, make sure to update the comment too to reflect the reason why we are adding these character before committing

Revision history for this message
In , Jiro Matsuzawa (jmatsuzawa) wrote :

Thank you for the patch. But as you know, gnome-desktop has replaced "∶" (U+2236 RATIO) with ":" (U+003A COLON) [1][2], and that approach will fix the time format problem for gnome-clock, too. I think it would be better because of 1. consistency with the desktop environment, 2.clearness for translators. What do you think?

[1]https://git.gnome.org/browse/gnome-desktop/commit/?id=a14c4fd24c30b5eb38fa3f93bb0938dc187941e9
[2]https://bugzilla.gnome.org/show_bug.cgi?id=696497

Revision history for this message
In , Evgen (ibqn) wrote :

I think this change made in gnome-desktop by Bastien Nocera was not authorized by the design-team, so we would ask them, and probably fix it in gnome-desktop as well. Therefore, I think this was a temporary solution. As you can see the bug report you have mentioned here, which is also mentioned in comment 2 is still opened and the final decision was not taken.

As far as I know the U+2236 RATIO character should be used, because it just looks better. on my android smartphone the centralized colon is used as well.

Allan, what do you say?

Revision history for this message
In , Evgen (ibqn) wrote :

Created attachment 249806
patch proposal for time representation

Revision history for this message
In , Evgen (ibqn) wrote :

Created attachment 249808
screenshot: gnome-clocks with hebrew locale

Revision history for this message
In , Evgen (ibqn) wrote :

(In reply to comment #15)
> Thank you for the patch. But as you know, gnome-desktop has replaced "∶"
> (U+2236 RATIO) with ":" (U+003A COLON) [1][2], and that approach will fix the
> time format problem for gnome-clock, too. I think it would be better because of
> 1. consistency with the desktop environment,
I have talked with Bastien, and the idea in the gnome-desktop is to use ":" colon for the strings marked for translations there, so the translators simply do not need to deal with ratio and can use %R format. and afterwards in the code it will be replaced by the ratio character pretended by the LTR mark. It is still used as you can observe https://git.gnome.org/browse/gnome-desktop/tree/po/en.po#n40

2.clearness for translators.
gnome-desktop will probably follow the above mentioned approach. and in the case of gnome-clocks this string is not markd at all for transtation.
> What
> do you think?
>
> [1]https://git.gnome.org/browse/gnome-desktop/commit/?id=a14c4fd24c30b5eb38fa3f93bb0938dc187941e9
> [2]https://bugzilla.gnome.org/show_bug.cgi?id=696497

Revision history for this message
Yotam Benshalom (benshalom) wrote :
summary: - In RTL environment, clock shows minutes before hours
+ In RTL environment, clock is reversed: minutes are shown before hours
Revision history for this message
Daniel van Vugt (vanvugt) wrote : Re: In RTL environment, clock is reversed: minutes are shown before hours

I think it's the 'gnome-desktop' package that implements the general clock that gnome-shell uses.

affects: gnome-shell (Ubuntu) → gnome-desktop3 (Ubuntu)
Revision history for this message
Sebastien Bacher (seb128) wrote :

Indeed, that's a translation issue and has been fixed upstream in that commit
https://gitlab.gnome.org/GNOME/gnome-desktop/-/commit/4db3e5d9

Changed in gnome-desktop3 (Ubuntu):
importance: Undecided → High
status: New → Fix Committed
tags: added: fixed-in-3.38.2 fixed-upstream
summary: - In RTL environment, clock is reversed: minutes are shown before hours
+ In Hebrew environment, clock is reversed: minutes are shown before hours
Revision history for this message
Sebastien Bacher (seb128) wrote :

Could you try if installing that deb fixes the issue for you?

Revision history for this message
Yotam Benshalom (benshalom) wrote :

Yes, after installing the package and restarting gnome-shell the issue was fixed.

Changed in language-pack-gnome-he (Ubuntu):
importance: Undecided → High
status: New → Fix Committed
description: updated
Revision history for this message
Sebastien Bacher (seb128) wrote :

Thanks for confirming, I uploaded the change now and it got accepted so should be in before release

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package language-pack-gnome-he - 1:20.10+20201015build1

---------------
language-pack-gnome-he (1:20.10+20201015build1) groovy; urgency=medium

  * Backport a fix for clocks being displayed reversed (lp: #1900263)

 -- Sebastien Bacher <email address hidden> Tue, 20 Oct 2020 10:23:17 +0200

Changed in language-pack-gnome-he (Ubuntu):
status: Fix Committed → Fix Released
Changed in gnome-desktop:
importance: Unknown → Medium
status: Unknown → Confirmed
Changed in gnome-desktop3 (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Yotam Benshalom (benshalom) wrote :

This bug returned in the development version.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Sounds like a new bug in the language-pack-gnome-he package of 21.04. Since we've already used that package here we'll need a new bug opened. Please run:

  ubuntu-bug language-pack-gnome-he

Or if that doesn't work then just go to https://bugs.launchpad.net/ubuntu/+source/language-pack-gnome-he/+filebug and mention the new bug ID here.

Revision history for this message
Yotam Benshalom (benshalom) wrote :

Reported as bug #1914525.

Revision history for this message
In , Andre Klapper (a9016009) wrote :

GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org.
As part of that, we are mass-closing older open tickets in bugzilla.gnome.org
which have not seen updates for a longer time (resources are unfortunately
quite limited so not every ticket can get handled).

If you can still reproduce the situation described in this ticket in a recent
and supported software version, then please follow
  https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines
and create a new enhancement request ticket at
  https://gitlab.gnome.org/GNOME/gnome-clocks/-/issues/

Thank you for your understanding and your help.

Changed in gnome-desktop:
status: Confirmed → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.