django-autotranslate
A simple Django app to automatically translate the pot (.po) files generated by django's makemessages command
using google translate.
Installation:
pip install django-autotranslate
Add 'autotranslate' to your INSTALLED_APPS setting.
INSTALLED_APPS = (
...
'autotranslate',
)
Quickstart:
python manage.py translate_messages
The command finds all the generated pot (.po) files under the locale paths (LOCALE_PATHS) specified in django project settings, and translates them automatically.
Options:
-f, --set-fuzzy: Set the 'fuzzy' flag on autotranslated entries-l, --locale 'locale': Only translate the specified locales-u, --untranslated: Only translate the untranslated messages-s, --source-language: Override the default source language (en) used for translation
python manage.py translate_messages -l 'de' -l 'es'
Settings:
- Use a different Translation Service:
# default: 'autotranslate.services.GoSlateTranslatorService'
# pip install google-api-python-client
AUTOTRANSLATE_TRANSLATOR_SERVICE = 'autotranslate.services.GoogleAPITranslatorService'
GOOGLE_TRANSLATE_KEY = '<google-api-key>'
Compatibility Matrix:
| autotranslate | django |
|---|---|
| v1.0.x | Django 1.5+ |
| v1.1.x | Django 1.8+ |
Tests:
# run test against all environments
tox
# run test against a specific environment defined in tox.ini
# eg. django>1.9 & python3.4
tox -e dj19-py34
Metadata
Release files for arvin-django-autotranslate 1.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| arvin-django-autotranslate-1.4.0.tar.gz | 9.3 kB | Without provenance | Details for arvin-django-autotranslate-1.4.0.tar.gz |
Release files / arvin-django-autotranslate-1.4.0.tar.gz
| Download URL | arvin-django-autotranslate-1.4.0.tar.gz |
|---|---|
| Size | 9.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
41e05854cd4453ba6c26706036c5dcb4b315f8d82ff27cfc382f64b5d4f4f9cf
|
|
BLAKE2b-256 checksum How to use checksums |
feb888fdf19fa852c2249f2a4d11a44a647abe6111f70c739dbc6511b46eaf1d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.4
|
Security for arvin-django-autotranslate 1.4.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.