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

Two <BLANKLINE> in generated PO EOFs #799

Open
mondeja opened this issue Aug 20, 2021 · 1 comment
Open

Two <BLANKLINE> in generated PO EOFs #799

mondeja opened this issue Aug 20, 2021 · 1 comment

Comments

@mondeja
Copy link
Contributor

mondeja commented Aug 20, 2021

As is documented, write_po function renders two blank lines at the end of the file. GNU gettext documentation about PO files does not specify that this is mandatory.

I think that this makes no sense, but maybe something could explain why this has been the choice. It creates inconsistent output in diffs, uneeded extra space in disk, and so on... it is just a bad practice for text files.

@akx
Copy link
Member

akx commented Jan 25, 2022

Each message is followed by a trailing newline:

_write('\n')

It's easier to just print one rather than try to figure out when we're printing the last entry and elide the trailing newline.

Patches welcome, of course :)

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

No branches or pull requests

2 participants