#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 Terence Honles): Replying to [comment:5 Claude Paroz]: > Replying to [comment:4 Terence Honles]: > > Using `--ignore` is heavy handed because it's only a [https://github.com/django/django/blob/497e3942b53bc0d60aa2c688796c5c4bfc4b3df4/django/core/management/commands/makemessages.py#L461 basename check] > > The ignore function just below the line you mention shows that it ignores either on the basename or on the path. Please can you try that again? You're right, I had familiarized myself more with `collectstatic` and it handles things differently. Looking at the code more closely my issue with `collectstatic` may have been the path prefix. 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`. The code I am working with is very largely inherited and there are many directories that need to be excluded so a single argument is preferred over multiple that may need to be updated as files which break `xgettext` are added via other tooling. It is nice to see I was incorrect about `--ignore`, but for maintainability changing the current working directory to exclude all the other files is still more bulletproof than having to update an `--ignore` list. Even better would be defining the `root` because it's more obvious to others than a `cd` dance. -- Ticket URL: <https://code.djangoproject.com/ticket/29797#comment:6> 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.3b2f1dd132e5438fd9430898d42627dc%40djangoproject.com. For more options, visit https://groups.google.com/d/optout.