[Django] #28015: New argument for makemessages: --add-location=full|file|never

11 views
Skip to first unread message

Django

unread,
Apr 3, 2017, 1:50:41 PM4/3/17
to django-...@googlegroups.com
#28015: New argument for makemessages: --add-location=full|file|never
------------------------------------------+------------------------
Reporter: Ling-Xiao Yang | Owner: nobody
Type: New feature | Status: new
Component: Uncategorized | Version: master
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
------------------------------------------+------------------------
Refs: https://groups.google.com/forum/#!topic/django-
developers/IkrjfBDA7iE

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.

Django

unread,
Apr 5, 2017, 1:39:28 PM4/5/17
to django-...@googlegroups.com
#28015: Add makemessages --add-location=full|file|never option
-------------------------------------+-------------------------------------

Reporter: Ling-Xiao Yang | Owner: nobody
Type: New feature | Status: new
Component: Core (Management | Version: master
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 Tim Graham):

* component: Uncategorized => Core (Management commands)
* stage: Unreviewed => Accepted


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

Django

unread,
Apr 7, 2017, 9:50:24 AM4/7/17
to django-...@googlegroups.com
#28015: Add makemessages --add-location=full|file|never option
-------------------------------------+-------------------------------------
Reporter: Ling-Xiao Yang | Owner: Ling-Xiao
| Yang
Type: New feature | Status: assigned

Component: Core (Management | Version: master
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 Ling-Xiao Yang):

* cc: ling-xiao.yang@… (added)
* status: new => assigned
* owner: nobody => Ling-Xiao Yang


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

Django

unread,
Apr 7, 2017, 1:56:18 PM4/7/17
to django-...@googlegroups.com
#28015: Add makemessages --add-location=full|file|never option
-------------------------------------+-------------------------------------
Reporter: Ling-Xiao Yang | Owner: Ling-Xiao
| Yang
Type: New feature | Status: assigned
Component: Core (Management | Version: master
commands) |
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 Ling-Xiao Yang):

* has_patch: 0 => 1


Comment:

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

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

Django

unread,
Apr 12, 2017, 4:14:00 PM4/12/17
to django-...@googlegroups.com
#28015: Add makemessages --add-location=full|file|never option
-------------------------------------+-------------------------------------
Reporter: Ling-Xiao Yang | Owner: Ling-Xiao
| Yang
Type: New feature | Status: assigned
Component: Core (Management | Version: master
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 Ling-Xiao Yang):

* needs_better_patch: 0 => 1


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

Django

unread,
Apr 23, 2017, 8:41:06 PM4/23/17
to django-...@googlegroups.com
#28015: Add makemessages --add-location=full|file|never option
-------------------------------------+-------------------------------------
Reporter: Ling-Xiao Yang | Owner: Ling-Xiao
| Yang
Type: New feature | Status: assigned
Component: Core (Management | Version: master
commands) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by François Freitag):

* stage: Accepted => Ready for checkin


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

Django

unread,
May 22, 2017, 9:25:31 AM5/22/17
to django-...@googlegroups.com
#28015: Add makemessages --add-location=full|file|never option
-------------------------------------+-------------------------------------
Reporter: Ling-Xiao Yang | Owner: Ling-Xiao
| Yang
Type: New feature | Status: closed

Component: Core (Management | Version: master
commands) |
Severity: Normal | Resolution: fixed

Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham <timograham@…>):

* 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>

Reply all
Reply to author
Forward
0 new messages