Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 134527

Summary: sys-apps/coreutils-5.96 has broken pl.po translation
Product: Gentoo Linux Reporter: Wiktor Wandachowicz <siryes>
Component: [OLD] Core systemAssignee: Gentoo's Team for Core System packages <base-system>
Status: RESOLVED FIXED    
Severity: normal CC: rane
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: coreutils-5.96-r1.ebuild
translation-pl.po-5.96.patch
coreutils-5.96.ebuild.patch

Description Wiktor Wandachowicz 2006-05-27 06:53:00 UTC
Recent update of coreutils yielded an unexpected result on my box.
Namely, the Polish gettext catalogue (pl.po) is broken beyond repair.
OTOH coreutils-5.95 have the translation correct.

The description of the problem follows:

* In 5.95, pl.po file contains a header entry:

"Content-Type: text/plain; charset=ISO-8859-2\n"

  and the file indeed is in the ISO-8859-2 encoding. So, each of 18
  locale-specific characters is encoded in one byte. Example:

  &#322; (l with /) => B3
  &#281; (e with ,) => EA
  &#261; (a with ,) => B1
  
Comment 1 Wiktor Wandachowicz 2006-05-27 06:53:00 UTC
Recent update of coreutils yielded an unexpected result on my box.
Namely, the Polish gettext catalogue (pl.po) is broken beyond repair.
OTOH coreutils-5.95 have the translation correct.

The description of the problem follows:

* In 5.95, pl.po file contains a header entry:

"Content-Type: text/plain; charset=ISO-8859-2\n"

  and the file indeed is in the ISO-8859-2 encoding. So, each of 18
  locale-specific characters is encoded in one byte. Example:

  &#322; (l with /) => B3
  &#281; (e with ,) => EA
  &#261; (a with ,) => B1
  ó (o with ') => F3

* In 5.96 pl.po file contains the same header, but *ALL* Polish-specific
  characters magically transformed themselves into a three-byte combination:

  &#322; (l with /) => EF BF BD
  &#281; (e with ,) => EF BF BD
  &#261; (a with ,) => EF BF BD
  ó (o with ') => EF BF BD

Additionaly:

# file coreutils-5.95/po/pl.po
pl.po: ISO-8859 PO (gettext message catalogue) text

# file coreutils-5.96/po/pl.po
pl.po: UTF-8 Unicode PO (gettext message catalogue) text


This is a real problem, because the file encoding is not recoverable without
lots of manual tweaking...

Help?
Comment 2 Wiktor Wandachowicz 2006-05-27 10:02:29 UTC
After looking at the original tarballs from the package's home page, I've
found out that they already contain broken .po files. So, the problem is
out of Gentoo control.

I've already contacted coreutils developer and Polish translators.
I propose to leave this bug open for a while, until thing gets fixed
upstream.
Comment 3 SpanKY gentoo-dev 2006-06-07 04:57:23 UTC
if you can post a patch to revert 5.96 to 5.95 i'll include it
Comment 4 Wiktor Wandachowicz 2006-06-09 15:12:34 UTC
I've received a very positive feedback from the maintainers of both
coreutils and Polish translation for this package. Situation is under
control right now and updated .po file can be found at:

ftp://sunsite.icm.edu.pl/packages/private/rzm/patches/coreutils-5.96.pl.po

See original discussion here:
http://lists.gnu.org/archive/html/bug-coreutils/2006-06/msg00054.html
http://lists.gnu.org/archive/html/bug-coreutils/2006-06/msg00055.html
http://lists.gnu.org/archive/html/bug-coreutils/2006-06/msg00056.html

I bet it's safe now to put coreutils-5.96-r1 into portage and include
the aforementioned updated translation as well.
Comment 5 Wiktor Wandachowicz 2006-06-14 15:55:26 UTC
(In reply to comment #2)
> if you can post a patch to revert 5.96 to 5.95 i'll include it

Well, I've coined an updated ebuild already, so there's no need to revert to the previous version. I suppose that it might be better to wait for the upstream to release a newer version with corrected translation, but since you've asked...

The only problem with the broken pl.po file is that the patch for it is longer (~350 kB) than the original (~306 kB). I'm going to attach patches anyway, just to let you know what would be needed to correct the situation.
Comment 6 Wiktor Wandachowicz 2006-06-14 15:56:51 UTC
Created attachment 89219 [details, diff]
coreutils-5.96-r1.ebuild

Updated ebuild. It requires translation-pl.po-5.96.patch (attached next).
Comment 7 Wiktor Wandachowicz 2006-06-14 16:04:02 UTC
Created attachment 89220 [details, diff]
translation-pl.po-5.96.patch
Comment 8 Wiktor Wandachowicz 2006-06-14 16:21:02 UTC
Created attachment 89221 [details, diff]
coreutils-5.96.ebuild.patch

A patch against coreutils-5.96.ebuild (instead of whole ebuild).
Comment 9 SpanKY gentoo-dev 2006-06-24 19:59:12 UTC
this fix is included in the 5.97 release, thanks :)