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

Run compilemessages command to keep .mo files in sync #1299

Merged
merged 1 commit into from Nov 14, 2021

Conversation

SupraSummus
Copy link
Contributor

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.

@matthewhegarty
Copy link
Contributor

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.

@coveralls
Copy link

coveralls commented Oct 18, 2021

Coverage Status

Coverage remained the same at 98.063% when pulling 01b704d on SupraSummus:locale into 97a9232 on django-import-export:main.

@manelclos
Copy link
Contributor

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?

@matthewhegarty
Copy link
Contributor

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 changelog.rst changes in, and also as part of this PR the new make messages command should be run. This should help to ensure that they don't slip out of date again.

@manelclos
Copy link
Contributor

Awesome, let's keep them then.

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 this pull request may close these issues.

None yet

4 participants