Latest Kleopatra master on KDE neon Unstable; locale: tr_TR
See title. The pane is always in English. Also as a plus, the various dialogues are also displayed in English, I presume they are pulled from GnuPG as well.
Latest Kleopatra master on KDE neon Unstable; locale: tr_TR
See title. The pane is always in English. Also as a plus, the various dialogues are also displayed in English, I presume they are pulled from GnuPG as well.
Which dialogs? pinentry? If yes, then your assumption is correct. pinentry also gets the texts from GnuPG.
Are you sure that the translations for gnupg are installed? On Tumbleweed translations are usually in a separate package. After installing the gpg2-lang package I get this when I force the Turkish translation:
$ LANGUAGE=tr_TR gpg --version gpg (GnuPG) 2.5.2 libgcrypt 1.11.0 Copyright (C) 2024 g10 Code GmbH License GNU GPL-3.0-or-later <https://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Home: /home/ingo/.gnupg Desteklenen algoritmalar: GenAnah: RSA, Kyber, ELG, DSA, ECDH, ECDSA, EDDSA Şifre: IDEA, 3DES, CAST5, BLOWFISH, AES, AES192, AES256, TWOFISH, CAMELLIA128, CAMELLIA192, CAMELLIA256 Sağlama: SHA1, RIPEMD160, SHA256, SHA384, SHA512, SHA224 Sıkıştırma: Sıkıştırılmamış, ZIP, ZLIB, BZIP2
Another data point:
$ locale LANG=de_DE.UTF-8 LC_CTYPE=en_US.UTF-8 LC_NUMERIC="de_DE.UTF-8" LC_TIME="de_DE.UTF-8" LC_COLLATE="de_DE.UTF-8" LC_MONETARY="de_DE.UTF-8" LC_MESSAGES="de_DE.UTF-8" LC_PAPER="de_DE.UTF-8" LC_NAME="de_DE.UTF-8" LC_ADDRESS="de_DE.UTF-8" LC_TELEPHONE="de_DE.UTF-8" LC_MEASUREMENT="de_DE.UTF-8" LC_IDENTIFICATION="de_DE.UTF-8" LC_ALL= $ gpg --version gpg (GnuPG) 2.5.2 libgcrypt 1.11.0 Copyright (C) 2024 g10 Code GmbH License GNU GPL-3.0-or-later <https://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Home: /home/ingo/.gnupg Supported algorithms: Pubkey: RSA, Kyber, ELG, DSA, ECDH, ECDSA, EDDSA Cipher: IDEA, 3DES, CAST5, BLOWFISH, AES, AES192, AES256, TWOFISH, CAMELLIA128, CAMELLIA192, CAMELLIA256 Hash: SHA1, RIPEMD160, SHA256, SHA384, SHA512, SHA224 Compression: Uncompressed, ZIP, ZLIB, BZIP2 $ LANGUAGE=de_DE gpg --version gpg (GnuPG) 2.5.2 libgcrypt 1.11.0 Copyright (C) 2024 g10 Code GmbH License GNU GPL-3.0-or-later <https://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Home: /home/ingo/.gnupg Unterstützte Verfahren: Öff. Schlüssel: RSA, Kyber, ELG, DSA, ECDH, ECDSA, EDDSA Verschlü.: IDEA, 3DES, CAST5, BLOWFISH, AES, AES192, AES256, TWOFISH, CAMELLIA128, CAMELLIA192, CAMELLIA256 Hash: SHA1, RIPEMD160, SHA256, SHA384, SHA512, SHA224 Komprimierung: nicht komprimiert, ZIP, ZLIB, BZIP2
So, despite LANG (and most LC_* variables) being set to de_DE.UTF-8 I don't get the German translation when I run gpg. In fact, I prefer this behavior because I hate non-English text on the CLI, but I'm not sure whether it's expected that only LANGUAGE seems to work for gpg.
I can replicate this. A quick strace with LC_MESSAGES=de_DE shows (gnupg master)
827 openat(AT_FDCWD, "/usr/lib/locale/de_DE/LC_MESSAGES", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) 827 openat(AT_FDCWD, "/usr/lib/locale/de/LC_MESSAGES", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) 827 write(2, "LOCALEDIR=/usr/local/share/local"..., 34) = 34
so that gettext looks into/usr/lib/share - where is can't find the messages because gnupg has been installer to /usr/local/. The latter is actually passed to gettext as shown by an extra debug line introduced (last line of the strace). The code to set the domain is
setlocale (LC_ALL, "" ); bindtextdomain (PACKAGE_GT, gnupg_localedir ()); textdomain (PACKAGE_GT);
Since 2007 this code has been changed only once by @ikloecker to fix T5999 - but I can't see why this should have introduced a bug. Now with LANGUAGES=de_DE we see the expected result:
1789 write(2, "LOCALEDIR=/usr/local/share/gnupg"..., 33) = 33 [...] 1789 openat(AT_FDCWD, "/usr/local/share/locale/de_DE/LC_MESSAGES/gnupg2.mo", O_RDONLY) = -1 ENOENT (Datei oder Verzeichnis nicht gefunden) 1789 openat(AT_FDCWD, "/usr/local/share/locale/de/LC_MESSAGES/gnupg2.mo", O_RDONLY) = 3
Interestingly the LOCALEDIR comes this time before the access to the translation file.
configure:14153: checking where the gettext function comes from
configure:14164: result: libc
Debian GLIBC 2.36-9+deb12u1
Actually not a bug: In my tests I forgot to unset LANGUAGES and LANG before calling gpg.
LANGUAGE= LANG= LC_MESSAGES=de_DE gpg
Thus this should work. But it did only work when I used
LANGUAGE= LANG= LC_MESSAGES=de_DE.UTF8 gpg
Thus the whole thing is related to the configuration of locale.alias and on whether LANGUAGE is set in the environment (for me it is set to en_US:en
None of this worked for me. Shall I try to raise the issue with the neon team?
Edit: I’ve inquired on the Matrix channel for neon. I’ll update as necessary.