[Zope] Re: i18n local content

Josef Albert Meile jmeile at hotmail.com
Fri Jul 16 12:29:24 EDT 2004


> >  > > Can someone help me understand current i18n situation in Zope?
> >  > > I know that Localizer is obsolete. I have a working site in 
>Localizer
> >  > > and I want to move to a non-obsolete solution.
> >  >
> >  > In what way is Localizer obsolete ?
> >
> > Perhaps obsolete is the wrong word. The last version 1.1.0a3 was
> > released on Jun 3rd, 2004. However it seems to be broken and 
>unsupported.
>
>What's broken ?
Well, last month I posted a message on the localizer list, but I haven't got 
any reply jet:
http://in-girum.net/pipermail/localizer/2004-June/000229.html

The thing is that I have tried to installed it several times reinstalling 
python, zope, localizer, itools and iHotfix. Today in fact, I did a new 
install twice from the beginning on my Gentoo linux, kernel 2.4.22:

* Python 2.3.3
  --with-prefix=/usr/local/Python-2.3.3
  --with-threads
  --without-pymalloc
  - Some Extra modules were activated on the Modules/Setup:
    array, cmath, math, struct, time, operator, _weakref, _testcapi,
    unicodedata, _locale, fcntl, pwd, grp, select, mmap, and zlib

* Zope 2.7.1
   --with-prefix=/usr/local/Zope/2.7.1
   --with-python=/usr/local/Python-2.3.3/bin/python2.3
   Instance home: /usr/local/Zope/2.7.1/data

* Hotfix_2004-07-14

* itools 0.4.1, normal setup:
   /usr/local/Python-2.3.3/bin/python2.3 setup.py install
   -> The package was correctly copied into:
        /usr/local/Python-2.3.3/lib/python2.3/site-packages/itools

* Localizer 1.1.0a3

* iHotfix 0.4.0

Then I create a Localizer with "en de es" as the target languages. Finally I 
also add a MessageCatalog with "en" as original language and "de es" as 
target languages. Everything seems good, but when I try to import a "po" 
file, which I borrowed from plone, I get:

Traceback (innermost last):
  Module ZPublisher.Publish, line 101, in publish
  Module ZPublisher.mapply, line 88, in mapply
  Module ZPublisher.Publish, line 39, in call_object
  Module Products.Localizer.MessageCatalog, line 564, in manage_import
  Module Products.Localizer.MessageCatalog, line 547, in po_import
AttributeError: 'module' object has no attribute 'parsers'

I did the import from the python command line, but a got the same results:
Python 2.3.3 (#1, Jun 21 2004, 19:43:18)
[GCC 3.3.2 20031218 (Gentoo Linux 3.3.2-r5, propolice-3.3-7)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
 >>> from itools import i18n
>>>dir(i18n)
['Multilingual', '__all__', '__builtins__', '__doc__', '__file__', 
'__name__', '__path__', 'accept', 'code', 'filename', 'get_abspath', 
'get_language_name', 'get_languages', 'langs', 'language_codes', 
'languages', 'line', 'name', 'segment', 'x']
 >>> i18n.parsers
Traceback (most recent call last):
   File "<stdin>", line 1, in ?
AttributeError: 'module' object has no attribute 'parsers'

If you see, dir doesn't find parsers either, but from the unix shell I get:
% ls -l i18n/parsers.py*
-rw-r--r--    1 root     root         4041 May 26 21:32 i18n/parsers.py
-rw-r--r--    1 root     root         2959 Jul 16 18:11 i18n/parsers.pyc

I have tried to fix it by changing some things on the itools module,  for 
example the definition of the __all__ variable on i18n/__init__.py, but I 
haven't had success. It seams that something is wrong with this module and I 
guess it is related with that variable, but I'm not really a python guru to 
say it.

>
>Localizer is used by CPS (which has a smaller following that Plone but
>still) and it works well for us. We're interested in having it work for
>everyone.
Are you using the last version: Localizer 1.1.0a3, itools 0.4.1 and iHotfix 
0.4.0? Did you try it on a fresh install with Zope 2.7.x and python 2.3.3 
without other products installed?

Thanks,
Josef

_________________________________________________________________
Add photos to your e-mail with MSN 8. Get 2 months FREE*. 
http://join.msn.com/?page=features/featuredemail



More information about the Zope mailing list