Skip to main content

Test your translation files

Project description

https://badge.fury.io/py/pytest-translations.png https://travis-ci.org/thermondo/pytest-translations.png?branch=master https://pypip.in/d/pytest-translations/badge.png

py.test plugin to test your translation files.

Usage

install via:

pip install pytest-translations

if you then type:

py.test --translations

every file ending in .mo and .po will be discovered and tested, starting from the command line arguments.

You also can execute only the translation-tests by using:

py.test -m translations --translations

This plugin uses polib to parse and test the catalogs.

Assertions on compiled .mo catalogs

  • there has to be a .po-file with the exact same name (only the different extension)

  • is has to be parseable

  • the .po file compiled again has to lead to the exact same entries

Assertions on plain .po catalogs

  • it has to be parseable

  • there mustn’t be any untranslated entries

  • there mustn’t be any fuzzy entries

  • there mustn’t be any obsolete entries

Developing

happens on https://github.com/thermondo/pytest-translations/

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

pytest-translations-0.2.0.tar.gz (3.2 kB view details)

Uploaded Source

File details

Details for the file pytest-translations-0.2.0.tar.gz.

File metadata

File hashes

Hashes for pytest-translations-0.2.0.tar.gz
Algorithm Hash digest
SHA256 3470fb573d28e0e00802737b51d816cc045eee72ee71eda20374ffff5e5885af
MD5 ee27bba81d07aa0f750662510409fca4
BLAKE2b-256 59dbb7f5420f272dd387ea9e914ebe14d147deb265cb4d908a16a4a5e612739a

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