-
Notifications
You must be signed in to change notification settings - Fork 296
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
Remove *mo blobs from source control #526
base: main
Are you sure you want to change the base?
Conversation
Ideally only babel or gettext should be required instead of a whole django install just to call the compilemessages management command.
Any chance for this to progress @n1ngu ? This issue is happening in some of my deployments. |
While removing and ignoring *.mo files and fixing strings in *.po files are the starting point to fix the actual issues, this should be followed by either
But right now this is more of a proof-of-concept for a long-ago acknowledged bad practice in the Django ecosystem (see https://code.djangoproject.com/ticket/23321, https://forum.djangoproject.com/t/cease-and-desist-versioning-of-compiled-mo-files/23516). It works, but
So, I think there is little chance for this to progress unless the implementation is discussed with jazzmin maintainers. I am eager to have this discussion but in the meanwhile I am not pushing for this at all. |
|
||
class CustomBuildHook(BuildHookInterface): | ||
def initialize(self, version: str, build_data: dict[str, t.Any]) -> None: | ||
django.core.management.call_command("compilemessages") |
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.
To be clear, I am uncomfortable with the build dependency introduced by this instruction. The only reason to do this was validating the workflow. But if community is ok with removing *.mo files and compiling them at wheel build time and replacing poetry with hatch, I'll invest some effort to rewrite this with babel or gettext.
Compile them at build time with a hatchling custom hook (replacing poetry!)
Closes #505