Hypergen Translation Plugin
Translation plugin for Django Hypergen. Processes the AST of Hypergen template python files and inserts them into the database for translation.
Provides the TranslationPlugin that makes Hypergen liveviews and actions translatable based on the current django translation language.
Usage
Installation:
pip install hypergen-translation-plugin
Change settings.py:
# Add to installed apps:
INSTALLED_APPS = [
...
'hypergen_translation'
]
# Select which importable modules to look for translatable strings in.
HYPERGEN_TRANSLATION_MODULES = ["hypergen_first_app.views"]
# The base dir of the git/whatever project.
HYPERGEN_TRANSLATION_PROJECT_DIR = BASE_DIR.parent
# Optionally display link directly to file and linenumber for each translation occurence.
HYPERGEN_TRANSLATION_GITHUB = "https://github.com/runekaagaard/hypergen-translation-plugin"
# Optionally link to another branch than main.´ on github.
HYPERGEN_TRANSLATION_BRANCH = "dev"
Collection collections and store it in the database:
python manage.py hypergen_translation_collect
Then edit in the admin.
Add plugin to liveviews and actions:
from hypergen_translation.plugins import TranslationPlugin
@liveview(..., user_plugins=[TranslationPlugin()])
def my_view(request):
p("translate this!")
Metadata
Release files for hypergen-translation-plugin 0.1.3
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 |
|---|---|---|---|---|
| hypergen-translation-plugin-0.1.3.tar.gz | 12.8 kB | Without provenance | Details for hypergen-translation-plugin-0.1.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| hypergen_translation_plugin-0.1.3-py3-none-any.whl | Python 3 | none | any | Details for hypergen_translation_plugin-0.1.3-py3-none-any.whl |
Total release size: 27.3 kB
Release files / hypergen-translation-plugin-0.1.3.tar.gz
| Download URL | hypergen-translation-plugin-0.1.3.tar.gz |
|---|---|
| Size | 12.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b740ea57ff8b4e17eeef1531d45521ddc5d8d5d1dcfe6935aaf74b6cadb19435
|
|
BLAKE2b-256 checksum How to use checksums |
af1c987cfdfe4812c3ef62ddb6a696125a2682ba09fc133078cb807edf9cc98c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.9.6 readme-renderer/42.0 requests/2.31.0 requests-toolbelt/1.0.0 urllib3/2.1.0 tqdm/4.66.1 importlib-metadata/7.0.0 keyring/24.3.0 rfc3986/2.0.0 colorama/0.4.6 CPython/3.9.18
|
Release files / hypergen_translation_plugin-0.1.3-py3-none-any.whl
| Download URL | hypergen_translation_plugin-0.1.3-py3-none-any.whl |
|---|---|
| Size | 14.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
64f5504c7c6dcb0a8e6f73ea16f74585fa775dc981ad34a595aabd2fcf141d1f
|
|
BLAKE2b-256 checksum How to use checksums |
b124adaddc6f0bb3a8e60482242f446441a01c59069fe06395da625557060bdb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.9.6 readme-renderer/42.0 requests/2.31.0 requests-toolbelt/1.0.0 urllib3/2.1.0 tqdm/4.66.1 importlib-metadata/7.0.0 keyring/24.3.0 rfc3986/2.0.0 colorama/0.4.6 CPython/3.9.18
|
Security for hypergen-translation-plugin 0.1.3
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.