Utilities for working with PO and POT files to ease development and improve localization quality
Project description
Dennis is a set of utilities for working with PO files to ease development and improve quality. Translate POT files to find problems with localization in your code. Lint PO files for common problems like variable formatting, mismatched HTML, missing variables, etc.
It includes the following subcommands:
lint: Lints PO and POT files for problems including errors that can cause your production system to crash and problems in strings that can lead to poor translations.
The system allows for defining other variable formats.
status: Get a high-level status of a PO file including a list of unstranslated strings.
translate: Translates strings in PO files into something else! Comes with an HTML extractor (tokenizes strings so that only the text is translated) and a bunch of translations like Pirate!.
This is helpful for l10n testing, development, finding unicode/layout problems, amazing your friends, hilarious April 1st shenanigans, etc.
Specify the tokenizer/transform pipeline you want to use that combines things. Zombie? Sure! Shouty Zombie? Ok! Manic shouty Dubstep? Bring it on!
This also works on strings passed in as command line arguments and as stdin—it doesn’t have to be a PO file or in a PO format format. For example, Dennis uses Dennis to translate all Dennis commit messages into Pirate!. That’s how cool Dennis is!
Quick start
Install:
$ pip install dennis $ pip install blessings # Optional for prettier output
Lint a PO file for problems:
$ dennis-cmd lint locale/fr/LC_MESSAGES/messages.po
Lint all your PO files for errors:
$ dennis-cmd lint --errorsonly locale/
Lint a POT file for problems:
$ dennis-cmd lint locale/templates/LC_MESSAGES/messages.pot
Translate a PO file in place into Pirate!:
$ dennis-cmd translate --pipeline=html,pirate \ locale/xx/LC_MESSAGES/messages.po
Get help:
$ dennis-cmd
Project details
- Code:
- Documentation:
- Issue tracker:
- License:
BSD 3-clause; see LICENSE file
- Donate:
Why is it called Dennis?
This is how I name my software projects.
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
File details
Details for the file dennis-0.9.tar.gz
.
File metadata
- Download URL: dennis-0.9.tar.gz
- Upload date:
- Size: 43.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8c942dd5da7d03c65daebc069c5ee5c7f1374ac9b0c8c89c627caa66fe822604 |
|
MD5 | 2636710455435f612e8595c659e2c746 |
|
BLAKE2b-256 | d6d5e08176134e184d994f753388a8876d983f7d5e05dc360fddaa8a186a8b30 |
Provenance
File details
Details for the file dennis-0.9-py2.py3-none-any.whl
.
File metadata
- Download URL: dennis-0.9-py2.py3-none-any.whl
- Upload date:
- Size: 33.4 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f6487392ac91800c5f0684a99b404b7fd0f72ceb48faeb5a0ce4e2c24fb62d3f |
|
MD5 | 7f9f79c7918516992e7e37ff03348d68 |
|
BLAKE2b-256 | 2d2e2cb43a5e787387b558d2eeefc2713305d2df97c4622cee37b1e6f5505031 |