Migrating Pology to Python 3
Johnny Jazeix
jazeix at gmail.com
Wed Oct 5 20:24:02 BST 2022
Hi,
This can be fixed by replacing in:
https://invent.kde.org/sdk/pology/-/blob/master/pology/header.py#L245
"%s: %s\n" % tuple(field) with r"%s: %s\n" % tuple(field)
After fixing it, I have another issue in
/tmp/calendarjanitor.po~merged-70359:307: missing 'msgstr' section
#. +> trunk5 stable5
#: calendarjanitor.cpp:621
#, kde-format
msgid "id=%1; summary="%2""
msgstr "id=%1; summary= « %2 »"
The " are not escaped in the msgid.
I'm taking a quick look in case I find it but I don't guarantee anything.
Cheers,
Johnny
Le mer. 5 oct. 2022 à 19:41, Karl Ove Hufthammer <karl at huftis.org> a écrit :
> Luigi Toscano skreiv 05.10.2022 19:25:
> >> Traceback (most recent call last):
> >> File "/path/to/pology/bin/./posummit", line 21, in <module>
> >> from pology import version, _, n_, t_, PologyError
> >> ModuleNotFoundError: No module named 'pology'
> >> From which folder should I run the script?
> > Add the path to the pology directory to PYTHONPATH.
> >
> > In the long run we should add the support for properly installing pology
> with
> > python tools, not with cmake.
>
> Thanks. Adding the directory to PYTHONPATH worked.
>
> Running posummit, I got an error message about invalid syntax in the
> summit_helpers_NO.py script that we use for the Norwegian translations.
> But this was easily fixed using 2to3.
>
> Then running posummit quickly resulted in an error message about an
> invalid .po file akonadi-calendar-tools._desktop_.po. The original file
> was valid, but Pology writes an invalid file. The original file looked
> like this:
>
> msgid ""
> msgstr ""
> "Project-Id-Version: desktop_kdepim\n"
> "Report-Msgid-Bugs-To: https://bugs.kde.org\n"
> "POT-Creation-Date: 2019-05-20 12:22+0200\n"
> "PO-Revision-Date: 2015-05-08 01:10+0200\n"
> […]
>
> But Pology writes out this file (to /tmp):
>
> msgid ""
> msgstr "Project-Id-Version: desktop_kdepim
> Report-Msgid-Bugs-To: https://bugs.kde.org
> POT-Creation-Date: 2019-05-20 12:22+0200
> PO-Revision-Date: 2015-05-08 01:10+0200
> […]
>
> So it looks like the \n" is missing from the header lines.
>
>
> --
> Karl Ove Hufthammer
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-i18n-doc/attachments/20221005/ef915f20/attachment.htm>
More information about the kde-i18n-doc
mailing list