tchx84 / Flatseal

Manage Flatpak permissions
GNU General Public License v3.0
1.21k stars 72 forks source link

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

Open Ricky-Tigg opened 2 years ago

Ricky-Tigg commented 2 years ago

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

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.
```py
$ 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

tchx84 commented 2 years ago

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

Ricky-Tigg commented 2 years ago

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.

tchx84 commented 2 years ago

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)