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

List:       pykde
Subject:    Re: Problems with latest pylupdate6
From:       Phil Thompson <phil () riverbankcomputing ! com>
Date:       2020-12-22 16:37:32
Message-ID: 88a67dce81bd778c0148fe3a53fd9ad2 () riverbankcomputing ! com
[Download RAW message or body]

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:
> 
> self.tr("%n supported device(s) detected.", "", len(devices))
> 
> The issue occurs in file "python_source.py" 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 = self.tr("Deleting %n byte(s)", "", length)
> 
> self.tr("%n file(s) changed", None, totals["files"])
> 
> self.tr("Ran %n test(s) in {0:.3f}s", "", self.runCount)
> 
> self.tr("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.

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

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