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
Run compilemessages command to keep .mo files in sync #1299
Conversation
47c4362
to
c02ae1f
Compare
Thank you for this @SupraSummus. I made a minor changes to the Makefile to remove a deprecation warning. Feel free to add your name to AUTHORS. |
382fc5b
to
9db3ae1
Compare
Hi, I'm ok with merging the PR as it is now. I strongly agree with @SupraSummus about not keeping the binary (and generated!) files in the repo, there is no easy way to check they are ok. Generating them at build/release time looks more sensible to me. @matthewhegarty what do you think? |
Yes I did wonder about that myself, and I looked into it. Opinion is divided, but I checked, and both Django and Django Rest Framework store their .mo files in the repository. This issue has also been discussed by the Django maintainers, and they decided to keep the .mo files in the repo. Based on that, personally I am OK with it. I was going to write up a process whereby when it comes to releasing, we create a new PR which has the |
Awesome, let's keep them then. |
9db3ae1
to
01b704d
Compare
Problem
Some locales are not working properly when this package is installed from pypi. This is caused by stale .mo files. For example Polish translation .mo file is out of sync since 4d3c9f2
Solution
I've added compilemessages command to the makefile. It makes it harder to forget to update mo file. I've ran the command to sync mo files.
There is another possible solution and that is to remove .mo files from the repository and generate them during build/release time. It seems elegant as there are no binary files in the repo. This approach seems less standard in python ecosystem, however.