Bug 1651898 - RHEL 8 beta flatpak + locale
Summary: RHEL 8 beta flatpak + locale
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: flatpak
Version: 8.0
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: rc
: 8.0
Assignee: David King
QA Contact: Desktop QE
URL:
Whiteboard:
Depends On:
Blocks: 1739559
TreeView+ depends on / blocked
 
Reported: 2018-11-21 07:01 UTC by ignusius
Modified: 2020-02-10 11:31 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-02-10 11:31:41 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Screenshot error (275.29 KB, image/png)
2018-11-21 07:01 UTC, ignusius
no flags Details

Description ignusius 2018-11-21 07:01:27 UTC
Created attachment 1507561 [details]
Screenshot error

Description of problem:
When install flatpak by GNOME Software Center, it doesn't work with locale (for example Russian language).

My localectl status:

   System Locale: LANG=ru_RU.utf8
       VC Keymap: us
      X11 Layout: us

See attachment.



Steps to Reproduce:
1.Open GNOME Software
2.Add repo flathub
3.Install GIMP (for example)
4.Open GIMP (and see what locale doesn't work)

Actual results:

This error also in RHEL 7.6, although in Fedora 28/29 all right!


Expected results:


Additional info:

Comment 2 ignusius 2018-11-22 20:58:33 UTC
If install flatpak from CLI a locale work, but else use GNOME Software a locale doesn't work!

Comment 3 Martin Krajnak 2018-11-26 14:37:46 UTC
$ LANG=ru_RU flatpak run org.gnome.Builder 

(gnome-builder:2): Gtk-WARNING **: 14:36:00.027: Locale not supported by C library.
	Using the fallback 'C' locale.
Gtk-Message: 14:36:00.065: Failed to load module "pk-gtk-module"
Gtk-Message: 14:36:00.067: Failed to load module "pk-gtk-module"

Comment 4 Martin Krajnak 2018-12-05 15:10:26 UTC
I was testing again today, I was able to run Gimp, I tried two languages:

LANG=de_DE
LANG=ru_RU

they worked for both the command line and from the gnome-software (gnome-software run with custom locale from cmd)

The gimp was working ok. But both gnome-builder and gnome-music were still running in english with the fallback messages.

Comment 5 ignusius 2018-12-05 15:30:53 UTC
(In reply to Martin Krajnak from comment #4)
> I was testing again today, I was able to run Gimp, I tried two languages:
> 
> LANG=de_DE
> LANG=ru_RU
> 
> they worked for both the command line and from the gnome-software
> (gnome-software run with custom locale from cmd)
> 
> The gimp was working ok. But both gnome-builder and gnome-music were still
> running in english with the fallback messages.

Yes, but in Fedora 28/29 all work right!  I'm, running gnome-software and other app without parameters in the Fedora. This bug have RHEL 7.6 too.

Comment 6 Martin Krajnak 2018-12-05 15:42:21 UTC
Sure, I am just mentioning that, so the developer will have the right information when he starts to work on the bug. 

Thanks for your report!

Comment 10 Alexander Larsson 2020-02-10 08:57:53 UTC
I'm not sure what is going wrong here, but the way locales work in flatpak is this:

With every app org.foo.Bar comes a corresponding org.foo.Bar.Locale extension that has the translations for all languages. However, when flatpak installs the locale extension it typically does a partial install of the .Locale extension containing only the languages flatpak has been configured to install. By default it tries to install the current locale as well as any locale used by someone user on the system (as listed by the user accounts dbus service).

If you run "flatpak config" it will print out the current values for the languages (as well as the default it would otherwise use).

You can list what is actually installed if you run "flatpak list -da". For example, i get:

$ flatpak list -da | grep gedit
gedit	Edit text files	org.gnome.gedit	3.32.2	stable	x86_64	flathub	user	org.gnome.gedit/x86_64/stable	c9f9502c0273	-	14,1 MB	user,current
Locale		org.gnome.gedit.Locale		stable	x86_64	flathub	user	org.gnome.gedit.Locale/x86_64/stable	447ed140bdec	-	326,1 kB	user,runtime,partial (/de /en /fi /sv)

Where we can see I have the locales for german (/de), english (/en), finnish (/fi) and swedish (/sv) installed.


Now, this is with gedit from flathub, not gimp. There could be one of several issues happening:

1) Does a .Locale extension for the gimp exist? (Where is the gimp installed from?)
2) Did the .Locale extension get installed at all? (flatpak list -da will tell)
3) Did the right language get installed?
4) If not, what language is flatpak using (see flatpak config output)
5) Compare ui install vs cli install. I.e. Does installing via gnome-software do the same thing as flatpak install?

Comment 2 seems to imply that the problem is in 5, i.e. gnome-software doesn't behave the same as flatpak install. However, the others are interesting to research even then to see *how* gnome-software gets it wrong.

Comment 11 Martin Krajnak 2020-02-10 10:32:04 UTC
Alex thanks a lot for clarification, I realized that my reproducer is not sufficient,

So:

1. I changed the language in control-center this time to Czech
2. I restarted the session
3. I installed GIMP and gedit from flathub

Both apps were localized to Cz.

So I guess we can close this.

Comment 12 Martin Krajnak 2020-02-10 10:37:12 UTC
LANG=cs_CZ.UTF-8
gnome-software-3.30.6-3.el8.x86_64
flatpak-1.6.1-1.el8.x86_64


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