#16084: makemessages command doesn't respect LOCALE_PATHS setting at all -------------------------------------+------------------------------------- Reporter: heylinus | Owner: nobody Type: New | Status: closed feature | Component: Milestone: | Internationalization Version: 1.3 | Severity: Normal Resolution: invalid | Keywords: Triage Stage: | Has patch: 0 Unreviewed | Needs tests: 0 Needs documentation: 0 | Easy pickings: 0 Patch needs improvement: 0 | -------------------------------------+------------------------------------- Changes (by aaugustin):
* status: new => closed * type: Bug => New feature * resolution: => invalid Comment: Currently, `makemessages` doesn't handle multiple `locale` folders at all. It is hardcoded to run: - from django's source tree: it will gather all translations in `./conf/locale`, except those from the contrib apps, - from a project's or an app's source tree: it will gather all translations in `./locale`, and it requires this directory to exist, so you must create it manually before you run `makemessages` for the first language. The proper way to run `makemessages` is : `cd yourapp; django-admin.py makemessages ...`. That raises no warnings I agree it's a bit tedious if you maintain one set of translation set per app, like I do. But it works as documented on https://docs.djangoproject.com/en/1.3/howto/i18n/ (search for "To create message files..."). So we can't count this as a bug. ---- Let's imagine an improved `makemessages` that would look for `locale` directories in the whole subtree, and for each of them, run the equivalent of the current `makemessages` from the containing directory. There are some edge cases: what if you have `foo/locale/bar/locale`?. And this still doesn't handle `LOCALE_PATHS`, because when django just gets a catalog from `LOCALE_PATHS`, it has no way to know where the corresponding source files are. To sum up, there is no bug, and making `makemessages` smarter would be hard, enough to require a discussion on the django-developers mailing list. As a consequence, I will close the ticket. If you want to improve `makemessages`, could you elaborate your proposal on the mailing list? -- Ticket URL: <https://code.djangoproject.com/ticket/16084#comment:3> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to django-updates@googlegroups.com. To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-updates?hl=en.