#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
-------------------------------------+-------------------------------------
Changes (by Terence Honles):
* status: closed => new
* resolution: wontfix =>
Comment:
Replying to [comment:2 Claude Paroz]:
> Mmmh, not convinced yet. You have at least four possible workarounds,
the one you mentioned in the ticket description, moving the .venv to a
superior level, using the `--ignore` flag or create your own makemessages
command subclass and complete the `xgettext_options` attribute.
> I think this should be enough.
Adding to `xgettext_options` is not applicable because the list of files
to process is enumerated **by this command** and not xgettext which is
**why** I said this is allowing the command to emulate `xgettext`. Yes, I
could override the command and replace `find_files` to ignore the value
passed to it and hardcode the value I would pass for `-D` but having a
custom command that is making `find_files` ignore the only argument passed
to it seems silly and prone to error. The function already takes a
variable, why isn't it being used?
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]
Moving the venv to a superior level is not acceptable because it is
already at the root of the repository.
Of course I can continue doing what I am doing, but I don't understand why
this **very simple** change which is **built in to xgettext** is not
acceptable. Please just look at the diff! It's 6 lines of code that
changed (4 of the 6 are just to take the command line argument) and makes
the function `find_files` actually useful. Why was it written to take an
argument but that argument always "."?
--
Ticket URL: <https://code.djangoproject.com/ticket/29797#comment:4>
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/071.86ba7c2ff99f0c5ef7f981a8956acde9%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.