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.
* 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>
* status: new => assigned
* owner: nobody => sergeykolosov
Comment:
Working on it
--
Ticket URL: <https://code.djangoproject.com/ticket/26341#comment:2>
* 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>
* 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>
* 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>
* 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>
* stage: Accepted => Ready for checkin
--
Ticket URL: <https://code.djangoproject.com/ticket/26341#comment:7>
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>
Comment (by timgraham):
Fine by me. Note looks good.
--
Ticket URL: <https://code.djangoproject.com/ticket/26341#comment:9>
* 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>
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>
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>
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>
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>
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>