I use gnome and recently I've put an icon for "Root terminal (Gksu)" in my panel. However it struck me odd that after running it displays incorrectly encoded Polish letters in its dialog box. I checked the source ;) and it seems like the translation file "pl.po" is not really encoded in UTF-8, even though it contains a line: "Content-Type: text/plain; charset=UTF-8\n" Newer gksu versions (like gksu-1.0.7) do have the same problem, while gksu-1.2.4 doesn't have pl.po file yet, so this problem doesn't apply there. Reproducible: Always Steps to Reproduce: 1. cd /usr/portage/x11-libs/gksu 2. ebuild gksu-1.0.5.ebuild fetch 3. ebuild gksu-1.0.5.ebuild unpack 4. cd /var/tmp/portage/gksu-1.0.5/work/gksu-1.0.5/po 5. mcview pl.po 6. gedit pl.po Actual Results: Well, gedit opens the file, and it really looks like it IS an UTF-8 file after all, but the real encoding looks like a different one. Really annoying. Example: In Midnight Commander's viewer I can see sth like: #: libgksu/libgksu.c:236 msgid "Changing user..." msgstr "Zmiana u
I use gnome and recently I've put an icon for "Root terminal (Gksu)" in my panel. However it struck me odd that after running it displays incorrectly encoded Polish letters in its dialog box. I checked the source ;) and it seems like the translation file "pl.po" is not really encoded in UTF-8, even though it contains a line: "Content-Type: text/plain; charset=UTF-8\n" Newer gksu versions (like gksu-1.0.7) do have the same problem, while gksu-1.2.4 doesn't have pl.po file yet, so this problem doesn't apply there. Reproducible: Always Steps to Reproduce: 1. cd /usr/portage/x11-libs/gksu 2. ebuild gksu-1.0.5.ebuild fetch 3. ebuild gksu-1.0.5.ebuild unpack 4. cd /var/tmp/portage/gksu-1.0.5/work/gksu-1.0.5/po 5. mcview pl.po 6. gedit pl.po Actual Results: Well, gedit opens the file, and it really looks like it IS an UTF-8 file after all, but the real encoding looks like a different one. Really annoying. Example: In Midnight Commander's viewer I can see sth like: #: libgksu/libgksu.c:236 msgid "Changing user..." msgstr "Zmiana uÂżytkownika..." In gedit I can see sth like: #: libgksu/libgksu.c:236 msgid "Changing user..." msgstr "Zmiana u¿ytkownika..." And the latter string is displayed in the dialog box. Expected Results: In gedit it should be: #: libgksu/libgksu.c:236 msgid "Changing user..." msgstr "Zmiana użytkownika..." And in Midnight Commander's viewer it should be: #: libgksu/libgksu.c:236 msgid "Changing user..." msgstr "Zmiana uĹźytkownika..." Apparently, it's a problem with UTF-8 encoding of the mentioned file. What's bad, there also exist incorrectly encoded pl.gmo (compiled) file. So, it's a little bit more work to update both files. IIRC, a similar problem exists for gdm-2.6.0.9-r2, where the Polish translation, claimed to be also in UTF-8, is in fact incorrect. Who knows where else?
Looks like b.g.o clobbered the carefully pasted characters too. Contact me by e-mail if you need further assistance.
please provide a 'diff -uNr' of the fixed file(s). A quick peek at the source and this appears to be fixed in 1.2.6 (not in portage yet) . Please try bumping the ebuild & check it's translation.
Created attachment 61601 [details, diff] pl.po.diff A result of: # ebuild /usr/portage/x11-libs/gksu/gksu-1.0.5.ebuild unpack # cd /var/tmp/portage/gksu-1.0.5/work/gksu-1.0.5/po # cp -a pl.po old-pl.po # cp -a pl.po new-pl.po # gedit new-pl.po # diff -uNr old-pl.po new-pl.po > pl.po.diff After patching pl.po file I needed to remove pl.gmo and recreate it using gmsgfmt tool. After compiling and merging the package, the messages are okay.
how about using 1.2.6 ? I rather bump than patch.
Well, you were right. In gksu-1.2.6 the messages seem to be mostly correct. However, several problems still apply: * The file gksu-1.2.6/po/pl.po is indeed in UTF-8 (gedit confirms) * But the encoding declaration is incorrect (ISO-8859-2 instead of UTF-8) * Several strings are not translated yet into Polish * (!!!) The links have changed - see ebuilds attached I also bumped the version for libgksu (1.3.0) and libgksuui (1.0.5) and the same above problems apply. There is definitely something to be done...
Created attachment 61768 [details, diff] gksu-1.2.6-pl.po.diff Quick patch just to see if UTF-8 works, and to add one missing string (used by "Root Terminal (GKsu)").
Created attachment 61769 [details] gksu-1.2.6.ebuild An updated ebuild for gksu 1.2.6 (includes changed URL).
Created attachment 61770 [details] libgksu-1.3.0.ebuild An updated ebuild for libgksu 1.3.0 (includes changed URL).
Created attachment 61771 [details] libgksuui-1.0.5.ebuild An updated ebuild for libgksuui 1.0.5 (includes changed URL).
I think I'll do my best if I translate all the newest pl.po files (gksu/libgksu/libgksuui) and send them here an/or upstream directly. What do you think about it?
that would be a good thing, upstream should be notified of this for sure.
Sorry for not keeping in touch, but recent changes in baselayout/pam (don't know what else) made gksu unworkable. So for now, I stopped fixing the translations. Plus, I'm going on vacation and be returning in August. Happy holidays 4all !
is this problem still present in 1.3.4? Thanks
(In reply to comment #13) > is this problem still present in 1.3.4? > > Thanks > Well, yes. The translation is still wrong. Actually, it's mainly the .po file header which causes the trouble. There is: "Content-Type: text/plain; charset=ISO-8859-2\n" instead of: "Content-Type: text/plain; charset=UTF-8\n" The file itself is indeed encoded in UTF-8. Changing the offending line fixes all the glitches with displaying the national (Polish) letters. Another issue is that the translation is incomplete... But here only a Polish Gnome translation team could help.
OTOH, the installed "System" > "Root terminal" command contains the following invocation: gksu /usr/bin/x-terminal-emulator The only problem is, there is no such command in my system (x-terminal-emulator). However, changing it to the: gksu /usr/bin/gnome-terminal does the right thing. IIRC, Gnome has the means of setting preferred applications, like web browser, e-mail client and terminal. It's a pity that the "gksu" package doesn't take care of the user's preferred terminal application. And I'm sure that this is the gksu package, becasue equery reports that it owns the relevant files: # equery belongs /usr/share/applications/gksu.desktop [ Searching for file(s) /usr/share/applications/gksu.desktop in *... ] x11-libs/gksu-1.3.4 (/usr/share/applications/gksu.desktop) # equery belongs /usr/share/applications/gksuexec.desktop [ Searching for file(s) /usr/share/applications/gksuexec.desktop in *... ] x11-libs/gksu-1.3.4 (/usr/share/applications/gksuexec.desktop)
Being proactive, I've checked the gksu project homepage http://www.nongnu.org/gksu/ and downloaded the gksu sources from http://people.debian.org/~kov/gksu/gksu/ Here are my observations: * gksu-1.2.4 doesn't have the po/pl.po file at all * gksu-1.2.6 contains an usable po/pl.po file, however it has a wrong header (ISO-8859-2 instead of UTF-8) * gksu-1.3.4 introduces several new strings, but it still has a wrong header * gksu-1.3.5 has almost exactly the same po/pl.po file, but this time the offending header line is correct (UTF-8) * gksu-1.3.6 has the same po/pl.po file (diff doesn't display any differences) even though the modification times differ I'll work on it for a day and I'll send a corrected 1.3.[4-6] translation file, as well as patches. I'll also try to raise interest among Polish Gnome translators team, by sending them a corrected file as well.
Yup. I've fixed the Polish translation and some other minor annoyances. Here are my final observations: * The previously monolithic package (gksu) has been split into three packages (libgksu, libgksuui, gksu), but the translations were simply copied into each package and mostly marked as fuzzy. But I translated all the relevant messages anyway (no more fuzzies) :-) * There are quite a bit of inconsistencies in the gksu's *.po files. The most important one being the clobbered line numbers. Another is the mixed numbering of messages in the gconf's schema file. And there is a message in .po file which is incorrectly marked as being used twice, while in the .c source there are two distincive (albeit very similar) messages. Fixed that for Polish translation. * The libgksu and libgksuui packages contain a po/<package-ver>.pot file which prevents the updated .po file from being compiled. OTOH, the gksu package doesn't have such a .pot file, so the problem doesn't apply. I've put a workaround in the respective ebuilds. * I've found that in the main gksu's dialog where the user is asked for password, the "Password: " prompt in the label is not translated no matter what. Eventually it turned out that this string comes from the login pty, created by forkpty(3) function. The default English string used on the login pty is "Password: " and the .po file contains exactly the same string (so it is localized). I've created a small patch, libgksu-1.3.7-localized-prompt, which takes advantage of this fact. The patch can be applied separately. It's a final touch that makes the dialog fully localized and more consistent with similar dialogs already used in Gnome. Because the gksu API has been stablilized since the 1.2.* versions, I used the newest versions of all three packages: - gksu-1.3.6 - libgksu1.2-1.3.7 - libgksuui1.0-1.0.7 I've left only the "~amd64 ~x86" keywords in the ebuilds, since I have currently access only to these two arches (tested, works for me). The patches follow this message. PS. I've changed e-mail address recently... if it makes any difference.
Created attachment 80861 [details, diff] gksu-1.3.6.ebuild.diff A patch against gksu-1.3.4.ebuild, with updated Polish translation.
Created attachment 80862 [details, diff] gksu-1.3.6-pl.po.patch An updated Polish translation of the gksu-1.3.6 po/pl.po file.
Created attachment 80863 [details, diff] libgksu-1.3.7.ebuild.diff A patch against libgksu-1.3.3.ebuild, with updated Polish translation and a fix for the localized "Password: " prompt in the gksu's dialog.
Created attachment 80864 [details, diff] libgksu-1.3.7-pl.po.patch An updated Polish translation of the libgksu-1.3.7 po/pl.po file.
Created attachment 80865 [details, diff] libgksu-1.3.7-localized-prompt.patch Fix for using the localized "Password: " prompt in the gksu's dialog.
Created attachment 80866 [details, diff] libgksuui-1.0.7.ebuild.diff A patch against libgksuui-1.0.6.ebuild, with updated Polish translation.
Created attachment 80867 [details, diff] libgksuui-1.0.7-pl.po.patch An updated Polish translation of the libgksuui-1.0.7 po/pl.po file.
I know that this should be reported upstream, and that's exactly what I'm going to do. For the time being this is my contribution to the Gentoo project in general and gksu package specifically. Let's hope this will turn into something useful. :-)
Wiktor, Have your many patches been accepted upstream? If not, don't hesitate to reopen this bug. Seeing the main dev of gksu is a Debian dev, I doubt they would turn away updated translations. Thanks
Well, Gustavo turned out to be a very cooperative person. Modifications have been incorporated into official gksu-2.0.0, just in time to make their way into Ubuntu 6.10 and Debian 4.0 :-) Plus, they are available in ~x86/~amd64 gksu-2.0.0 in Gentoo. That completes the current set of distros supported by me throughout work/home/family. And the infamous 'Password: ' string in the otherwise fully translated, most frequently visible screen have been corrected as well (patched in source code). So, overall I am very happy. :D Current versions of translations can be found here: [gksu 1.9.3/2.0.0 & libgksu 1.9.8/2.0.0] * http://www.gnomepl.org/gksu?action=raw * http://www.gnomepl.org/libgksu?action=raw (just remove the first and last line, containing '{{{' and '}}}', respectively) Older versions are also accessible, in Polish GNOME Translators wiki: [gksu-1.3.6 & libgksu-1.3.7 & libgksuui-1.0.7] * http://www.gnomepl.org/gksu?action=raw&rev=1 * http://www.gnomepl.org/libgksu?action=raw&rev=1 * http://www.gnomepl.org/libgksuui?action=raw Those have been incorporated directly by the Ubuntu Translators. I contacted them directly [1] and then Dominik Zablotny imported the translations for Dapper [2]. AFAIK the older versions of translations are still in use right now, albeit have been somewhat improved by Ubuntu Translators. [1] https://lists.ubuntu.com/archives/ubuntu-pl-l10n/2006-March/000010.html [2] https://lists.ubuntu.com/archives/ubuntu-pl-l10n/2006-March/000012.html