[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    Re: Wrong context detected by pylupdate
From:       Phil Thompson <phil () riverbankcomputing ! com>
Date:       2020-07-05 14:11:26
Message-ID: 1df7a95e6ce86f8002d95937b5620731 () riverbankcomputing ! com
[Download RAW message or body]

On 24/06/2020 10:59, Giuseppe Corbelli wrote:
> Hi all
> I found that under rather common circumstances pylupdate uses the
> wrong context while generating TS files. I did not investigate much
> but I expect trouble since the Qt tr() implementation uses
> QMetaObject::className which is of course different.
> Please see the attached test case and TS output.
> 
> pylupdate5 v5.15.0
> Python 3.5.4
> Linux, if it matters.
> 
> Yes, I know that Qt6 is on its way and pylupdate will be revamped. I
> already found a workaround (do not define nested class) so it's no big
> deal for me right now but maybe it's worth considering.

The problem is the nested class. pylupdate, being based on an ancient 
copy of lupdate, doesn't understand Python indentation. Putting the 
nested class after the method should also work.

Phil
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic