Metadata-Version: 2.1
Name: hypergen-translation-plugin
Version: 0.1.1
Summary: Translation plugin for Django Hypergen
Home-page: https://github.com/runekaagaard/hypergen-translation-plugin/
Author: Rune Kaagaard
Author-email: rumi.kg@gmail.com
Project-URL: Bug Tracker, https://github.com/runekaagaard/hypergen-translation-plugin/issues
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)
Classifier: Operating System :: OS Independent
Classifier: Framework :: Django
Classifier: Development Status :: 5 - Production/Stable
Requires-Python: >=3.7
Description-Content-Type: text/x-rst
License-File: LICENSE

Hypergen Translation Plugin
===========================

Translation plugin for `Django Hypergen <https://github.com/runekaagaard/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"
