KTurtle false positive

Chusslove Illich caslav.ilic at gmx.net
Sun Mar 10 15:36:51 GMT 2024


 > [: Albert Astals Cid :]
 > So yeah, seems a false positive, no idea how to move this forward
 > without someone looking more in depth at the pology code.

I suppose this (or one of them) is the problem message:

     #: interpreter/executer.cpp:676
     #, kde-format
     msgid "I cannot do a '>' without 2 variables"
     msgstr "אי אפשר לעשות ‚>’ בלי שני משתנים"

What is happening here is a bit of a leftover from kdelibs4 times.
There, every translated message that went through `i18n` calls, and
therefore had `kde-format` flag in the PO file, had also to be a valid
XML-format string. Under that rule, here the original text is a valid
XML-format string (literal '>' allowed in XML), but the translated
message is not (literal '<' is not allowed in XML, since it signifies
start of a tag). This pushes Pology `check-tp-kde4` sieve to report a
problem.

In KF5 this was changed, so that only `xi18n` subseries of `i18n` calls
had to be valid XML. So if this message were coming from an `xi18n`
call, then the problem report would not be a false positive. However, it
is not coming from an `xi18n` call, so indeed it is a false positive.

The correct solution here would be to register another format flag (eg.
`xkde-format`) with the Gettext project, and then change Scripty's
extraction of `xi18n` calls to set that flag. Then modify Pology
`check-tp-kde4` to check markup only in messages with this flag.

The temporary solution would be to disable markup checking altogether on
`kde-format` messages. This would not be too bad, since very few strings
(I guess under 5%) do use `xi18n` calls.

The quickest solution would be to turn around the translation of the
message so that it can state the same comparison sign like the original.

-- 
Chusslove Illich (Часлав Илић)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature.asc
Type: application/pgp-signature
Size: 203 bytes
Desc: OpenPGP digital signature
URL: <http://mail.kde.org/pipermail/kde-i18n-doc/attachments/20240310/f6c0a336/attachment.sig>


More information about the kde-i18n-doc mailing list