[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#278676: dpkg: Simplified Chinese translation become garbage because of a broken po file



> Today, I received many complains about the Simplified Chinese
> translation on dpkg, because dpkg's output became garbage in zh_CN
> locale. Yes, it's my fault, absolutely. My mutt automatically changed
> the attachment (the latest submitted po file) from a plain UTF-8
> encoding file to a mystic format. >:( I forgot to gzip it before send
> it out.

I will commit it ASAP to my archive.

Unfortunately, I have an item on my TODO list for setting up a more
detailed check script for PO files and thus avoid such mistakes. You
file was probably double encoded in UTF-8 or something like that.

The contributors of d-l10n-french will remember my similar adventures
when I switched my environment to UTF-8 (while the French translations
are still handled in ISO-8859-15).

The following will prevent you from other mistakes like that one:

~/.mime.types:
application/x-gettext po

With that, mutt will no more consider PO files as text/plain and thus
will not apply to them the same conversion algorithm it uses for the
main part of your mails. In short, it won't touch them (that bloody
thing should really stop encoding stuff when it's not asked to do so).

I have a few other thingies for automatic viewing of PO files:

~/.mailcap:

application/x-gettext;cat %s | iconv --from `cat %s|grep -i "\\"Content-type" | cut -f2 -d=| sed 's/\\\\\\\\n\\\\"//g'` --to utf-8;nametemplate=%s.po;copiousoutputt


~/.muttrc:
auto_view application/x-gettext

The .mailcap thing is a really horrible hack....it may be replaced by
(untested) :

application/x-gettext;cat %s | iconv --from `cat %s|grep -i
"\\"Content-type" | cut -f2 -d=| sed 's/\\\\\\\\n\\\\"//g'` --to `locale charmap`;nametemplate=%s.po;copiousoutput




Reply to: