[Django] #26341: Weird comments in PO files (.html.py filenames)

16 views
Skip to first unread message

Django

unread,
Mar 9, 2016, 5:09:35 PM3/9/16
to django-...@googlegroups.com
#26341: Weird comments in PO files (.html.py filenames)
--------------------------------------+--------------------
Reporter: sylvain-garancher | Owner: nobody
Type: Bug | Status: new
Component: Internationalization | Version: 1.9
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+--------------------
I just upgraded Django to 1.9.4 from 1.8.10, and sometimes, the filenames
in PO files comments contain ".html.py" extensions.

This is visible on django's main repository :
https://github.com/django/django/blob/ae4d932b1ac12651a7c57d89742c25483ee8c9f9/django/contrib/admin/locale/en/LC_MESSAGES/django.po#L282
https://github.com/django/django/blob/4323676ea5ab6994feb1385522665069d84f397b/django/contrib/admin/locale/en/LC_MESSAGES/django.po#L302

In this example, the "contrib/admin/templates/admin/base_site.html" file
is now named "contrib/admin/templates/admin/base_site.html.py" (with a
trailing ".py") in the po file.
This seems to appear only on lines with a python file before the template
html file.

claudep found that this could be the faulty commit :
https://github.com/django/django/commit/e75882332c

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

Django

unread,
Mar 9, 2016, 5:17:10 PM3/9/16
to django-...@googlegroups.com
#26341: Weird comments in PO files (.html.py filenames)
--------------------------------------+------------------------------------

Reporter: sylvain-garancher | Owner: nobody
Type: Bug | Status: new
Component: Internationalization | Version: 1.9
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 claudep):

* needs_better_patch: => 0
* stage: Unreviewed => Accepted
* needs_tests: => 0
* needs_docs: => 0


Comment:

We used to create messages file by file, and then we could make a simple
replace to remove that temporary `.py` extension. Now that we are calling
gettext for a bunch of files, some source comments might contain more than
one source on a single line. The replacement algorithm in
`postprocess_messages` of the makemessages command doesn't catch those
occurrences.

--
Ticket URL: <https://code.djangoproject.com/ticket/26341#comment:1>

Django

unread,
Apr 1, 2016, 1:04:00 PM4/1/16
to django-...@googlegroups.com
#26341: Weird comments in PO files (.html.py filenames)
-------------------------------------+-------------------------------------
Reporter: sylvain-garancher | Owner:
| sergeykolosov
Type: Bug | Status: assigned
Component: | Version: 1.9
Internationalization |

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 sergeykolosov):

* status: new => assigned
* owner: nobody => sergeykolosov


Comment:

Working on it

--
Ticket URL: <https://code.djangoproject.com/ticket/26341#comment:2>

Django

unread,
Apr 3, 2016, 11:33:52 AM4/3/16
to django-...@googlegroups.com
#26341: Weird comments in PO files (.html.py filenames)
-------------------------------------+-------------------------------------
Reporter: sylvain-garancher | Owner: veranika-
| sab

Type: Bug | Status: assigned
Component: | Version: 1.9
Internationalization |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by veranika-sab):

* owner: sergeykolosov => veranika-sab
* has_patch: 0 => 1


Comment:

PR https://github.com/django/django/pull/6404

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

Django

unread,
Apr 5, 2016, 11:50:07 AM4/5/16
to django-...@googlegroups.com
#26341: Weird comments in PO files (.html.py filenames)
-------------------------------------+-------------------------------------
Reporter: sylvain-garancher | Owner: veranika-
| sab
Type: Bug | Status: assigned
Component: | Version: 1.9
Internationalization |
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 timgraham):

* stage: Accepted => Ready for checkin


Comment:

Left a few cosmetic comments. Claude, could you check it too?

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

Django

unread,
Apr 26, 2016, 8:41:30 PM4/26/16
to django-...@googlegroups.com
#26341: Weird comments in PO files (.html.py filenames)
-------------------------------------+-------------------------------------
Reporter: sylvain-garancher | Owner: veranika-
| sab
Type: Bug | Status: assigned
Component: | Version: 1.9
Internationalization |
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 timgraham):

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


Comment:

There's a test failure in the latest iteration of the patch.

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

Django

unread,
Apr 28, 2016, 4:27:22 PM4/28/16
to django-...@googlegroups.com
#26341: Weird comments in PO files (.html.py filenames)
-------------------------------------+-------------------------------------
Reporter: sylvain-garancher | Owner: veranika-
| sab
Type: Bug | Status: assigned
Component: | Version: 1.9
Internationalization |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

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

* needs_better_patch: 1 => 0


Comment:

New [https://github.com/django/django/pull/6530 PR].

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

Django

unread,
Apr 29, 2016, 7:59:03 AM4/29/16
to django-...@googlegroups.com
#26341: Weird comments in PO files (.html.py filenames)
-------------------------------------+-------------------------------------
Reporter: sylvain-garancher | Owner: veranika-
| sab
Type: Bug | Status: assigned
Component: | Version: 1.9
Internationalization |
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 timgraham):

* stage: Accepted => Ready for checkin


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

Django

unread,
Apr 29, 2016, 5:22:48 PM4/29/16
to django-...@googlegroups.com
#26341: Weird comments in PO files (.html.py filenames)
-------------------------------------+-------------------------------------
Reporter: sylvain-garancher | Owner: veranika-
| sab
Type: Bug | Status: assigned
Component: | Version: 1.9
Internationalization |
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
-------------------------------------+-------------------------------------

Comment (by claudep):

Should I backport to 1.9?
The note could be: `Fixed a ``makemessages`` regression where temporary
``.py`` extensions were leaked in source file paths (:ticket:`26341`).`

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

Django

unread,
Apr 29, 2016, 8:53:46 PM4/29/16
to django-...@googlegroups.com
#26341: Weird comments in PO files (.html.py filenames)
-------------------------------------+-------------------------------------
Reporter: sylvain-garancher | Owner: veranika-
| sab
Type: Bug | Status: assigned
Component: | Version: 1.9
Internationalization |
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
-------------------------------------+-------------------------------------

Comment (by timgraham):

Fine by me. Note looks good.

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

Django

unread,
Apr 30, 2016, 6:09:34 AM4/30/16
to django-...@googlegroups.com
#26341: Weird comments in PO files (.html.py filenames)
-------------------------------------+-------------------------------------
Reporter: sylvain-garancher | Owner: veranika-
| sab
Type: Bug | Status: closed
Component: | Version: 1.9
Internationalization |
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 Claude Paroz <claude@…>):

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


Comment:

In [changeset:"b16b124996b8f5c1f922cec688d32553b8ab94b8" b16b1249]:
{{{
#!CommitTicketReference repository=""
revision="b16b124996b8f5c1f922cec688d32553b8ab94b8"
Fixed #26341 -- Fixed makemessages breaking location comments for HTML
files

Thanks Sylvain Garancher for the report and Veranika Sabiashchanskaya for
the
initial patch.
}}}

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

Django

unread,
Apr 30, 2016, 6:12:31 AM4/30/16
to django-...@googlegroups.com
#26341: Weird comments in PO files (.html.py filenames)
-------------------------------------+-------------------------------------
Reporter: sylvain-garancher | Owner: veranika-
| sab
Type: Bug | Status: closed
Component: | Version: 1.9
Internationalization |
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
-------------------------------------+-------------------------------------

Comment (by Claude Paroz <claude@…>):

In [changeset:"4a6bdff43047acbf8743ad8b332e37e529898c27" 4a6bdff4]:
{{{
#!CommitTicketReference repository=""
revision="4a6bdff43047acbf8743ad8b332e37e529898c27"
[1.9.x] Fixed #26341 -- Fixed makemessages breaking location comments for
HTML files

Thanks Sylvain Garancher for the report and Veranika Sabiashchanskaya for
the
initial patch.

Backport of b16b124996 from master.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/26341#comment:11>

Django

unread,
Apr 30, 2016, 6:22:44 AM4/30/16
to django-...@googlegroups.com
#26341: Weird comments in PO files (.html.py filenames)
-------------------------------------+-------------------------------------
Reporter: sylvain-garancher | Owner: veranika-
| sab
Type: Bug | Status: closed
Component: | Version: 1.9
Internationalization |
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
-------------------------------------+-------------------------------------

Comment (by Claude Paroz <claude@…>):

In [changeset:"004fa09d5b2f4dac45d4b3f43a1157007382d7b3" 004fa09d]:
{{{
#!CommitTicketReference repository=""
revision="004fa09d5b2f4dac45d4b3f43a1157007382d7b3"
[1.9.x] Fixed source path in contrib.admin translation catalog

Refs #26341.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/26341#comment:12>

Django

unread,
Apr 30, 2016, 6:22:54 AM4/30/16
to django-...@googlegroups.com
#26341: Weird comments in PO files (.html.py filenames)
-------------------------------------+-------------------------------------
Reporter: sylvain-garancher | Owner: veranika-
| sab
Type: Bug | Status: closed
Component: | Version: 1.9
Internationalization |
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
-------------------------------------+-------------------------------------

Comment (by Claude Paroz <claude@…>):

In [changeset:"b0068af5ffc279c281eca3ee078585076e1c7328" b0068af]:
{{{
#!CommitTicketReference repository=""
revision="b0068af5ffc279c281eca3ee078585076e1c7328"


Fixed source path in contrib.admin translation catalog

Refs #26341.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/26341#comment:13>

Django

unread,
May 2, 2016, 1:40:54 PM5/2/16
to django-...@googlegroups.com
#26341: Weird comments in PO files (.html.py filenames)
-------------------------------------+-------------------------------------
Reporter: sylvain-garancher | Owner: veranika-
| sab
Type: Bug | Status: closed
Component: | Version: 1.9
Internationalization |
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
-------------------------------------+-------------------------------------

Comment (by Claude Paroz <claude@…>):

In [changeset:"4731e9d82ea72b6d793fb06713d11d228eb89ace" 4731e9d]:
{{{
#!CommitTicketReference repository=""
revision="4731e9d82ea72b6d793fb06713d11d228eb89ace"
Fixed #26341 (again) -- Addressed multiple occurrences per line use case
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/26341#comment:14>

Django

unread,
May 2, 2016, 1:42:25 PM5/2/16
to django-...@googlegroups.com
#26341: Weird comments in PO files (.html.py filenames)
-------------------------------------+-------------------------------------
Reporter: sylvain-garancher | Owner: veranika-
| sab
Type: Bug | Status: closed
Component: | Version: 1.9
Internationalization |
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
-------------------------------------+-------------------------------------

Comment (by Claude Paroz <claude@…>):

In [changeset:"9c12eb55ceb2dff6e31399f5e258e4355e883930" 9c12eb5]:
{{{
#!CommitTicketReference repository=""
revision="9c12eb55ceb2dff6e31399f5e258e4355e883930"
[1.9.x] Fixed #26341 (again) -- Addressed multiple occurrences per line
use case

Backport of 4731e9d8 from master.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/26341#comment:15>

Reply all
Reply to author
Forward
0 new messages