Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 96587 - gksu-1.0.5 Polish translation (pl.po) is probably NOT in UTF-8
Summary: gksu-1.0.5 Polish translation (pl.po) is probably NOT in UTF-8
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] GNOME (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo Linux Gnome Desktop Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-06-20 02:13 UTC by Wiktor Wandachowicz
Modified: 2006-12-04 16:51 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
pl.po.diff (pl.po.diff,8.78 KB, patch)
2005-06-20 15:44 UTC, Wiktor Wandachowicz
Details | Diff
gksu-1.2.6-pl.po.diff (gksu-1.2.6-pl.po.diff,218 bytes, patch)
2005-06-23 03:36 UTC, Wiktor Wandachowicz
Details | Diff
gksu-1.2.6.ebuild (gksu-1.2.6.ebuild,776 bytes, text/plain)
2005-06-23 03:37 UTC, Wiktor Wandachowicz
Details
libgksu-1.3.0.ebuild (libgksu-1.3.0.ebuild,774 bytes, text/plain)
2005-06-23 03:37 UTC, Wiktor Wandachowicz
Details
libgksuui-1.0.5.ebuild (libgksuui-1.0.5.ebuild,707 bytes, text/plain)
2005-06-23 03:38 UTC, Wiktor Wandachowicz
Details
gksu-1.3.6.ebuild.diff (gksu-1.3.6.ebuild.diff,833 bytes, patch)
2006-02-27 15:06 UTC, Wiktor Wandachowicz
Details | Diff
gksu-1.3.6-pl.po.patch (gksu-1.3.6-pl.po.patch,24.10 KB, patch)
2006-02-27 15:08 UTC, Wiktor Wandachowicz
Details | Diff
libgksu-1.3.7.ebuild.diff (libgksu-1.3.7.ebuild.diff,1.00 KB, patch)
2006-02-27 15:11 UTC, Wiktor Wandachowicz
Details | Diff
libgksu-1.3.7-pl.po.patch (libgksu-1.3.7-pl.po.patch,10.00 KB, patch)
2006-02-27 15:13 UTC, Wiktor Wandachowicz
Details | Diff
libgksu-1.3.7-localized-prompt.patch (libgksu-1.3.7-localized-prompt.patch,803 bytes, patch)
2006-02-27 15:14 UTC, Wiktor Wandachowicz
Details | Diff
libgksuui-1.0.7.ebuild.diff (libgksuui-1.0.7.ebuild.diff,950 bytes, patch)
2006-02-27 15:15 UTC, Wiktor Wandachowicz
Details | Diff
libgksuui-1.0.7-pl.po.patch (libgksuui-1.0.7-pl.po.patch,7.54 KB, patch)
2006-02-27 15:17 UTC, Wiktor Wandachowicz
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Wiktor Wandachowicz 2005-06-20 02:13:01 UTC
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
Comment 1 Wiktor Wandachowicz 2005-06-20 02:13:01 UTC
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?
Comment 2 Wiktor Wandachowicz 2005-06-20 02:16:30 UTC
Looks like b.g.o clobbered the carefully pasted characters too.
Contact me by e-mail if you need further assistance.
Comment 3 foser (RETIRED) gentoo-dev 2005-06-20 04:35:49 UTC
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.
Comment 4 Wiktor Wandachowicz 2005-06-20 15:44:32 UTC
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.
Comment 5 foser (RETIRED) gentoo-dev 2005-06-21 10:07:47 UTC
how about using 1.2.6 ? I rather bump than patch.
Comment 6 Wiktor Wandachowicz 2005-06-23 03:32:40 UTC
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...
Comment 7 Wiktor Wandachowicz 2005-06-23 03:36:21 UTC
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)").
Comment 8 Wiktor Wandachowicz 2005-06-23 03:37:11 UTC
Created attachment 61769 [details]
gksu-1.2.6.ebuild

An updated ebuild for gksu 1.2.6 (includes changed URL).
Comment 9 Wiktor Wandachowicz 2005-06-23 03:37:44 UTC
Created attachment 61770 [details]
libgksu-1.3.0.ebuild

An updated ebuild for libgksu 1.3.0 (includes changed URL).
Comment 10 Wiktor Wandachowicz 2005-06-23 03:38:55 UTC
Created attachment 61771 [details]
libgksuui-1.0.5.ebuild

An updated ebuild for libgksuui 1.0.5 (includes changed URL).
Comment 11 Wiktor Wandachowicz 2005-06-24 01:46:37 UTC
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?
Comment 12 foser (RETIRED) gentoo-dev 2005-06-24 09:35:32 UTC
that would be a good thing, upstream should be notified of this for sure.
Comment 13 Wiktor Wandachowicz 2005-07-11 01:35:41 UTC
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 !
Comment 14 John N. Laliberte (RETIRED) gentoo-dev 2006-02-18 19:26:39 UTC
is this problem still present in 1.3.4?

Thanks
Comment 15 Wiktor Wandachowicz 2006-02-26 01:14:53 UTC
(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.
Comment 16 Wiktor Wandachowicz 2006-02-26 01:19:13 UTC
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)
Comment 17 Wiktor Wandachowicz 2006-02-26 01:49:08 UTC
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.
Comment 18 Wiktor Wandachowicz 2006-02-27 14:58:57 UTC
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.
Comment 19 Wiktor Wandachowicz 2006-02-27 15:06:10 UTC
Created attachment 80861 [details, diff]
gksu-1.3.6.ebuild.diff

A patch against gksu-1.3.4.ebuild, with updated Polish translation.
Comment 20 Wiktor Wandachowicz 2006-02-27 15:08:18 UTC
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.
Comment 21 Wiktor Wandachowicz 2006-02-27 15:11:42 UTC
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.
Comment 22 Wiktor Wandachowicz 2006-02-27 15:13:01 UTC
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.
Comment 23 Wiktor Wandachowicz 2006-02-27 15:14:20 UTC
Created attachment 80865 [details, diff]
libgksu-1.3.7-localized-prompt.patch

Fix for using the localized "Password: " prompt in the gksu's dialog.
Comment 24 Wiktor Wandachowicz 2006-02-27 15:15:58 UTC
Created attachment 80866 [details, diff]
libgksuui-1.0.7.ebuild.diff

A patch against libgksuui-1.0.6.ebuild, with updated Polish translation.
Comment 25 Wiktor Wandachowicz 2006-02-27 15:17:06 UTC
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.
Comment 26 Wiktor Wandachowicz 2006-02-27 15:19:45 UTC
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. :-)
Comment 27 Rémi Cardona (RETIRED) gentoo-dev 2006-12-03 09:40:52 UTC
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
Comment 28 Wiktor Wandachowicz 2006-12-04 16:51:16 UTC
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