#29797: Allow the makemessages command to accept a directory to operate on like xgettext does -------------------------------------+------------------------------------- Reporter: Terence Honles | Owner: Terence | Honles Type: New feature | Status: new Component: Core (Management | Version: 2.1 commands) | Severity: Normal | Resolution: Keywords: | Triage Stage: | Unreviewed Has patch: 1 | Needs documentation: 0 Needs tests: 0 | Patch needs improvement: 0 Easy pickings: 1 | UI/UX: 0 -------------------------------------+-------------------------------------
Comment (by Claude Paroz): Replying to [comment:6 Terence Honles]: > I **am** able to ignore directories properly with `--ignore`, however I still don't see what is wrong with being able to set the `root` for `find_files`. First I think that `makemessages` has already lots of options, and I don't like seeing the list growing version after version. But probably the most compelling reason is that for options that are meant to always been set for some project (typically in your case), adding options seems not the way to go in my opinion. Options are good for real options, that is an optional choice the runner of the command may activate or not depending on some preference. Typically, the locale to generate messages for (with `--locale`). I'm aware that with this rule, several existing options should go away, too! So to come back to your case, I would be open to make the `find_files` root more configurable, not through an option, but with a command attribute, so you could add your own `makemessages` command subclass in your project with something like this: {{{ from django.core.management.commands.makemessages import Command as MakeMessagesCommand class Command(MakeMessagesCommand): files_root = 'django_app' }}} Would you find that satisfactory for your use case? -- Ticket URL: <https://code.djangoproject.com/ticket/29797#comment:7> 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 unsubscribe from this group and stop receiving emails from it, send an email to django-updates+unsubscr...@googlegroups.com. To post to this group, send email to django-updates@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/071.c3405ac821b1e80a51a99df6e8d37dc9%40djangoproject.com. For more options, visit https://groups.google.com/d/optout.