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 hashes)

Uploaded Source

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