GNU gettext has supported `--add-location=full|file|never` since March
2014, in order to ease the version control of po files:
{{{
‘--add-location=type’
Generate ‘#: filename:line’ lines (default).
The optional type can be either ‘full’, ‘file’, or ‘never’. If it is
not given or ‘full’, it generates the lines with both file name and line
number. If it is ‘file’, the line number part is omitted. If it is
‘never’, it completely suppresses the lines (same as --no-location).
}}}
Supporting commands are: msgattrib, msgcat, msgcomm, msgconv, msgen,
msgfilter, msggrep, msgmerge, msguniq, and xgettext
I'm proposing to support this argument in Django makemessages command. As
for implementation, we may simply validate the argument and pass it to
msgmerge, msguniq, msgattrib and xgettext (the commands that we use).
I'd love to make a pull request if this ticket is validated.
--
Ticket URL: <https://code.djangoproject.com/ticket/28015>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* component: Uncategorized => Core (Management commands)
* stage: Unreviewed => Accepted
--
Ticket URL: <https://code.djangoproject.com/ticket/28015#comment:1>
* cc: ling-xiao.yang@… (added)
* status: new => assigned
* owner: nobody => Ling-Xiao Yang
--
Ticket URL: <https://code.djangoproject.com/ticket/28015#comment:2>
* has_patch: 0 => 1
Comment:
[https://github.com/django/django/pull/8333 PR]
--
Ticket URL: <https://code.djangoproject.com/ticket/28015#comment:3>
* needs_better_patch: 0 => 1
--
Ticket URL: <https://code.djangoproject.com/ticket/28015#comment:4>
* stage: Accepted => Ready for checkin
--
Ticket URL: <https://code.djangoproject.com/ticket/28015#comment:5>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"04ab96ec4fa7b8ce9a006cc929c152e137ac3a77" 04ab96ec]:
{{{
#!CommitTicketReference repository=""
revision="04ab96ec4fa7b8ce9a006cc929c152e137ac3a77"
Fixed #28015 -- Added makemessages --add-location option.
Thanks François Freitag for review.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/28015#comment:6>