Skip to main content

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

Project description

Weblate translation finder in a directory.

Build Status Code coverage 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-0.2.tar.gz (23.7 kB view details)

Uploaded Source

Built Distribution

translation_finder-0.2-py2.py3-none-any.whl (27.5 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file translation-finder-0.2.tar.gz.

File metadata

  • Download URL: translation-finder-0.2.tar.gz
  • Upload date:
  • Size: 23.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1

File hashes

Hashes for translation-finder-0.2.tar.gz
Algorithm Hash digest
SHA256 461058cc01f65d7f7bd15e6fe34f8cb4d69e46d163a170afaf15c4c2dc200007
MD5 68d968019f272c9959f93ccc9a5f4728
BLAKE2b-256 991d12439d9f2aec5d2bc709d3681abe921e0dac01a79d932debc3a972ac51bc

See more details on using hashes here.

File details

Details for the file translation_finder-0.2-py2.py3-none-any.whl.

File metadata

  • Download URL: translation_finder-0.2-py2.py3-none-any.whl
  • Upload date:
  • Size: 27.5 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1

File hashes

Hashes for translation_finder-0.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 f8edd201b331721c1e6b0614ca6208d7c580145d2ca8080048b79a3e5282fb45
MD5 369ba2e44f1fa88275bb39330f29d758
BLAKE2b-256 c7cc1f9186ff5bfdba39b375a0de8e12257d6001518544a1666ca4f11f6b11b5

See more details on using hashes here.

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