diff --git a/AUTHORS.rst b/AUTHORS.rst new file mode 100755 index 0000000..bc0e80c --- /dev/null +++ b/AUTHORS.rst @@ -0,0 +1,28 @@ +InfoPortugal, S.A. - https://github.com/infoportugal + +Authors +======= + +Core Committers +--------------- + +* Alexandre Silva +* Diogo Marques +* Eduardo Nogueira +* Rui Martins +* Tiago Costa + +Contributors +------------ + +* `Django-modeltranslation`_ +* `Django-linguo`_ +* Alain Gelinas +* Karl Hobley +* Raphael Grill +* Tom Dyson +* Tim Tan + + +.. _Django-modeltranslation: https://github.com/deschler/django-modeltranslation +.. _Django-linguo: https://github.com/zmathew/django-linguo diff --git a/CHANGELOG.txt b/CHANGELOG.txt new file mode 100755 index 0000000..ad29e52 --- /dev/null +++ b/CHANGELOG.txt @@ -0,0 +1,142 @@ +v0.6.0rc1: +- django-modeltranslation is now a dependency. +- added compatibility with Python 3 (3.3, 3.4, 3.5). +- dropped support for wagtail versions prior to 1.4. +- Fixed: sometimes the required fields weren't marked as so, raising an Exception not caught on the form. +- Fixed: Patch of panels when a custom edit_handler is defined. +- Fixed: set_url_method which caused to child of a page not being updated when the parent path changed. +- Fixed: Validation of duplicated slugs. + +v0.5.0a1: +- Added patching for BaseSetting subclasses + +v0.5.0a: +- Wagtail 1.4.x compatibility (#67) +- ElasticSearch integration (#66) +- Validation of slug uniqueness (#37) +- Patching of inline-panels (#70) +- Deprecated TranslationMixin and SnippetsMixin (#69) + +v0.4.4: +- Fix issue related to Django 1.9.x + +v0.4.3: +- Fixed bug when editing a page and parent url path of some language is None. + +v0.4.2: +- Fixed issue with stream fields (#39). + +v0.4.1: +- Fixed issue related to displaying wrong panels on model creation; + +v0.4: +- Fixed issue related to set_url_path override on parent page; + +v0.3.6: +- Fixed data migrations +- Fixed move page to set url_path for all languages +- Added support for django 1.9 +- Some pep8 fixes +- Fix #44 + +v0.3.5: +- Fixed URL property return None + +v0.3.4: +- Fixed update_translation_fields: added support to foreign keys (#42) + +v0.3.3: +- Added ImageChooserPanel compability (#34) +- use build_localized_fieldname insetead using "%s_%s" only (#40) + +v0.3.2: +- Fixed route() method issue causing invalid field lookup; + +v0.3.1: +- Add support to snippets, using SnippetsTranslationMixin + +v0.3: +- Fix conflicts in migrations with wagtailcore migrations. Now translated fields lives only on Page child classes tables; + +v0.2.4: +- Fix missing Site class import; +- Fix missing reverse function import; + +v0.2.3: +- Add workaround for InlinePanel AttributeError (#31); +- Added support to widget declarations on FieldPanel; +- Fixed missing templatetags folder on pypi package; + +v0.2.2: +- Added duplicate content buttons to translated StreamFieldPanels; + +v0.2.1: +- Fixed missing templatetags folder on pypi package; + +v0.2: +- Support for StreamFields; +- No more django-modeltranslation dependency; + +v0.1.5 + +- Fixed required fields related bug + +v0.1.4 + +- Support for wagtailsearch and wagtailsnippets + +v0.1.3 + +- Support for translated inline panels #8: https://github.com/infoportugal/wagtail-modeltranslation/issues/8 + +v0.1.2 + +- Fixed Problem updating field with null value #6: https://github.com/infoportugal/wagtail-modeltranslation/issues/6 + +v0.1.1 + +- Fixed url_path issue caused by a browser with language different from settings.LANGUAGE_CODE + +v0.1 + +- Minor release working but lacks full test coverage. +- Last version had required fields validation problems, now fixed. + +v0.0.9 + +- Fixed issue that causes duplicated translation fields, preventing auto-slug from working properly. + +v0.0.8 + +- Fixed issue related to deleting a non existing key on PAGE_EDIT_HANDLER dict + +v0.0.7 + +- Fixed set_url_path() translatable model method + +v0.0.6 + +- Fixed js issue related to auto-generating slugs + +v0.0.5 + +- Now using django-modeltranslation 0.9.1; +- Fixed problem related to slug field fallbacks; + +v0.0.4 + +** IMPORTANT: ** make sure that TranslationMixin comes before Page class on model inheritance + +- Fix enhancement #1: url_path translation field +- Now includes a template tag that returns current page url to corresponding translated url +- New management command to update url_path translation fields - **set\_translation\_url\_paths** + +v0.0.3 + +- New methods; +- Now supports required fields; +- Fixed issue related to browser locale; + +v0.0.2 + +- Prepopulated fields now works for translated fields (title and slug) diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100755 index 0000000..8777ece --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1,7 @@ +include *.txt *.rst +recursive-include docs *.rst conf.py Makefile make.bat +recursive-include wagtail_modeltranslation/static * +recursive-include wagtail_modeltranslation/management * +recursive-include wagtail_modeltranslation/templatetags * +global-exclude *.pyc +global-exclude *.DS_Store diff --git a/PKG-INFO b/PKG-INFO new file mode 100644 index 0000000..1d87c49 --- /dev/null +++ b/PKG-INFO @@ -0,0 +1,21 @@ +Metadata-Version: 1.0 +Name: wagtail-modeltranslation +Version: 0.6.0rc1 +Summary: Translates Wagtail CMS models using a registration approach. +Home-page: https://github.com/infoportugal/wagtail-modeltranslation +Author: InfoPortugal S.A. +Author-email: ... +License: New BSD +Description: The modeltranslation application can be used to translate dynamic + content of existing Wagtail CMS models to an arbitrary number of + languages without having to change the original model classes. It + uses a registration approach (comparable to Django's admin app) to + be able to add translations to existing or new projects and is + fully integrated into the Django admin backend. + + The advantage of a registration approach is the ability to add + translations to models on a per-project basis. You can use the + same app in different projects, may they use translations or not, + and you never have to touch the original model class. +Platform: UNKNOWN +Keywords: django wagtail translation i18n diff --git a/README.rst b/README.rst new file mode 100755 index 0000000..655245c --- /dev/null +++ b/README.rst @@ -0,0 +1,93 @@ +================ +Wagtail Modeltranslation +================ + +This app is built using core features of django-modeltranslation: https://github.com/deschler/django-modeltranslation + +It's an alternative approach for i18n support on Wagtail CMS websites. + +The wagtail-modeltranslation application is used to translate dynamic content of +existing Wagtail models to an arbitrary number of languages, without having to +change the original model classes. It uses a registration approach (comparable +to Django's admin app) to add translations to existing or new projects and is +fully integrated into the Wagtail admin UI. + +The advantage of a registration approach is the ability to add translations to +models on a per-app basis. You can use the same app in different projects, +whether or not they use translations, and without touching the original +model class. + + +.. image:: https://github.com/infoportugal/wagtail-modeltranslation/blob/master/screenshot.png?raw=true + :target: https://github.com/infoportugal/wagtail-modeltranslation/blob/master/screenshot.png?raw=true + + +Features +======== + +- Add translations without changing existing models or views +- Translation fields are stored in the same table (no expensive joins) +- Supports inherited models (abstract and multi-table inheritance) +- Handle more than just text fields +- Wagtail admin integration +- Flexible fallbacks, auto-population and more! +- Default Page model fields has translatable fields by default +- StreamFields are now supported! + + +Quick start +=========== + +1. Install :code:`wagtail-modeltranslation`:: + + pip install wagtail-modeltranslation + +2. Add "wagtail_modeltranslation" to your INSTALLED_APPS setting like this (before all apps that you want to translate):: + + INSTALLED_APPS = ( + ... + 'wagtail_modeltranslation', + ) + +3. Add "django.middleware.locale.LocaleMiddleware" to MIDDLEWARE_CLASSES on your settings.py:: + + MIDDLEWARE_CLASSES = ( + ... + 'django.middleware.locale.LocaleMiddleware', + ) + +4. Enable i18n on settings.py:: + + USE_I18N = True + +5. Define available languages on settings.py:: + + LANGUAGES = ( + ('pt', u'Português'), + ('es', u'Espanhol'), + ('fr', u'Francês'), + ) + +6. Create translation.py inside the root folder of the app where the model you want to translate exists:: + + from .models import Foo + from wagtail_modeltranslation.translation import WagtailTranslationOptions + from modeltranslation.decorators import register + + + @register(Foo) + class FooTR(WagtailTranslationOptions): + fields = ( + 'body', + ) + +7. Run :code:`python manage.py makemigrations` followed by :code:`python manage.py migrate` + + +Project Home +------------ +https://github.com/infoportugal/wagtail-modeltranslation + +Documentation +------------- +http://wagtail-modeltranslation-docs.readthedocs.org/en/latest/# diff --git a/screenshot.png b/screenshot.png new file mode 100644 index 0000000..c0a6c55 Binary files /dev/null and b/screenshot.png differ