nuxeo-localizer
[Top][All Lists]
Advanced

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

Re: [Nuxeo-localizer] import from 0.8.1 to 1.0


From: Milos Prudek
Subject: Re: [Nuxeo-localizer] import from 0.8.1 to 1.0
Date: Tue, 14 Oct 2003 10:38:06 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030624



The best solution is to write an external method that transforms
all your imported local content objects from normal strings encoded
in win-1250 to unicode strings:

The code is untested but I think you get the idea.

Hello Juan,

Finally I was able to test your code in a Python Script:

for x in context.objectValues('LocalContent'):
    print x.id,':'
    local_properties = {}
    for id, v in x._local_properties.items():
        print '    ',id
        local_properties[id] = {}
        for lang, v in v.items():
            local_properties[id][lang] = unicode(v, 'cp1250')
    x._local_properties = local_properties
return printed

It fails with the following error message:

Line 4: "_local_properties" is an invalid attribute name because it starts with "_".

I'm not sure how to work around this.

--
Milos Prudek
_________________
Most websites are
confused chintzy gaudy conflicting tacky unpleasant... unusable.
Learn how usable YOUR website is! http://www.spoxdesign.com





reply via email to

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