Skip to main content

l10n and .po/.pot file tools

Project description

Dennis is a command line tool for translating and linting .po files.

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. 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 lint 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 with HTML in the strings in place into Pirate!:

$ dennis-cmd translate --pipeline=html,pirate \
    locale/xx/LC_MESSAGES/messages.po

Get help:

$ dennis-cmd

Project details

Code:

http://github.com/willkg/dennis

Documentation:

http://dennis.rtfd.org/

Issue tracker:

https://github.com/willkg/dennis/issues

License:

BSD 3-clause; see LICENSE file

Donate:

gittip

Why is it called Dennis?

This is how I name my software projects.

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

dennis-0.6.tar.gz (39.2 kB view details)

Uploaded Source

Built Distribution

dennis-0.6-py2.py3-none-any.whl (30.8 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file dennis-0.6.tar.gz.

File metadata

  • Download URL: dennis-0.6.tar.gz
  • Upload date:
  • Size: 39.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for dennis-0.6.tar.gz
Algorithm Hash digest
SHA256 1bfc6b5126faffac8ca5f04a811e00eec384ca64bd1dc6c58a2bc83c22f9bd65
MD5 08a430e1b4d11dc04a550bf8499851eb
BLAKE2b-256 c63fd1bc1d397de26cad3cd1d7f901c048f0a3663489d807f1792a239a49cd7c

See more details on using hashes here.

Provenance

File details

Details for the file dennis-0.6-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for dennis-0.6-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 cc6c9d1ac52ba5797707940f309cfbd35580c75eebdaeec40805dae38b9ac649
MD5 c6030ecd657e8430554c7310537b19f2
BLAKE2b-256 0a161a84c62d047096bd4f013705f453adb9c74283f6305997f131f41b99a0d8

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page