Metadata-Version: 1.1
Name: wagtailsystemtext
Version: 1.0.3
Summary: Simplified Wagtail system text management
Home-page: https://github.com/frojd/wagtail-systemtext
Author: marteinn
Author-email: martin.sandstrom@frojd.se
License: MIT
Description: Wagtail System Text
        ===================
        
        Simplified Wagtail system text management
        
        Requirements
        ------------
        
        -  Python 2.7
        -  Django 1.8+
        -  Wagtail 1.7+
        
        Installation
        ------------
        
        Install the library with pip:
        
        ::
        
            $ pip install wagtailsystemtext
        
        Quick Setup
        -----------
        
        Make sure wagtailsystemtext is added to your ``INSTALLED_APPS``.
        
        .. code:: python
        
            INSTALLED_APPS = (
                # ...
                'wagtailsystemtext',
            )
        
        Then add SiteSystemTextMiddleware to your middlewares.
        
        .. code:: python
        
            MIDDLEWARE_CLASSES = (
                # ...
                'wagtailsystemtext.middlewares.SiteSystemTextMiddleware',
            )
        
        Done!
        
        Usage
        -----
        
        Drop in gettext replacement
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^
        
        .. code:: python
        
            from wagtailsystemtext.utils import systemtext as _
        
            _('my_text')
            _('main_label', group='buttons')
            _('main_label', group='buttons', default='My label')
        
        Templatetags
        ^^^^^^^^^^^^
        
        .. code:: python
        
            {% load systemtext %}
        
            {% systemtext "my_text" %}
            {% systemtext "main_label" group "buttons" %}
            {% systemtext "main_label" group "buttons" default "My label" %}
        
        Management commands
        ~~~~~~~~~~~~~~~~~~~
        
        -  ``python manage.py find_and_add_systemtext``: Searches after your .py
           and .html files after systemtext implementations and adds them to
           each site.
        
        Settings
        --------
        
        -  ``SYSTEMTEXT_CACHE_PREFIX``: Cache prefix (``"wagtailsystemtext"`` by
           default)
        -  ``SYSTEMTEXT_CACHE_EXPIRY``: Cache expiry in seconds (10 min by
           default)
        -  ``SYSTEMTEXT_REBUILD_ON_SAVE``: If cache should be rebuilt on save
           (``True`` by default)
        -  ``SYSTEMTEXT_USE_DEFAULT_ON_EMPTY``: If present, use default value
           when string is empty (``False`` by default)
        
        Release start
        ~~~~~~~~~~~~~
        
        These hooks will automatically bump the application version when using
        ``git flow release ...``
        
        .. code:: bash
        
            chmod +x $PWD/git-hooks/bump-version.sh
            ln -nfs $PWD/git-hooks/bump-version.sh .git/hooks/post-flow-release-start
            ln -nfs $PWD/git-hooks/bump-version.sh .git/hooks/post-flow-hotfix-start
        
        Roadmap
        -------
        
        -  [x] ``trans`` template tag support
        -  [x] Wagtail admin view with site permissions
        -  [x] Cache-rebild on save through admin
        -  [x] Default text support (on declaration)
        -  [x] Lazy text transforms
        -  [x] Add setting for fallbacking to default if string is empty
        -  [ ] Automatic tag discovery
        -  [ ] Sync command between sites
        -  [ ] Group filter in Wagtail admin
        -  [ ] Last accessed timestamps
        -  [ ] ``blocktrans`` template tag support
        
        Contributing
        ------------
        
        Want to contribute? Awesome. Just send a pull request.
        
        License
        -------
        
        Wagtail System Text is released under the `MIT
        License <http://www.opensource.org/licenses/MIT>`__.
        
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Web Environment
Classifier: Intended Audience :: Developers
Classifier: Natural Language :: English
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Framework :: Django
Classifier: Topic :: Utilities
