-
-
Notifications
You must be signed in to change notification settings - Fork 31.9k
Pygettext: Support translator comments #130057
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
Comments
This comment has been minimized.
This comment has been minimized.
There are few more differences from
|
Yes, xgettext doesn't allow this, and it's quite confusing since it doesn't warn when you specify
Definitely strange, the docs say: "place comment blocks starting with TAG and preceding keyword lines in output file". Again, I think sticking with a prefix is the best option here.
Do you mean whitespace between # i18n: lots of space
_('foo') |
No, whitespaces at the start of the argument. |
Well, if babel does this, it is an argument for implementing such behavior. |
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:
This can be extracted with e.g. xgettext using
xgettext --add-comments=i18n
: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
The text was updated successfully, but these errors were encountered: