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

pure python build #103

Open
nijel opened this issue Jan 20, 2025 · 3 comments · May be fixed by #104
Open

pure python build #103

nijel opened this issue Jan 20, 2025 · 3 comments · May be fixed by #104

Comments

@nijel
Copy link
Contributor

nijel commented Jan 20, 2025

Thanks for this package, I was considering doing something like this myself, but never got to it.

Did you consider not depending on msgfmt being installed and do the compilation in Python?

For example, translate-toolkit could do that

from translate.tools.pocompile import convertmo

with open(name, "rb") as pofile, open(output, "wb") as mofile:
   convertmo(pofile, mofile, None)

This is what I use currently: https://github.com/WeblateOrg/language-data/blob/04db63e3e823774a94299c0f8fc533b1617b4cea/setup.py

@jelmer
Copy link
Member

jelmer commented Jan 20, 2025

I'm open to the idea of using something python-native. I don't have any experience with translate-toolkit, but definitely open to the idea of (optionally) supporting it.

@nijel
Copy link
Contributor Author

nijel commented Jan 20, 2025

I can contribute that for the compilation of PO files into MO. (Being translate-toolkit maintainer, I have quite some experience with that 😄).

@jelmer
Copy link
Member

jelmer commented Jan 20, 2025

Ah, nice. Yeah, a contribution to add support for translate-toolkit would be great. For the moment, it would be good to keep supporting msgfmt (e.g. with a flag) even if it's no longer the default.

nijel added a commit to nijel/setuptools-gettext that referenced this issue Jan 21, 2025
This makes the conversion work without external dependencies.

Fixes breezy-team#103
@nijel nijel linked a pull request Jan 21, 2025 that will close this issue
nijel added a commit to nijel/setuptools-gettext that referenced this issue Jan 21, 2025
This makes the conversion work without external dependencies.

Fixes breezy-team#103
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

Successfully merging a pull request may close this issue.

2 participants