Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1651898

Summary: RHEL 8 beta flatpak + locale
Product: Red Hat Enterprise Linux 8 Reporter: ignusius
Component: flatpakAssignee: David King <dking>
Status: CLOSED NOTABUG QA Contact: Desktop QE <desktop-qa-list>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 8.0CC: alexl, jkoten, mkrajnak, tpelka, tpopela
Target Milestone: rcFlags: pm-rhel: mirror+
Target Release: 8.0   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-02-10 11:31:41 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1739559    
Attachments:
Description Flags
Screenshot error none

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