Opened 21 months ago
Closed 17 months ago
#34448 closed Cleanup/optimization (fixed)
makemessages' --no-obsolete option is undocumented and untested.
Reported by: | Tom Sparrow | Owned by: | Tushar |
---|---|---|---|
Component: | Core (Management commands) | Version: | 4.1 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Ready for checkin | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
The documentation for makemessages
is missing the argument --no-obsolete
despite it being present in the source code.
For example it is not mentioned at all here: https://docs.djangoproject.com/en/4.1/ref/django-admin/#makemessages
But is present & working in the source code: https://github.com/django/django/blob/stable/4.1.x/django/core/management/commands/makemessages.py#L312
Is this a deliberate omission?
Change History (10)
comment:1 by , 21 months ago
Component: | Documentation → Core (Management commands) |
---|---|
Summary: | Docs missing --no-obsolete argument to makemessages → makemessages' --no-obsolete option is undocumented and untested. |
Triage Stage: | Unreviewed → Accepted |
Type: | Uncategorized → Cleanup/optimization |
comment:3 by , 18 months ago
Owner: | changed from | to
---|
follow-up: 5 comment:4 by , 18 months ago
Hey, I was playing around with the --no-obsolete
option and found https://stackoverflow.com/a/49372926/12409303. This behavior is true, .po
files are not updated if there are no gettext
present, which means obsolete strings still remain there in the .po
file. Is this the intended behaviour that has to be documented or is it a bug ?
comment:5 by , 17 months ago
Replying to Tushar:
Hey, I was playing around with the
--no-obsolete
option and found https://stackoverflow.com/a/49372926/12409303. This behavior is true,.po
files are not updated if there are nogettext
present, which means obsolete strings still remain there in the.po
file. Is this the intended behaviour that has to be documented or is it a bug ?
This looks like an issue in msgattrib
, not in Django itself.
follow-up: 7 comment:6 by , 17 months ago
Yes, confirmed. This is an issue with msgattrib
. I tried calling it directly and it failed to modify the .po
files if every translation is obsolete. I will add it as a side note while documenting to add more clarity for users.
comment:7 by , 17 months ago
Replying to Tushar:
I will add it as a side note while documenting to add more clarity for users.
We don't document bugs in other tools.
comment:9 by , 17 months ago
Patch needs improvement: | unset |
---|---|
Triage Stage: | Accepted → Ready for checkin |
Thanks for the report, this option is also untested (added in cf179e195d5525e0233385be97a53a6c5d7c6985).