Skip to content

Make gettext builder add a flag for entries made from code-blocks #13722

@m-aciek

Description

@m-aciek

Is your feature request related to a problem? Please describe.
Making code-blocks translatable in Python docs has caused some issues in tooling connected with translations' quality assurance:

Describe the solution you'd like
I would like to propose to make the Sphinx gettext builder leverage flags in PO files to mark the entries coming from code blocks as such. That would enable downstream tooling to interpret those flags and use them to ignore or change behaviour for such entries.

Describe alternatives you've considered
A workaround is being practiced by some teams, that builds gettext with disabled code-blocks, merges and reports on the translation quality basing on it.

Additional context
Gettext documentation doesn't explicitly allow or disallow custom flags for entries (it presents a list of officially supported flags). Some of the gettext utilities are said to remove custom flags, but general direction for the project is to persist them throughout transformations.

Additionally recently it was announced that there's a second syntax for flags, that we could consider taking into account when implementing the solution.

Thank you for reviewing my proposal.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions