Files
computer-playbook/tests/unit/python
kevinveenbirkenbachandClaude Opus 5 97aaa9a72c feat(i18n): record what a refused translation actually said
A bare mark told an operator that an entry is unanswerable without saying
what came back for it, so the verdict could not be judged and the only way
to see the criterion fire was to run the translator again. The rejection now
travels with its text: `unmask` returns a `Rejected` carrying the restored
translation and the criterion it broke, and the entry records both as
comments beside the mark.

    # translation-refused: libretranslate structure
    # nocheck: url
    # translation-rejected: Siehe [den Leitfaden]](https://gone.invalid/a)
    msgid "See [the guide](https://gone.invalid/a) first."
    msgstr ""

The quote is a comment and never a msgstr, because it is exactly what the
consumers must not use.

`harms` keeps being the predicate both ends of the pipeline ask, but it is
now the boolean face of `reason`, which names the criterion instead of
folding every check into one `or` chain. The token failures `unknown-token`,
`lost-token` and `empty` join the criteria the catalog can report.

Two details are load-bearing. The `nocheck` sits on a line of its own above
the quote: babel wraps a long comment, and appended behind the text the
marker landed one line below the URL it has to cover, where the block-above
resolver no longer sees it. And the cleanup drops a `nocheck` only where a
quote follows it, because Sphinx carries a source comment into the catalog
as a user comment and removing one would let the URL probe loose on the
msgid.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-26 13:16:56 +02:00
..