Opened 8 years ago
Last modified 14 months ago
#26803 new New feature
Add a statistics option to makemessages
Reported by: | Vlastimil Zíma | Owned by: | |
---|---|---|---|
Component: | Internationalization | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Sage Abdullah, HarryKane | Triage Stage: | Accepted |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
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 (11)
comment:1 by , 8 years ago
comment:2 by , 8 years ago
Not only the po header. All the file changes - new messages are added, obsolete are removed or marked, etc.
comment:3 by , 8 years ago
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 by , 8 years ago
If it also returns appropriate exit code, similar to makemigrations --exit
, then yes.
comment:5 by , 8 years ago
Summary: | Allow makemessages to be used for validation of gettext files → Add a statistics option to makemessages |
---|---|
Triage Stage: | Unreviewed → Accepted |
comment:6 by , 8 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
Looking into this during DjangoCon EU 2017 sprints.
comment:7 by , 6 years ago
Posted a PR: https://github.com/django/django/pull/11226
Exit code part is not that straightforward to implement so that it is reliable enough.
comment:8 by , 5 years ago
I closed #31048 as a partial duplicate. It suggested using --dry-run
instead of --exit
which seems more consistent with other commands.
comment:9 by , 3 years ago
Owner: | removed |
---|---|
Status: | assigned → new |
comment:10 by , 18 months ago
Cc: | added |
---|
comment:11 by , 14 months ago
Cc: | added |
---|
What change do you talk about? The date field in the po header?