--
Ticket URL: <https://code.djangoproject.com/ticket/17375>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0
Comment:
Seems to trigger this bug: https://savannah.gnu.org/bugs/index.php?35027
One possible workaround in makemessages could be to pass a list of files
to xgettext instead of concatenating messages for each individual file, as
xgettext seems to properly handle the merge.
--
Ticket URL: <https://code.djangoproject.com/ticket/17375#comment:1>
* stage: Unreviewed => Accepted
--
Ticket URL: <https://code.djangoproject.com/ticket/17375#comment:2>
* owner: nobody => pigletto
* needs_tests: 0 => 1
--
Ticket URL: <https://code.djangoproject.com/ticket/17375#comment:3>
* needs_tests: 1 => 0
Comment:
This issue doesn't exist anymore in current trunk (1.4).
Attached test for this specific case.
--
Ticket URL: <https://code.djangoproject.com/ticket/17375#comment:4>
* status: new => assigned
--
Ticket URL: <https://code.djangoproject.com/ticket/17375#comment:5>
Comment (by claudep):
The only reason it is working in your patch is that the msgid of the
problematic string in test.html has a msgctxt line.
--
Ticket URL: <https://code.djangoproject.com/ticket/17375#comment:6>
Comment (by pigletto):
Ok, right, it fails for blocktrans that doesn't use 'context'. Uploaded
patch solves issue as suggested by using xgettext call with multiple files
at once.
One thing to modify there yet is to make use of -f, --files-from in cmd
for xgettext, instead of passing great amount of parameters.
--
Ticket URL: <https://code.djangoproject.com/ticket/17375#comment:7>
* cc: pigletto (added)
--
Ticket URL: <https://code.djangoproject.com/ticket/17375#comment:8>
Comment (by pigletto):
Uploaded issue_17375.2.diff that uses --files-from parameter for xgettext.
Now patch seems to be complete for me.
--
Ticket URL: <https://code.djangoproject.com/ticket/17375#comment:9>
* stage: Accepted => Ready for checkin
Comment:
Looks and works OK.
--
Ticket URL: <https://code.djangoproject.com/ticket/17375#comment:10>
Comment (by jezdez):
This doesn't apply to trunk anymore.
--
Ticket URL: <https://code.djangoproject.com/ticket/17375#comment:11>
* needs_better_patch: 0 => 1
* has_patch: 0 => 1
* stage: Ready for checkin => Accepted
Comment:
Indeed, patch no longer applies.
--
Ticket URL: <https://code.djangoproject.com/ticket/17375#comment:12>
Comment (by pigletto):
OK, I'm going to update it soon
--
Ticket URL: <https://code.djangoproject.com/ticket/17375#comment:13>
* needs_better_patch: 1 => 0
Comment:
Patch updated
--
Ticket URL: <https://code.djangoproject.com/ticket/17375#comment:14>
Comment (by claudep):
#22671 was a duplicate
--
Ticket URL: <https://code.djangoproject.com/ticket/17375#comment:15>
* needs_better_patch: 0 => 1
Comment:
Patch no longer applies cleanly.
--
Ticket URL: <https://code.djangoproject.com/ticket/17375#comment:16>
* cc: m17.admin@… (added)
* owner: pigletto => sergeykolosov
Comment:
Working on it.
--
Ticket URL: <https://code.djangoproject.com/ticket/17375#comment:17>
* needs_better_patch: 1 => 0
Comment:
Created a PR with another implementation based on the original idea from
Claude:
https://github.com/django/django/pull/5187
--
Ticket URL: <https://code.djangoproject.com/ticket/17375#comment:18>
* needs_better_patch: 0 => 1
Comment:
Left some comments for improvement.
--
Ticket URL: <https://code.djangoproject.com/ticket/17375#comment:19>
* needs_better_patch: 1 => 0
Comment:
PR updated: https://github.com/django/django/pull/5187
--
Ticket URL: <https://code.djangoproject.com/ticket/17375#comment:20>
* stage: Accepted => Ready for checkin
Comment:
Claude, could you take a look?
--
Ticket URL: <https://code.djangoproject.com/ticket/17375#comment:21>
Comment (by claudep):
Looks like a solid patch. Thanks Sergey!
--
Ticket URL: <https://code.djangoproject.com/ticket/17375#comment:22>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"e75882332c8593a1d5a47f9f1e099e9201b12296" e7588233]:
{{{
#!CommitTicketReference repository=""
revision="e75882332c8593a1d5a47f9f1e099e9201b12296"
Fixed #17375 -- Changed makemessages to use xgettext with --files-from
Changed the way makemessages invokes xgettext from one call per
translatable file to one call per locale directory (using --files-from).
This allows to avoid https://savannah.gnu.org/bugs/index.php?35027 and,
as a positive side effect, speeds up localization build.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/17375#comment:23>
Comment (by Claude Paroz <claude@…>):
In [changeset:"185f90c45f4398f186ee9dffe1c9bd7392a47686" 185f90c]:
{{{
#!CommitTicketReference repository=""
revision="185f90c45f4398f186ee9dffe1c9bd7392a47686"
Adapted _assertPoLocComment for multi-file source lines in po files
Refs #17375.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/17375#comment:24>