Opened 12 years ago
Closed 11 years ago
#20566 closed New feature
Store previous string in po files
Reported by: | Michal Čihař | Owned by: | nobody |
---|---|---|---|
Component: | Internationalization | Version: | 1.5 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | yes |
Easy pickings: | no | UI/UX: | no |
Description
Currently while there is changed text to be translated, the string is only marked fuzzy not providing translators any information what has been changed. This can be improved by adding --previous parameter to msgmerge.
There is pull request to implement this at https://github.com/django/django/pull/627
Attachments (1)
Change History (12)
comment:1 by , 12 years ago
Triage Stage: | Unreviewed → Accepted |
---|
comment:2 by , 12 years ago
comment:3 by , 12 years ago
@claudep I think it is nice to provide backwards compatibility, though I don't find it necessary for myself.
comment:5 by , 11 years ago
+1 to Claude proposal. And I don't see any backward incompatibility danger either, any 3rd. party tool handling GNU gettext catalog files should handle (ignore) these comments gracefully.
comment:6 by , 11 years ago
Also, the PR actually proposes making the new behavior (adding the old literal as a comment) the default. And it adds a command line switch to get the old behavior. Maybe we can drop the latter one? (sorry if this was what you meant in the first place).
by , 11 years ago
Attachment: | 20566-poc.diff added |
---|
comment:7 by , 11 years ago
Just attached how I would like to solve this issue (proof-of-concept, untested). If such an approach would be accepted, we then need to document the new class-level attributes and encourage people to subclass and override to customize behaviour.
comment:8 by , 11 years ago
The only reason I've added command option was to follow current state where the options were provided. It would be probably about as useful as --no-location
. Proposed patch looks good to me as it quite simplifies the code.
comment:9 by , 11 years ago
Patch needs improvement: | set |
---|
comment:11 by , 11 years ago
Status: | new → closed |
---|
Argh, sorry. Forgot to add ticket number in the fixing commit:
[06efeae598c6dafbe56d2ea323a0dccdd5bf2b8e]
Added --previous flag to msgmerge command used by makemessages
Also took the opportunity to slightly refactor gettext options
so as to ease customization by subclassing the command.
Thanks Michal Čihař for the report and initial patch.
Will we really offer a management command option for each msgmerge option? What about switching on the
--previous
flag without adding yet another option?