Problems with latest pylupdate6

Detlev Offenbach detlev at
Tue Dec 22 14:30:33 GMT 2020

Hello Phil,

I am trying to extract translation strings with latest pylupdate6 
(6.0.0.dev2012201836) for the eric6 project. That fails miserably. The 
problematic display string/tr() is:"%n supported device(s) detected.", "", len(devices))

The issue occurs in file "" in line 145 but seems to be 
caused in line 307 ('n = self._get_int(args[2])'). The a.m. tr() call 
results in args[2] to be an ast.Call object causing _get_int() to return 

Another troublesome constructs are

txt ="Deleting %n byte(s)", "", length)"%n file(s) changed", None, totals["files"])"Ran %n test(s) in {0:.3f}s", "", self.runCount)"Snapshot will be taken in %n seconds", "", self.__length - 

I think, that the method '_get_int()' should be bypassed because there 
are too many possibilities. Furthermore, when run with progress output, 
some 'message.source' have value 'None' causing a failure in pretty(). 
The.ts file created with all the above issues bypassed is incorrect. 
When opening it in Qt Linguist, it gives a bunch of errors and opening 
it in an editor reveals a bunch of lines like

<message><location filename="../WebBrowser/AdBlock/AdBlockDialog.ui" 
line="0" /><location filename="../WebBrowser/AdBlock/AdBlockDialog.ui" 
line="0" /><source /><translation type="unfinished" /></message>

The example used is the eric-ide sources.


Detlev Offenbach
detlev at

More information about the PyQt mailing list