Opened 7 years ago

Closed 7 years ago

#28015 closed New feature (fixed)

Add makemessages --add-location=full|file|never option

Reported by: Ling-Xiao Yang Owned by: Ling-Xiao Yang
Component: Core (Management commands) Version: dev
Severity: Normal Keywords:
Cc: ling-xiao.yang@… Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: yes
Easy pickings: no UI/UX: no

Description

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.

Change History (6)

comment:1 by Tim Graham, 7 years ago

Component: UncategorizedCore (Management commands)
Summary: New argument for makemessages: --add-location=full|file|neverAdd makemessages --add-location=full|file|never option
Triage Stage: UnreviewedAccepted

comment:2 by Ling-Xiao Yang, 7 years ago

Cc: ling-xiao.yang@… added
Owner: changed from nobody to Ling-Xiao Yang
Status: newassigned

comment:3 by Ling-Xiao Yang, 7 years ago

Has patch: set

comment:4 by Ling-Xiao Yang, 7 years ago

Patch needs improvement: set

comment:5 by François Freitag, 7 years ago

Triage Stage: AcceptedReady for checkin

comment:6 by Tim Graham <timograham@…>, 7 years ago

Resolution: fixed
Status: assignedclosed

In 04ab96ec:

Fixed #28015 -- Added makemessages --add-location option.

Thanks François Freitag for review.

Note: See TracTickets for help on using tickets.
Back to Top