5.2 flatpak "No valid locale settings found"

Hello,

I tried the 5.2 flatpak from Release Gramps flatpak 5.2.0-0 · gramps-project/flatpak · GitHub and I can’t get it to switch locale.

Whatever I do, I always get this warning in the terminal: .gramps.gen.utils.grampslocale.WARNING: No valid locale settings found, using US English
and the UI loads in English

I don’t remember having to set anything to get the 5.1.6 flatpak (installed via flathub) to use French.

Another thing I find odd, but kind of useful right now, is that it installed alongside the previous version instead of replacing it, probably because the ref is app/org.gramps_project.Gramps/x86_64/master and not app/org.gramps_project.Gramps/x86_64/stable.
Anyway it allowed me to experiment:

5.1.6 from flathub:

flatpak run --env=LANG=fr_FR.UTF-8 --env=LANGUAGE="fr" --env=LC_ALL=fr_FR.UTF-8 app/org.gramps_project.Gramps/x86_64/stable -v

Gramps Settings:
----------------
 python    : 3.10.13
 gramps    : 5.1.6
 gtk++     : 3.24.39
 pygobject : 3.44.2
 pango     : 1.50.14
 cairo     : 1.16.0
 pycairo   : 1.25.1
 osmgpsmap : 1.0
 GExiv2    : 0.10
 ICU       : 71.1
 PyICU     : 2.7.2
 o.s.      : linux
 kernel    : 6.1.0-17-amd64

Environment settings:
---------------------
 LANG      : fr_FR.UTF-8
 LANGUAGE  : fr
 GRAMPSI18N: not set
 GRAMPSHOME: (redacted)/gramps_home
 GRAMPSDIR : not set
 PYTHONPATH:
    /app/lib/python3.10/site-packages/gramps
    /app/bin
    /usr/lib/python310.zip
    /usr/lib/python3.10
    /usr/lib/python3.10/lib-dynload
    /app/lib/python3.10/site-packages
    /usr/lib/python3.10/site-packages

Non-python dependencies:
------------------------
 Graphviz  : 2.47
 Ghostscr. : 9.56.1

System PATH env variable:
-------------------------
     /app/bin
     /usr/bin

Databases:
-------------------------
 bsddb     :
     version     : 6.2.7
     db version  : 5.3.28
     location    : /app/lib/python3.10/site-packages/bsddb3/__init__.py
 sqlite3   :
     version     : 3.39.4
     py version  : 2.6.0
     location    : /usr/lib/python3.10/sqlite3/__init__.py

5.2.0 from github:

flatpak run --env=LANG=fr_FR.UTF-8 --env=LANGUAGE="fr" --env=LC_ALL=fr_FR.UTF-8 app/org.gramps_project.Gramps/x86_64/master -v

.gramps.gen.utils.grampslocale.WARNING: No valid locale settings found, using US English
Gramps Settings:
----------------
 gramps    : 5.2.0
 o.s.      : linux
 kernel    : 6.1.0-17-amd64

Required:
---------
 Python    : 3.11.7
 Gtk++     : 3.24.41
 pygobject : 3.46.0
 Cairo     : 1.18.0
 pycairo   : 1.25.1
 Pango     : 1.51.2
 PangoCairo: 1.0

Recommended:
------------
 osmgpsmap : 1.0
 Graphviz  : 10.0
 Ghostscr. : 10.02.1
 ICU       : 3.11.7
 PyICU     : 2.7.2

Optional:
---------
 Gspell     : not found
 RCS        : not found
 PILLOW     : 8.3.1
 GExiv2     : 0.10
 Exiv2 lib. : 0.28
 geocodeglib: 1.0

Environment settings:
---------------------
 LANG      : en_US.UTF-8
 LANGUAGE  : en
 GRAMPSI18N: not set
 GRAMPSHOME: (redacted)/gramps_home
 GRAMPSDIR : not set
 GRAMPS_RESOURCES : /app/lib/python3.11/site-packages
 PYTHONPATH:
    /app/lib/python3.11/site-packages/gramps
    /app/bin
    /usr/lib/python311.zip
    /usr/lib/python3.11
    /usr/lib/python3.11/lib-dynload
    /app/lib/python3.11/site-packages
    /usr/lib/python3.11/site-packages
    (redacted)/gramps_home/gramps/gramps52/plugins/lib

System PATH env variable:
-------------------------
     /app/bin
     /usr/bin

Databases:
-------------------------
 bsddb     :
     version     : not found
     db version  : not found
     location    : not found
 sqlite3   :
     version     : 3.42.0
     py version  : 2.6.0
     location    : /usr/lib/python3.11/sqlite3/__init__.py

Is there any configuration I am missing ?
By the way, my OS is Debian 12

Thank you

1 Like

My guess is that the issue is probably related to the two flatpak packages being compiled with different commands. The flatpak package at the gramps-project github got compiled with a github workflow script I put together flatpak/.github/workflows/main.yml at main · gramps-project/flatpak · GitHub

Flathub compiles all flatpaks with its own appstream commands. I don’t know what commands they use to enable localizations, so I will ask at the flathub discourse. Thank you for letting me know about the issue.

I pushed the 5.2.0-0 update to flathub this morning, and so the Gramps flatpak update will take between a few hours to a day before flathub makes it available for user downloads and updates.

Please let us know if the upcoming flatpak update to Gramps 5.2.0-0 still doesn’t use your locale.

2 Likes

If you feel courageous, you can try to build and run Gramps 5.2 from source, and then install it if you’re happy with the results. Directions are in the INSTALL file, and you need to add one option to the install command as mentioned in this thread:

I did that on LMDE 6, which is based on Debian 12.


The 5.2.0-0 flatpak is available on flathub now, and I verified that the Spanish system locale works on the Gramps flatpak from flathub. Sorry I couldn’t test French. At one time I could sight-read French from about 1000-1700 AD for checking charters and authors like Fr Anselme, but I never spent much time on learning modern French. So I would have had trouble verifying a system logged into something other than English or Spanish.

Until I learn the command that flathub uses to allow system localizations, the archived flatpaks at gramps-project are apparently just English. So I put warnings on all the archived flatpak releases at the gramps github about this. Thank you for mentioning this.

1 Like

I can confirm that the flathub build works with different locales, I tried Italian and French.

Thank you !

3 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.