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
The *.mo translation files have been recompiled #6
Conversation
I recompiled the po files using zest.pocompile (another beer for @mauritsvanrees).
|
This breaks tests? How come this breaks tests? (Also I'm not very happy with compilation artefacts being committed in the repo, and I would like some reassurances that the binary |
The mo files should be removed from the repo, and only included in the releases (with zest.releaser+zest.pocompile) like I do with plone.app.locales. |
Is there a way to make zest.releaser do that automatically, and most importantly abort if zest.pocompile is not available? Because if I ever need to make a release, I will run |
Theoretically, you could add A future option might be to have something in
Then No way comes to mind that currently works, except installing |
For safety reasons we could add a check in |
I fixed the build by removing fuzzy in the tr and pl po files are rerunning pocompile. I am also +1 to remove the *.mo files from the repo, but this PR is focused on fixing the state of the art of the package and I opened #7 to discuss that. |
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.
This PR fixes the current problem so I am fine with it. For the future it would be nice to get rid of the .mo files from the repos.
In my projects I create the .mo files at runtime by setting the following environment variables:
zope_i18n_allowed_languages=de,en,es,fr
zope_i18n_compile_mo_files=True
This instructs zope.i18n
to create the .mo files at runtime, see https://github.com/zopefoundation/zope.i18n/blob/0df6ea60c8cd9f2efa98bf1c8e5ae4c8d7a34f76/src/zope/i18n/zcml.py#L92
I do this too in all my Plone projects. But when you build the site as one user and run it as a different user with less permissions, that user may not have permission to write the |
@ale-rt Feel free to merge. I can create a release afterwards. |
I just released https://pypi.org/project/zope.app.locales/4.0.1/. |
Closes #5