Problems with latest pylupdate6

Phil Thompson phil at
Tue Dec 22 16:37:32 GMT 2020

On 22/12/2020 14:30, Detlev Offenbach wrote:
> 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 None.
> 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 - 
> self.__time)
> 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.

Can you try tonight's snapshot?

If there are any remaining issues then can you email me the relevant .ui 
or .py files.


More information about the PyQt mailing list