On 10/06/2011 10:52, Giuseppe Corbelli wrote:
> So it seems that pylupdate4 does NOT parse tr(u"") stuff. Is it by design?
> Sorry but I can't dive into it at present.

Seems that I was right, rare stuff indeed.

Look into pylupdate/fetchtr.cpp, around line 380
You will see a

case '(':
    if (yyParenDepth == 0)
      yyParenLineNo = yyCurLineNo;
    yyParenDepth++;
    yyCh = getChar();
    return Tok_LeftParen;


Replace with:

case '(':
    if (yyParenDepth == 0)
        yyParenLineNo = yyCurLineNo;
    yyParenDepth++;
    yyCh = getChar();
    //It may be a tr(u"whatever"), skip the 'u'
    if (yyCh == 'u')
        yyCh = getChar();
    return Tok_LeftParen;

It seems to work (just eats one more char). If you find it useful please apply
into the main line.

-- 
            Giuseppe Corbelli
WASP Software Engineer, Copan Italia S.p.A
Phone: +390303666104  Fax: +390302659932
E-mail: [email protected]
_______________________________________________
PyQt mailing list    [email protected]
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Reply via email to