"check-tp-kde" from pology detects some false positive errors for reStructuredText markup
Comes from bug 474198 because there is no "pology" product in bugs.kde.org.
"posieve check-tp-kde" command from pology detects some false positive errors for reStructuredText markup.
Example: $ cd kde-trunk-kf5/l10n-kf5/ca/messages/documentation-docs-kdenlive-org/ $ posieve check-tp-kde . docs_kdenlive_org_effects_and_compositions___video_effects___blur_and_sharpen___contrast_adaptive_sharpen.po:70(#9)[msgstr:34:""]: KDE4 markup: unrecognized tag 'plane'. docs_kdenlive_org_effects_and_compositions___video_effects___blur_and_sharpen___contrast_adaptive_sharpen.po:70(#9)[msgstr:175]: KDE4 markup: mismatched tag. [...]
Message #9 (line 70) in this file reads:
msgid "**Planes** - Set the :term:`plane` the effect is to be applied to. Options are: **Alpha**, **Y** (default), **U**, **V**, **Red**, **Green**, **Blue** and **All**."
And the translated message is:
msgstr "**Plans**: Establiu el :term:`pla <plane>` al qual s'aplicarà l'efecte. Les opcions són: **Alfa**, **Y** (predeterminat), **U**, **V**, **Red**, "**Green**, **Blue** i **All**."
The problem is on the translation of "plane" to Catalan. We translate "plane" as "pla", but we need to add the English term to match the reStructuredText markup.
So, the English text :term:`plane`
becomes Catalan text :term:`pla <plane>`
.
This is valid Sphinx/reStructuredText syntax to set custom link text for cross-reference links, instead of using the normal title of the referenced page or section:
https://www.sphinx-doc.org/en/master/usage/restructuredtext/roles.html#ref-role
But "posieve check-tp-kde" thinks that "" is an invalid KDE4 markup, and throws the above errors.
This issue happens on all :term: tags that are translated to other languages in the form :term:`translation<source_in_english>`
instead :term:`source_in_english`
This issue happens in other languages (sl-Slovenian, at least).
So, it's necessary to modify the pololgy/posieve/check-tp-kde code to avoid this false positive error.
STEPS TO REPRODUCE
- Download a directory with po files with this especial reStructuredText markup. For example: https://websvn.kde.org/trunk/l10n-kf5/ca/messages/documentation-docs-kdenlive-org/
- Download and install pology from: https://invent.kde.org/sdk/pology
- Run the pology command: $ posieve check-tp-kde .
OBSERVED RESULT
docs_kdenlive_org_effects_and_compositions___video_effects___blur_and_sharpen___contrast_adaptive_sharpen.po:70(#9)[msgstr:34:""]: KDE4 markup: unrecognized tag 'plane'. docs_kdenlive_org_effects_and_compositions___video_effects___blur_and_sharpen___contrast_adaptive_sharpen.po:70(#9)[msgstr:175]: KDE4 markup: mismatched tag. [...and many more...]
EXPECTED RESULT
(not a single error message)
SOFTWARE/OS VERSIONS (not relevant)
$ posieve --version posieve (Pology) 0.13