Skip to main content

A simple Django app to sanitize the output of makemessages command.

Project description

Django Translation Sanitizer

Django Translation Sanitizer is a simple Django app to sanitize the output of makemessages command by disabling fuzzy matching and sorting it's output.

Rationale

When one first create the *.po files with the original makemessages command everything seems nice -- Django make clean file that one can easily edit via text editor.

The actual "mess" comes after command has been running several times -- when Django tries to match previous translations of a changed original it often fails to do it correctly.

The thing is that it fails silently. It takes enormous amounts of time to find and fix the translation issues django had made.

So instead of changing the previous translations this module simply adds the new ones, leaving everything else untouched.

How to use it

  1. Install the package from PyPI like this:

    pip install django-translation-sanitizer
    
  2. Add "translation_sanitizer" to your INSTALLED_APPS setting like this

    INSTALLED_APPS = [
            ...
            'translation_sanitizer',
        ]
    
  3. That's it! Now makemessages command will produce clean, sorted and fuzzy-free output.

Project details


Release history Release notifications | RSS feed

This version

0.1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-tranlation-sanitizer-0.1.tar.gz (3.1 kB view details)

Uploaded Source

File details

Details for the file django-tranlation-sanitizer-0.1.tar.gz.

File metadata

  • Download URL: django-tranlation-sanitizer-0.1.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.3

File hashes

Hashes for django-tranlation-sanitizer-0.1.tar.gz
Algorithm Hash digest
SHA256 fe5081353bdb2b39732676448b05bb774b3fa7cd39d8cec5a73a1752e90c92a2
MD5 2cd13ac5fe3e499525bff3b7acfe7311
BLAKE2b-256 fb87efdc0cb2c42e0d97565ffd1b674574de8556cd124772c012603397fcf6d8

See more details on using hashes here.

Supported by

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