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

Wrap messages the same way as msgcat #8

Open
mgeisler opened this issue Oct 2, 2023 · 2 comments
Open

Wrap messages the same way as msgcat #8

mgeisler opened this issue Oct 2, 2023 · 2 comments

Comments

@mgeisler
Copy link
Contributor

mgeisler commented Oct 2, 2023

I've noticed that the POT files generated by polib use slightly different wrapping than what msgcat -o foo.pot foo.pot gives. I'm tracking this in google/mdbook-i18n-helpers#32, but I would actually suggest improving this here at the source.

@BrettDong
Copy link
Owner

BrettDong commented Oct 3, 2023

As far as I am aware the text wrapping algorithm is not specified in GNU gettext manual or documentation. Reading GNU gettext source code and then reimplementing the text wrapping algorithm in this library is also not an option, as it may violate the GPL license.

@mgeisler
Copy link
Contributor Author

mgeisler commented Oct 4, 2023

As far as I am aware the text wrapping algorithm is not specified in GNU gettext manual or documentation.

I agree, I haven't found anything about this from reading the docs. I recently merged google/mdbook-i18n-helpers#93, which removes part of the churn by wrapping the filenames in the sources field — with some trial and error, I found a setting which seems to be mostly correct.

Reading GNU gettext source code and then reimplementing the text wrapping algorithm in this library is also not an option, as it may violate the GPL license.

I hadn't thought of that, but it's a good point!

Taking a step back, maybe this isn't really as useful as I first thought. People are generally supposed to use msgmerge to update the PO files: this will normalize the wrapping so the polib wrapping of the POT file is not super important.

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