Improving default ignore behavior in `compilemessages`
- Dominant language
- No language data
- Stars
- 188
- Forks
- 7
- PR merge metrics
- No merged PRs in 30d
Description
### Code of Conduct
- [x] I agree to follow Django's Code of Conduct
### Feature Description
Provide a more general mechanism for `compilemessages` (and possibly `makemessages`) to derive ignore patterns, reducing the need to repeatedly specify `--ignore` for common project-specific directories.
### Problem
This proposal follows the discussion in Django Trac ticket [#37188](https://code.djangoproject.com/ticket/37188).
Currently, `compilemessages` recursively traverses the project tree looking for locale directories. In projects containing local virtual environments, frontend dependencies, or other generated directories, this can lead to unnecessary processing or even failures when third-party translation files are encountered.
Today, the recommended solution is to pass one or more `--ignore` arguments. While this works, the same ignore patterns often need to be repeated across projects and build scripts.
My original proposal was to ignore a small set of common directories by default. However, during the Trac discussion, maintainers raised valid concerns that maintaining a hardcoded list of ignored directories would create an unnecessary maintenance burden because project layouts and tooling vary widely.
This issue is intended to discuss whether there is a more general approach that would improve the developer experience without relying on a hardcoded list.
### Request or proposal
proposal
### Additional Details
This issue continues the discussion from Django Trac ticket [#37188](https://code.djangoproject.com/ticket/37188), where contributors suggested moving the conversation here to discuss possible approaches before implementing anything.
### Implementation Suggestions
Rather than proposing a specific implementation, I'd like to gather feedback on the overall design.
Some possible directions discussed on the Trac ticket include:
- continuing to rely solely on `--ignore`;
- optionally deriving ignore patterns from a project ignore file (such as `.gitignore` or another user-specified file);
- another approach that avoids maintaining a hardcoded list of directory names.
I'm interested in hearing which direction, if any, best aligns with Django's design philosophy.Feature Description
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reviewing the linked Django Trac ticket #37188 and the current compilemessages and makemessages --ignore behavior. Compare the proposed approaches, including .gitignore or another user-specified file, and clarify the design direction before implementation; done means the project has a settled, maintainable proposal.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- django, python
- Domain
- cli, internationalization, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 28/100