gtk30.mo files not found in the Application bundle because QUARTZ_RELOCATION is not defined
gtk+3 does not search for the locale file gtk30.mo
in the application bundle but in the directory Gtk+3 has been installed by gtk-osx (i.e. ~/gtk/inst/share/locale/fr/LC_MESSAGES/gtk30.mo
).
It works fine on the developer computer. But the localisation strings are NOT found when the application is used on another computer (or if ~/gtk/inst/
is renamed).
The GTk+3 "Close" button is labelled "Fermer" in French when the l10n file is found. But it is still "Close" when the file share/locale/fr/LC_MESSAGES/gtk30.mo
is not found.
This is because the define QUARTZ_RELOCATION
is not defined for GtK+3 compilation.
This define is used at https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtkquartz.c#L126
I don't know how to set this option using meson. I had to manually edit the file
~/.cache/jhbuild/build/gtk+-3.24.30/config.h
Maybe the problem is in Gtk+ and not gtk-osx.