Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pygettext: Support translator comments #130057

Open
tomasr8 opened this issue Feb 12, 2025 · 0 comments
Open

Pygettext: Support translator comments #130057

tomasr8 opened this issue Feb 12, 2025 · 0 comments
Assignees
Labels
triaged The issue has been accepted as valid by a triager. type-feature A feature request or enhancement

Comments

@tomasr8
Copy link
Member

tomasr8 commented Feb 12, 2025

Feature or enhancement

Proposal:

Most gettext extraction tools such as xgettext or pybabel allow one to extract additional comments written by
the programmer which are meant to be read by the translator. These are prefixed with #. in the PO file.

The comments typically look something like this:

# i18n: Translator comment
_('foo')

This can be extracted with e.g. xgettext using xgettext --add-comments=i18n:

#. i18n: Translator comment
msgid "foo"
msgstr ""

Since this is a pretty widely used feature I propose we add this to pygettext as well.

Has this already been discussed elsewhere?

This is a minor feature, which does not need previous discussion elsewhere

Links to previous discussion of this feature:

No response

Linked PRs

@tomasr8 tomasr8 added the type-feature A feature request or enhancement label Feb 12, 2025
@tomasr8 tomasr8 self-assigned this Feb 12, 2025
@picnixz picnixz added the triaged The issue has been accepted as valid by a triager. label Feb 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triaged The issue has been accepted as valid by a triager. type-feature A feature request or enhancement
Projects
Status: No status
Development

No branches or pull requests

2 participants