-
-
Notifications
You must be signed in to change notification settings - Fork 31.8k
gh-130647: Add --omit-header
option to pygettext
#130650
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
base: main
Are you sure you want to change the base?
Conversation
Also @serhiy-storchaka |
This comment was marked as off-topic.
This comment was marked as off-topic.
Anything else left to do here @tomasr8 ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Little reminder @serhiy-storchaka |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use non-ASCII strings and non-UTF-8 source encoding for tests. The encoding should also be different from Latin1. Maybe iso-8859-15 with €
in a string. Use both literal €
and \u20ac
(in different strings, so the error will be easier to identify).
Might I ask why? The implementation does effect anything beyond the header, it is literally a single |
Why to add this feature at first place? If it is for tests, we should ensure that it works with non-ASCII strings. Otherwise this option will be useless. We need also tests with non-ASCII strings for |
See the linked issue, this was discussed before.
This feature just removes the POT header. |
Friendly ping @serhiy-storchaka :-) |
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The problem with this feature is that we are losing information about the .po
file encoding, which is locale depending. Therefore, files generated on different computers may be incompatible. There is an issue with using the default file encoding in general, because it may be not compatible with the source file encoding (msgids and comments) and filesystem encoding (file names).
We can probably just ignore this for now. And then somehow solve all the encoding problems at once.
But adding a feature that contains an inherent flaw leaves a bitter aftertaste.
Requesting @tomasr8 :-)
--omit-header
option #130647