nuxeo-localizer
[Top][All Lists]
Advanced

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

Re: [Nuxeo-localizer] unpack str size does not match format


From: Juan David Ibáñez Palomar
Subject: Re: [Nuxeo-localizer] unpack str size does not match format
Date: Sat, 15 Jun 2002 14:42:51 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.0) Gecko/20020610 Debian/1.0.0-1

Thank you very much Ilya. So the problem is with the
MO files.

To the mailing list, could somebody else using Windows
try the same experiment with the MO files that come
with Localizer? Has somebody else experienced similar
problems? And could you try to use the Gettext tool
msgfmt to generate the MO files from the PO files and
see what happens??





Ilya N. Kuleshov wrote:

Good evening, Juan!

JDIP> Could you please run the Python interpreter within the "locale"
JDIP> directory and try this?:

JDIP>  >>> from gettext import GNUTranslations
JDIP>  >>> GNUTranslations(open('ca.mo'))

JDIP> Try it for every MO file and tell me wether it works or not,
JDIP> it should return an instance of GNUTranslations if everything
JDIP> is fine, or raise an error otherwise (here it works fine).

ok, here it is:

1) ca.mo

Python 2.1.2 (#31, Jan 15 2002, 17:28:11) [MSC 32 bit (Intel)] on win32
Type "copyright", "credits" or "license" for more information.
from gettext import GNUTranslations
GNUTranslations(open('ca.mo'))
Traceback (most recent call last):
 File "<stdin>", line 1, in ?
 File "E:\PROGRA~1\WebSite\bin\lib\gettext.py", line 106, in __init__
   self._parse(fp)
 File "E:\PROGRA~1\WebSite\bin\lib\gettext.py", line 172, in _parse
   raise IOError(0, 'File is corrupt', filename)
IOError: [Errno 0] File is corrupt: 'ca.mo'

2) es.mo

from gettext import GNUTranslations
GNUTranslations(open('es.mo'))
Traceback (most recent call last):
 File "<stdin>", line 1, in ?
 File "E:\PROGRA~1\WebSite\bin\lib\gettext.py", line 106, in __init__
   self._parse(fp)
 File "E:\PROGRA~1\WebSite\bin\lib\gettext.py", line 172, in _parse
   raise IOError(0, 'File is corrupt', filename)
IOError: [Errno 0] File is corrupt: 'es.mo'

3) de.mo

from gettext import GNUTranslations
GNUTranslations(open('de.mo'))
<gettext.GNUTranslations instance at 007E6954>

4) en.mo

from gettext import GNUTranslations
GNUTranslations(open('en.mo'))
<gettext.GNUTranslations instance at 007E6954>

5) eu.mo

GNUTranslations(open('eu.mo'))
Traceback (most recent call last):
 File "<stdin>", line 1, in ?
 File "E:\PROGRA~1\WebSite\bin\lib\gettext.py", line 106, in __init__
   self._parse(fp)
 File "E:\PROGRA~1\WebSite\bin\lib\gettext.py", line 165, in _parse
   tlen, toff = unpack(ii, buf[transidx:transidx+8])
struct.error: unpack str size does not match format

6) fr.mo

GNUTranslations(open('fr.mo'))
Traceback (most recent call last):
 File "<stdin>", line 1, in ?
 File "E:\PROGRA~1\WebSite\bin\lib\gettext.py", line 106, in __init__
   self._parse(fp)
 File "E:\PROGRA~1\WebSite\bin\lib\gettext.py", line 172, in _parse
   raise IOError(0, 'File is corrupt', filename)
IOError: [Errno 0] File is corrupt: 'fr.mo'

7) hu.mo

GNUTranslations(open('hu.mo'))
Traceback (most recent call last):
 File "<stdin>", line 1, in ?
 File "E:\PROGRA~1\WebSite\bin\lib\gettext.py", line 106, in __init__
   self._parse(fp)
 File "E:\PROGRA~1\WebSite\bin\lib\gettext.py", line 172, in _parse
   raise IOError(0, 'File is corrupt', filename)
IOError: [Errno 0] File is corrupt: 'hu.mo'


The 'locale' directory has the following contents:

      .
      ..
  893 ca.mo
6 946 ca.po
      CVS
  661 de.mo
6 278 de.po
  301 en.mo
  304 en.po
9 583 es.mo
9 956 es.po
1 053 eu.mo
7 329 eu.po
9 743 fr.mo
10 066 fr.po
3 589 hu.mo
7 938 hu.po
5 637 locale.pot


version.txt for Localizer says:
Localizer 0.8.1

bin\lib\gettext.py is 9 950 bytes long.

Everything was done with Zope shutted down and no MO file was busy by
some else application.

Bye!
http://www.naumen.ru




--
J. David Ibáñez, Nuxeo.com
Libre Software zealot (http://www.fsf.org)






reply via email to

[Prev in Thread] Current Thread [Next in Thread]