Migrating Pology to Python 3
Karl Ove Hufthammer
karl at huftis.org
Wed Oct 5 18:40:45 BST 2022
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
More information about the kde-i18n-doc
mailing list