Bug 1353723 - Apps are not properly localized according to user configured locale
Summary: Apps are not properly localized according to user configured locale
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: gnome-session
Version: 24
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Ray Strode [halfline]
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-07-07 20:06 UTC by Milan Zink
Modified: 2017-02-04 10:42 UTC (History)
9 users (show)

Fixed In Version: gnome-session-3.20.2-1.fc24
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-07-15 21:25:52 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Example with gnome-weather app (4.64 MB, application/x-gzip)
2016-07-07 20:06 UTC, Milan Zink
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1353953 0 unspecified CLOSED session DBus is shared, breaking lots of Gnome applications 2021-02-22 00:41:40 UTC

Internal Links: 1353953

Description Milan Zink 2016-07-07 20:06:40 UTC
Created attachment 1177441 [details]
Example with gnome-weather app

Description of problem:

Some apps are not properly localized according to user configured locale 


Version-Release number of selected component (if applicable):

Fedora 24


How reproducible:

Install fedora with en_US locale, create another user and set cs_CZ (czech) locale

Steps to Reproduce:

1. log into gnome as user with cs_CZ locale (verify with locale command in terminal). System locale is set to en_US (verify with localectl)
$ locale
LANG=cs_CZ.UTF-8
LC_CTYPE="cs_CZ.UTF-8"
LC_NUMERIC=cs_CZ.UTF-8
LC_TIME=cs_CZ.UTF-8
LC_COLLATE="cs_CZ.UTF-8"
LC_MONETARY=cs_CZ.UTF-8
LC_MESSAGES="cs_CZ.UTF-8"
LC_PAPER=cs_CZ.UTF-8
LC_NAME="cs_CZ.UTF-8"
LC_ADDRESS="cs_CZ.UTF-8"
LC_TELEPHONE="cs_CZ.UTF-8"
LC_MEASUREMENT=cs_CZ.UTF-8
LC_IDENTIFICATION="cs_CZ.UTF-8"
LC_ALL=

$ localectl 
   System Locale: LANG=en_US.UTF-8
       VC Keymap: us
      X11 Layout: us,cz
     X11 Variant: ,qwerty


2. launch gnome-weather app from gnome shell (Super + search app) - app is localized in english!

3. launch gnome-weather app from terminal or via gnome-shell command (Alf+F2) - app is localized to czech language!


Actual results:

gnome-maps, gnome-weather, gnome-terminal, cheese, gnome-boxes are not properly localized if launched directly from gnome-shell (maybe there are more apps)


Expected results:

All apps should be localized to user set locale


Additional info:

Apps seems to be using system value (from localectl) instead. Tested also different setup with system locale = cs_CZ.UTF-8 and user locale = en_US.UTF-8. Result were the same apps were localized to czech (system) instead of en_US (user defined).

Comment 1 Florian Müllner 2016-07-08 10:00:46 UTC
(In reply to Milan Zink from comment #0)
> 2. launch gnome-weather app from gnome shell (Super + search app) - app is
> localized in english!
> 
> 3. launch gnome-weather app from terminal or via gnome-shell command
> (Alf+F2) - app is localized to czech language!

The difference between (2) and (3) is that .desktop files are launched via DBus (instead of the command specified in the Exec) line when supported by the application. So my guess is that in the case of (2), the application is launched with the locale settings that were active when dbus-daemon was launched - that's clearly a bug, but I'm not quite sure where in the stack this needs to address. Moving to gnome-session for now, which is responsible to launch the different session components.

Comment 2 Milan Zink 2016-07-08 11:03:58 UTC
(In reply to Florian Müllner from comment #1)
> (In reply to Milan Zink from comment #0)
> > 2. launch gnome-weather app from gnome shell (Super + search app) - app is
> > localized in english!
> > 
> > 3. launch gnome-weather app from terminal or via gnome-shell command
> > (Alf+F2) - app is localized to czech language!
> 
> The difference between (2) and (3) is that .desktop files are launched via
> DBus (instead of the command specified in the Exec) line when supported by
> the application. So my guess is that in the case of (2), the application is
> launched with the locale settings that were active when dbus-daemon was
> launched - that's clearly a bug, but I'm not quite sure where in the stack
> this needs to address. Moving to gnome-session for now, which is responsible
> to launch the different session components.

I agree, this is probably dbus related. Made some additional tests. Starting (properly localized) gnome-terminal works only with Alt+F2 'dbus-launch gnome-terminal'.

Comment 3 Michael Catanzaro 2016-07-09 19:16:57 UTC
Could this perhaps be fixed by https://bugzilla.gnome.org/show_bug.cgi?id=766176?

Comment 4 Florian Müllner 2016-07-10 16:04:36 UTC
(In reply to Michael Catanzaro from comment #3)
> Could this perhaps be fixed by
> https://bugzilla.gnome.org/show_bug.cgi?id=766176?

Quite possibly - the patches from that bug or on the gnome-3-20 branch, but not in any released 3.20.x tarball. I've done a gnome-session scratch-build at http://koji.fedoraproject.org/koji/taskinfo?taskID=14848988, if anyone can confirm that it fixes the issue, I'll file an update ...

Comment 5 Michael Catanzaro 2016-07-10 17:50:22 UTC
I tested your scratch build using en_US.UTF-8 system locale and es_ES.UTF-8 session locale. It fixes nautilus, gedit, and Boxes. We should ask Ray to do another 3.20 release for this, since other distros will want this fix as well.

Unfortunately it does not fix gnome-terminal, which still uses English regardless -- something else must be wrong there.

Comment 6 Milan Zink 2016-07-11 08:38:29 UTC
(In reply to Michael Catanzaro from comment #5)
> I tested your scratch build using en_US.UTF-8 system locale and es_ES.UTF-8
> session locale. It fixes nautilus, gedit, and Boxes. We should ask Ray to do
> another 3.20 release for this, since other distros will want this fix as
> well.
> 
> Unfortunately it does not fix gnome-terminal, which still uses English
> regardless -- something else must be wrong there.

There's something special with gnome-terminal. Other apps (like gnome-weather for example) can be launched localized from terminal via 'LANGUAGE=cs_CZ.UTF-8 <binary>', but this doesn't work for gnome-terminal. Gnome terminal localization works only with: 'LANGUAGE=cs_CZ.UTF-8 dbus-launch gnome-terminal'

Comment 7 Pierre Ossman 2016-07-11 09:35:43 UTC
gnome-terminal is the only one started via systemd rather than dbus and may be why things are different. I've opened bug 1353953 for the myriad of issues this shared session bus is causing.

Comment 8 Fedora Update System 2016-07-14 09:17:52 UTC
gnome-session-3.20.2-1.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-598e0c4ebc

Comment 9 Milan Zink 2016-07-14 10:04:35 UTC
Build gnome-session-3.20.2-1.fc24 works for me. All apps are using correct localization. Only exception is gnome-terminal, but that's probably a different gnome-terminal specific bug.

Comment 10 Pierre Ossman 2016-07-14 10:38:45 UTC
I think it requires the same hack. You need to add --systemd to the call to dbus-update-activation-environment.

Comment 11 Michael Catanzaro 2016-07-14 12:51:16 UTC
(In reply to Pierre Ossman from comment #10)
> I think it requires the same hack. You need to add --systemd to the call to
> dbus-update-activation-environment.

I tested that a couple days ago, but it didn't make any difference.

Maybe I did something wrong (but I doubt it).

Comment 12 Fedora Update System 2016-07-15 21:25:48 UTC
gnome-session-3.20.2-1.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.