Re: [Django] #34448: makemessages' --no-obsolete option is undocumented and untested.

21 views
Skip to first unread message

Django

unread,
Mar 31, 2023, 12:36:18 PM3/31/23
to django-...@googlegroups.com
#34448: makemessages' --no-obsolete option is undocumented and untested.
-------------------------------------+-------------------------------------
Reporter: Tom Sparrow | Owner: Basant
Type: | Babu Bhandari
Cleanup/optimization | Status: assigned
Component: Core (Management | Version: 4.1
commands) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Basant Babu Bhandari):

* owner: nobody => Basant Babu Bhandari
* status: new => assigned


Comment:

working on it

--
Ticket URL: <https://code.djangoproject.com/ticket/34448#comment:2>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Jul 12, 2023, 3:19:23 PM7/12/23
to django-...@googlegroups.com
#34448: makemessages' --no-obsolete option is undocumented and untested.
-------------------------------------+-------------------------------------
Reporter: Tom Sparrow | Owner: Tushar
Type: | Status: assigned
Cleanup/optimization |

Component: Core (Management | Version: 4.1
commands) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tushar):

* owner: Basant Babu Bhandari => Tushar


--
Ticket URL: <https://code.djangoproject.com/ticket/34448#comment:3>

Django

unread,
Jul 12, 2023, 4:12:38 PM7/12/23
to django-...@googlegroups.com
#34448: makemessages' --no-obsolete option is undocumented and untested.
-------------------------------------+-------------------------------------
Reporter: Tom Sparrow | Owner: Tushar
Type: | Status: assigned
Cleanup/optimization |
Component: Core (Management | Version: 4.1
commands) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by 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 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 ?

--
Ticket URL: <https://code.djangoproject.com/ticket/34448#comment:4>

Django

unread,
Jul 13, 2023, 6:41:20 AM7/13/23
to django-...@googlegroups.com
#34448: makemessages' --no-obsolete option is undocumented and untested.
-------------------------------------+-------------------------------------
Reporter: Tom Sparrow | Owner: Tushar
Type: | Status: assigned
Cleanup/optimization |
Component: Core (Management | Version: 4.1
commands) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Mariusz Felisiak):

Replying to [comment:4 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 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 ?

This looks like an issue in `msgattrib`, not in Django itself.

--
Ticket URL: <https://code.djangoproject.com/ticket/34448#comment:5>

Django

unread,
Jul 13, 2023, 1:00:35 PM7/13/23
to django-...@googlegroups.com
#34448: makemessages' --no-obsolete option is undocumented and untested.
-------------------------------------+-------------------------------------
Reporter: Tom Sparrow | Owner: Tushar
Type: | Status: assigned
Cleanup/optimization |
Component: Core (Management | Version: 4.1
commands) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Tushar):

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.

--
Ticket URL: <https://code.djangoproject.com/ticket/34448#comment:6>

Django

unread,
Jul 13, 2023, 1:55:00 PM7/13/23
to django-...@googlegroups.com
#34448: makemessages' --no-obsolete option is undocumented and untested.
-------------------------------------+-------------------------------------
Reporter: Tom Sparrow | Owner: Tushar
Type: | Status: assigned
Cleanup/optimization |
Component: Core (Management | Version: 4.1
commands) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Mariusz Felisiak):

Replying to [comment:6 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.

--
Ticket URL: <https://code.djangoproject.com/ticket/34448#comment:7>

Django

unread,
Jul 14, 2023, 12:41:50 AM7/14/23
to django-...@googlegroups.com
#34448: makemessages' --no-obsolete option is undocumented and untested.
-------------------------------------+-------------------------------------
Reporter: Tom Sparrow | Owner: Tushar
Type: | Status: assigned
Cleanup/optimization |
Component: Core (Management | Version: 4.1
commands) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

* needs_better_patch: 0 => 1
* has_patch: 0 => 1


Comment:

[https://github.com/django/django/pull/17070 PR]

--
Ticket URL: <https://code.djangoproject.com/ticket/34448#comment:8>

Django

unread,
Jul 14, 2023, 2:51:34 AM7/14/23
to django-...@googlegroups.com
#34448: makemessages' --no-obsolete option is undocumented and untested.
-------------------------------------+-------------------------------------
Reporter: Tom Sparrow | Owner: Tushar
Type: | Status: assigned
Cleanup/optimization |
Component: Core (Management | Version: 4.1
commands) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Ready for
| checkin

Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

* needs_better_patch: 1 => 0
* stage: Accepted => Ready for checkin


--
Ticket URL: <https://code.djangoproject.com/ticket/34448#comment:9>

Django

unread,
Jul 14, 2023, 4:01:59 AM7/14/23
to django-...@googlegroups.com
#34448: makemessages' --no-obsolete option is undocumented and untested.
-------------------------------------+-------------------------------------
Reporter: Tom Sparrow | Owner: Tushar
Type: | Status: closed

Cleanup/optimization |
Component: Core (Management | Version: 4.1
commands) |
Severity: Normal | Resolution: fixed

Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak <felisiak.mariusz@…>):

* status: assigned => closed
* resolution: => fixed


Comment:

In [changeset:"88a2de3c3906f5acc14bb68e98c128fc13f2f1ae" 88a2de3c]:
{{{
#!CommitTicketReference repository=""
revision="88a2de3c3906f5acc14bb68e98c128fc13f2f1ae"
Fixed #34448 -- Doc'd and tested --no-obsolete option of makemessages.

Co-authored-by: Mariusz Felisiak <felisiak...@gmail.com>
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/34448#comment:10>

Reply all
Reply to author
Forward
0 new messages