Opened 9 years ago
Closed 9 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 , 9 years ago
| Component: | Uncategorized → Core (Management commands) |
|---|---|
| Summary: | New argument for makemessages: --add-location=full|file|never → Add makemessages --add-location=full|file|never option |
| Triage Stage: | Unreviewed → Accepted |
comment:2 by , 9 years ago
| Cc: | added |
|---|---|
| Owner: | changed from to |
| Status: | new → assigned |
comment:3 by , 9 years ago
| Has patch: | set |
|---|
comment:4 by , 9 years ago
| Patch needs improvement: | set |
|---|
comment:5 by , 9 years ago
| Triage Stage: | Accepted → Ready for checkin |
|---|
PR