sphinx-lint
sphinx-lint copied to clipboard
Wrong reading of literal-block content in PO files
trafficstars
CPython enabled literal-block in gettext_additional_targets, so literal blocks are being extracted to translation files by the gettext builder. Since then, incorrect reports are showing up when running sphinx-lint 1.0.0, pointing to lines of msgids/source messages (English) instead of the msgstr/translation message.
Examples (make sure to rename removing .txt of the upload filename if want to test):
license.po (doc) shows:
license.po:998: found an unbalanced inline literal markup. (unbalanced-inline-literals-delimiters)
license.po:1410: found an unbalanced inline literal markup. (unbalanced-inline-literals-delimiters)
license.po:2029: found an unbalanced inline literal markup. (unbalanced-inline-literals-delimiters)
license.po:2038: found an unbalanced inline literal markup. (unbalanced-inline-literals-delimiters)
license.po:2503: found an unbalanced inline literal markup. (unbalanced-inline-literals-delimiters)
and library/datetime.po (doc) shows:
library/datetime.po:1601: trailing whitespace (trailing-whitespace)
library/datetime.po:1613: trailing whitespace (trailing-whitespace)
library/datetime.po:2056: trailing whitespace (trailing-whitespace)
library/datetime.po:2159: trailing whitespace (trailing-whitespace)
library/datetime.po:2931: trailing whitespace (trailing-whitespace)
library/datetime.po:3029: trailing whitespace (trailing-whitespace)
library/datetime.po:3031: trailing whitespace (trailing-whitespace)
library/datetime.po:3041: trailing whitespace (trailing-whitespace)
library/datetime.po:3056: trailing whitespace (trailing-whitespace)