Skip to main content

Translation plugin for Django Hypergen

Project description

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"

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

hypergen-translation-plugin-0.1.1.tar.gz (12.5 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file hypergen-translation-plugin-0.1.1.tar.gz.

File metadata

  • Download URL: hypergen-translation-plugin-0.1.1.tar.gz
  • Upload date:
  • Size: 12.5 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for hypergen-translation-plugin-0.1.1.tar.gz
Algorithm Hash digest
SHA256 76b7c5a55610f62bc866ff2f86b0421e4d62c73bc3a9446af75d5a4dd723ffb8
MD5 1a72b5eeeacdd9466b1322a8ab35b6b9
BLAKE2b-256 06d9984a1a80698473ac79284698d05fdb5dceabb111fed9282a16bd909464a0

See more details on using hashes here.

File details

Details for the file hypergen_translation_plugin-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: hypergen_translation_plugin-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 14.3 kB
  • Tags: Python 3
  • Uploaded using 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

File hashes

Hashes for hypergen_translation_plugin-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6103bf49434179b05f06ee128414a561b493d00b4689f5558d4efb66ba1e4366
MD5 a75f2fb79047ad3e1163eba1529fda8b
BLAKE2b-256 03d6caab1e14423113614f4e7fd8d100a75fff960d379739d2c9fd5f8bc2a9ab

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