PyQt6 and SIP v6 Snapshots Available
Detlev Offenbach
detlev at die-offenbachs.de
Tue Oct 27 17:08:50 GMT 2020
Hello Phil,
now that pylupdate6 supports reading of .ui files I looked at the code
again and got a question. Will pylupdate6 keep obsolete translations in
the .ts file or will it throw them away. Optimally there will be a
command line switch allowing it to keep obsolete translations or delete
them (like the pylupdate5 -noobsolete). Obsolete, untranslated messages
should always be deleted (like pylupdate5 does it).
Will pylupdate6 eventually contain some heuristics like pylupdate5 to
already provide translations for identical strings but different contexts?
It would be great as well, if pylupdate6 would give a summary when done
like pylupdate5 (e.g. total no. of messages, no. of new messages, no. of
already translated messages, no. of messages provided by heuristic, no.
of obsolete messages).
Regards,
Detlev
Am 20.10.20 um 11:30 schrieb Giuseppe Corbelli:
> On 10/17/20 11:38 AM, Detlev Offenbach wrote:
>>>> I saw while browsing through the sources of the latest snapshot that
>>>> it includes a Python only implementation of pylupdate. Unless I missed
>>>> something this tool seems to extract translation string from Python
>>>> sources only. If this is correct do you intend to add an extractor for
>>>> .ui files as well to be on the same level as the lupdate tool of Qt?
>>>> If that is not the intention and I didn't just miss this, what would
>>>> be the workflow for generation of translatable apps?
>>>
>>> Three possibilities I think...
>>>
>>> - run pylupdate6 on the generated .py file
>>> - lupdate on the .ui file
>>> - I could add the reading of .ui files to pylupdate6.
>>>
>>> The last would be very easy it to do if that makes things easy.
>>
>> Phil, please include option three. That would allow to extract the
>> translations with one command instead of several. Option 1 (the
>> current one) would be the most complex because one would have to
>> ensure, that the .ui file is compiled first annd pylupdate executed
>> thereafter. Option 2 would be a comprimise but would require lupdate
>> to be present on the machine and would also need two commands. So
>> Option 3 is the most straight forward one.
>
> I would vote for option 3 too.
> As far as I'm concerned pylupdate6 could also use lupdate under the
> hood, as I think it's perfectly reasonable to require a pyqt + qt
> development environment.
>
--
Detlev Offenbach
detlev at die-offenbachs.de
More information about the PyQt
mailing list