pre-commit hooks for PO files
Project description
pre-commit-po-hooks
Hooks for pre-commit useful working with PO files.
Example configuration
- repo: https://github.com/mondeja/pre-commit-po-hooks
rev: v1.0.0
hooks:
- id: obsolete-messages
- id: untranslated-messages
- id: lreplace-extracted-comments
args: ['-m', 'Translators: ', '-r', '']
Hooks
obsolete-messages
Checks for obsolete messages printing their line numbers if found.
untranslated-messages
Checks for untranslated messages printing their line numbers if found.
lreplace-extracted-comments
Replaces a matching string at the beginning of the extracted comments. This can be used to remove the string "Translators: " introduced by Django (see more about this problem in django-rosetta#245).
Parameters
-m/--match "STRING"
: Matching string to be replaced.-r/--replacement "STRING"
: Replacement for the match at the beginning of the extracted comment. If you want to remove the matching beginning you can pass an empty string""
.-d/--dry-run
: Don't do the replacements, only writes to stderr the locations of the extracted comments to be replaced.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for pre_commit_po_hooks-1.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7b093ff5601deb5c8397642742a8e3258f361dbc13c69620b62f616a6dfda6b6 |
|
MD5 | a953a6f511ee6660c04a602c3872f6cf |
|
BLAKE2b-256 | fa2a13c5db48dc79f6233b7870d4087bc1db983782046ba735844558f8ca9fe4 |
Close
Hashes for pre_commit_po_hooks-1.1.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e37d2e49b83bc9096271a3a440899a19c2f31d038295b54b3fc08e5f2bcf8743 |
|
MD5 | f9413c55ddd166faf62e0d8e7a976d40 |
|
BLAKE2b-256 | d3ffc33fd254b918604fbcd10982a3a2ca9494d07daefd3f17c89b6733cac8eb |