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

Parse header in PO file is no longer compliant with GNU PO format #10

Closed
JiangtianLi opened this issue Sep 7, 2017 · 5 comments
Closed
Assignees

Comments

@JiangtianLi
Copy link

JiangtianLi commented Sep 7, 2017

It seems after this commit, the PO header requires a different format than https://www.gnu.org/software/gettext/manual/html_node/PO-Files.html.

An empty untranslated-string is reserved to contain the header entry with the meta information (see Header Entry). This header entry should be the first entry of the file. The empty untranslated-string is reserved for this purpose and must not be used anywhere else.

A compliant header looks like:

msgid   ""
msgstr  "Project-Id-Version: %s\n"
        "Report-Msgid-Bugs-To: %s\n"
@leonelquinteros leonelquinteros self-assigned this Sep 7, 2017
@leonelquinteros
Copy link
Owner

You're right, thanks for reporting!
I missed how that commit was commenting out these lines in the tests.

Fixing now.

@JiangtianLi
Copy link
Author

Thanks for addressing it!

@leonelquinteros
Copy link
Owner

@JiangtianLi Please let me know if this was causing an issue on your side and if the last commit has fixed it.

Also, if you have any use case that you want to include on the tests, feel free to send a PR or simply the corresponding PO file fragment and some assertions so i can include these on the tests. It would be great to cover as much cases as possible.

Thanks again for your contribution. If everything goes well on your side, i'll make a new release version to include this fix so you can vendor it properly.

@JiangtianLi
Copy link
Author

@leonelquinteros Thanks for the fix. Will try and update here.

@JiangtianLi
Copy link
Author

It solved the issue in my case. Thanks for the prompt fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants