Flatseal icon indicating copy to clipboard operation
Flatseal copied to clipboard

Application's strings not expressed according to dedicated .po file

Open Ricky-Tigg opened this issue 3 years ago • 3 comments

OS: Linux Fedora; Gnome on Wayland.

Hello. Application's strings not expressed according to dedicated .po file, All strings translated.

Latest meson version installed

$ pip3 install --user meson
$ type -a meson
meson is /home/USER/.local/bin/meson
  • Connection to internet established
  • Within home directory of Flatseal source code
# dnf -y install cmake gtk4 ninja-build libhandy-devel
$ touch po/fi.po; echo "fi" >> po/LINGUAS
$ meson _translate
The Meson build system
Version: 0.62.0
Source dir: /home/USER/Downloads/Flatseal
Build dir: /home/USER/Downloads/Flatseal/_translate
Build type: native build
Project name: flatseal
Project version: 1.7.5
Host machine cpu family: x86_64
Host machine cpu: x86_64
Program msgfmt found: YES (/usr/bin/msgfmt)
Program desktop-file-validate found: YES (/usr/bin/desktop-file-validate)
Program appstream-util found: YES (/usr/bin/appstream-util)
Program glib-compile-schemas found: YES (/usr/bin/glib-compile-schemas)
Dependency libhandy-1 found: YES 1.6.1 (cached)
Found pkg-config: /usr/bin/pkg-config (1.8.0)
Program glib-compile-resources found: YES (/usr/bin/glib-compile-resources)
Program glib-compile-resources found: YES (/usr/bin/glib-compile-resources)
Program gjs found: YES (/usr/bin/gjs)
Configuring com.github.tchx84.Flatseal using configuration
Program msginit found: YES (/usr/bin/msginit)
Program msgmerge found: YES (/usr/bin/msgmerge)
Program xgettext found: YES (/usr/bin/xgettext)
Program jasmine found: NO
Dependency gio-2.0 found: YES 2.72.0 (cached)
Program glib-compile-schemas found: YES (/usr/bin/glib-compile-schemas)
Program gtk4-update-icon-cache found: YES (/usr/bin/gtk4-update-icon-cache)
Program update-desktop-database found: YES (/usr/bin/update-desktop-database)
Build targets in project: 23

Found ninja-1.10.2 at /usr/bin/ninja

Run meson --reconfigure _translate if reconfiguration needed.

$ cd _translate; ninja flatseal-pot && ninja flatseal-update-po
[0/1] Running external command flatseal-pot (wrapped by meson to set env)
[0/1] Running external command flatseal-update-po (wrapped by meson to set env)

A tool dedicated to po files is worth to be used; poedit is such one. Using non dedicated tool proves inefficient; gnome-text-editor is such one.

$ cat ../po/fi.po | head -5
#. TRANSLATORS: Don't translate this text
#: data/com.github.tchx84.Flatseal.desktop.in:4
#: data/com.github.tchx84.Flatseal.appdata.xml.in:4
msgid "Flatseal"
msgstr ""

Edit .po file in Poedit.

$ poedit ../po/fi.po

Save modification by overriding existing .po file

# flatpak config --set languages fi
$ flatpak config --list
languages: fi (default: fi)
extra-languages: *unset*
$ flatpak -y update org.gnome.Platform
$ LC_ALL=fi_PY.UTF-8 flatpak run com.github.tchx84.Flatseal
(com.github.tchx84.Flatseal:2): Gtk-WARNING **: 19:50:00.129: Locale not supported by C library.
	Using the fallback 'C' locale.

No effect; In other words, UI remains in default language

Ricky-Tigg avatar Apr 04 '22 16:04 Ricky-Tigg

I don't think fi_PY exists, try with fi_FI?

tchx84 avatar Apr 05 '22 08:04 tchx84

No effect. Permissions identical to others pre-existing .po files.

$ stat -c '%A %a %B %s %n %F' fi.po
-rw-rw-r-- 664 512 13976 fi.po regular file

Identical behavior with others relevant locale codes; e.g sv_SV.UTF-8.

Ricky-Tigg avatar Apr 05 '22 10:04 Ricky-Tigg

Since you're testing this with Flatpak, and just to double check, have you git commit the new .po file to your branch and re-built the app (see the README for instructions) ? So that the new fi.po becomes available when you flatpak run?

(I think we need to improve the documentation)

tchx84 avatar Apr 05 '22 19:04 tchx84