7

For example, why authors of "django-cms" keep gettext's mo files in repo (and this is not just inattention, see this commit), if users always can run manage.py compilemessages? Only to save users from this step and make installation process a little bit easier?

There are lot of other examples: django-filer and even django itself!

Thanks!

neoascetic
  • 2,476
  • 25
  • 34
  • Related https://stackoverflow.com/q/3719243/11715259 , specially this discussion https://stackoverflow.com/questions/3719243/best-practices-for-adding-gitignore-file-for-python-projects/14058267#comment63198538_14058267 – N1ngu Aug 30 '23 at 14:05
  • Also related https://stackoverflow.com/q/20714572/11715259 – N1ngu Aug 30 '23 at 14:11

2 Answers2

3

Usually you don't keep generated files in repository, and that't right.

But sometimes your app installed as-is, e.g. from pypi. In this case, user will not run compilemessages and it makes sense to keep precompiled .mo files in distro

Marat
  • 15,215
  • 2
  • 39
  • 48
0

There is a long-ago open discussion about that https://code.djangoproject.com/ticket/23321

My 2-cents: it sort of acknowledges this is a bad practice in the Django ecosystem but the grounds for not addressing this can be reduced to "the gettext dependency can be hard to fulfill or behave abnormally on certain platforms (mainly Windows) so people working on a development version could have trouble having their setup localized."

Pretty flaky point IMHO but that should answer your "what's the benefit" question.

N1ngu
  • 2,862
  • 17
  • 35