nuxeo-localizer
[Top][All Lists]
Advanced

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

Re: [Nuxeo-localizer] Bug in manage_export of MessageCatalog


From: Juan David Ibáñez Palomar
Subject: Re: [Nuxeo-localizer] Bug in manage_export of MessageCatalog
Date: Tue, 04 Mar 2003 10:58:08 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2) Gecko/20021204 Debian/1.2.1-1


The bug is fixed in branch-1-0, thanks!

I don't check the sourceforge site very often, so if you use the
mailing list I will see the bug report earlier, however. Using the
mailing list there're more chances that I forget it, because I'm
not very responsive these days and the bug report could get lost
in the many messages in my inbox that wait to be replied. So you
choose.


Cheers,
david


Joachim Werner wrote:

Hi!

I've found a bug that causes trouble in the manage_export method of MessageCatalog:

This is the code (lines 495-505 in MessageCatalog.py, Localizer release 1.0.0):

        # Generate sorted msgids to simplify diffs
        dkeys = d.keys()
        dkeys.sort()
        for k in dkeys:
            k = escape(k)
            r.append('msgid "%s"' % k)

            v = d[k]
            v = escape(v)
            r.append('msgstr "%s"' % v)
            r.append('')

This is what happens:

the key "k" is escaped (illegal characters are removed) here:

            k = escape(k)

Later the escaped "k" is used as the key in

            v = d[k]

But when the dictionary d is built, the keys are not escaped.

One Solution:

        # Generate sorted msgids to simplify diffs
        dkeys = d.keys()
        dkeys.sort()
        for k in dkeys:
            r.append('msgid "%s"' % escape(k))
            v = d[k]
            v = escape(v)
            r.append('msgstr "%s"' % v)
            r.append('')


Cheers

Joachim

P.S.: How do I properly file a bug for Localizer? By putting it into the Sourceforge bug tracker or posting it to the list?



--
J. David Ibáñez, http://www.j-david.net
Software Engineer / Ingénieur Logiciel / Ingeniero de Software






reply via email to

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