A simple gettext .po linter to check for mangled variable names in translations
Project description
lint-po
A simple gettext .po linter to check for mangled variable names in translations.
Features
- reads utf-8 encoded *.po files
- skips
msgid/msgstr
pairs where either value is unset - compares original/translation pairs for common interpolation markers:
- supports
{name}
,{123}
,<123>
,</123>
,<123/>
,%(name)s
- ensures both messages use the same set of variables - no renames, no removals, no additions
- supports
- supports Github Actions error reporting syntax (when
env.GITHUB_ACTIONS
is set)
Example usage
$ lint-po locale/*.po
Difference between msgid="Hello {name}" and msgstr="Bonjour {nom}":
Missing from msgstr: {name}
Unexpected in msgstr: {nom}
at problem.po:2
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
lint-po-0.1.1.tar.gz
(5.8 kB
view details)
Built Distribution
File details
Details for the file lint-po-0.1.1.tar.gz
.
File metadata
- Download URL: lint-po-0.1.1.tar.gz
- Upload date:
- Size: 5.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.0 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 15c8c261a4270270d15bc5058f04b2e6c45805df834f0d65de2bcec63e5fad6f |
|
MD5 | 7da8f2a4e265dda9ed6d1da1bd013018 |
|
BLAKE2b-256 | 7b759a036aeba77fd6123c43f211845ccde72f53dd6b089e2b20fce7302ab53c |
File details
Details for the file lint_po-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: lint_po-0.1.1-py3-none-any.whl
- Upload date:
- Size: 6.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.0 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 229a34f1a1defda6e63e5a4fd6ddc53944f8e8feb54689ff7269014a7db46990 |
|
MD5 | 86b9ed74d2aedcda19295597186885c7 |
|
BLAKE2b-256 | d197ddf497172e16f6b85497e1cc39022ce787d411b74082fe240a30ad469030 |