Skip to main content

A translation file finder for Weblate, translation tool with tight version control integration

Project description

A translation file finder for Weblate, translation tool with tight version control integration.

Build Status Code coverage Scrutinizer Code Quality Codacy Badge PyPI package

This library is used by Weblate to discover translation files in a cloned repository.

Usage

In can be used from Python:

>>> from translation_finder import discover
>>> discover('.')
[
    {
        "filemask": "locales/*/messages.po",
        "file_format": "po",
        "template": None,
    },
    {
        "filemask": "app/src/res/main/values-*/strings.xml",
        "file_format": "aresource",
        "template": "app/src/res/main/values/strings.xml",
    }
]

Or command line:

$ weblate-discovery translation_finder/test_data/
== Match 1 ==
file_format    : po
filemask       : locales/*.po

== Match 2 ==
file_format    : aresource
filemask       : app/src/res/main/values-*/strings.xml
template       : app/src/res/main/values/strings.xml

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

translation-finder-1.2.tar.gz (27.0 kB view hashes)

Uploaded Source

Built Distribution

translation_finder-1.2-py2.py3-none-any.whl (31.9 kB view hashes)

Uploaded Python 2 Python 3

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