Opened 21 months ago

Last modified 12 months ago

#26803 assigned New feature

Add a statistics option to makemessages

Reported by: Vlastimil Zíma Owned by: Sergey Kolosov
Component: Internationalization Version: master
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


Command makemessage has serious downfall - it always changes at least one *.po file. In order to use makemessages to validate whether gettext catalog is up to date, i.e. all translated messages are in the catalog and there are no extra, the actual change of the *.po file is unwanted.

There should be either option to generate *.pot files only, which would allow msgcmp to be used, or validation mode which would check if the catalog contains all the messages.

Change History (6)

comment:1 Changed 21 months ago by Claude Paroz

What change do you talk about? The date field in the po header?

comment:2 Changed 21 months ago by Vlastimil Zíma

Not only the po header. All the file changes - new messages are added, obsolete are removed or marked, etc.

comment:3 Changed 21 months ago by Claude Paroz

What about a --stats-only option which would not touch existing po files, but merge po files in a temporary directory and output translation statistics for each file? Would it fulfill your use case?

comment:4 Changed 21 months ago by Vlastimil Zíma

If it also returns appropriate exit code, similar to makemigrations --exit, then yes.

comment:5 Changed 21 months ago by Claude Paroz

Summary: Allow makemessages to be used for validation of gettext filesAdd a statistics option to makemessages
Triage Stage: UnreviewedAccepted

comment:6 Changed 12 months ago by Sergey Kolosov

Owner: changed from nobody to Sergey Kolosov
Status: newassigned

Looking into this during DjangoCon EU 2017 sprints.

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