Translates Django models using a registration approach.
Find a file
wrwrwr b06e49921b Fixed shadowing of jQuery referenced by a global `jQuery variable by django.jQuery`
in the tabbed admin script.

Javascript has a nasty semantic of moving initializers to the beginning of a block, thus
rewritting ``var a = a || b`` as ``var a; a = a || b``. With such a code, if ``a`` starts
as a global variable with some value, you could think that it would end up having the same
value, but it is actually first set to ``undefined`` at the beginning of the block and
then always set to ``b`` in the statement [1][2].

This is mostly of importance if you actually have more than one jQuery loaded.
For instance, this happens with Mezzanine -- first Grappelli-safe loads a copy, and calls
``$.noConflict`` thus storing its version as ``jQuery``, second is Django, loading another
copy and calling ``django.jQuery = jQuery.noConflict(true)``. So far so good, we have one
copy on ``jQuery`` and another on ``django.jQuery``; jQuery UI chooses to load itself onto
the ``jQuery`` (Grappelli) copy. But now runs the tabbed_translation_fields script, hiding
the jQuery with UI loaded at the very beggining of the first block, and a moment later
complaining that ``.tabs()`` or something else is not defined.

[1]: http://www.ecma-international.org/ecma-262/5.1/#sec-12.2 (note the first paragraph after the grammar)
[2]: http://stackoverflow.com/questions/500431/what-is-the-scope-of-variables-in-javascript (point 8)
2014-10-04 17:52:21 +02:00
docs/modeltranslation Add fallback to values and values_list (close #258). 2014-07-29 17:42:17 +03:00
modeltranslation Fixed shadowing of jQuery referenced by a global `jQuery variable by django.jQuery` 2014-10-04 17:52:21 +02:00
.gitignore Added MANIFEST to .gitignore. 2012-10-19 13:31:04 +02:00
.travis.yml Use Django 1.7 final release in tests. 2014-09-07 21:52:05 +02:00
AUTHORS.rst Prepared 0.8b2 release. 2014-07-18 10:57:55 +02:00
CHANGELOG.txt Prepared 0.8b2 release. 2014-07-18 10:57:55 +02:00
LICENSE.txt Prepared 0.4.0-alpha1 release. 2012-10-12 13:29:13 +00:00
MANIFEST.in Fixed release doesn't include rst files. 2012-10-17 17:41:18 +02:00
PKG-INFO Prepared 0.8b2 release. 2014-07-18 10:57:55 +02:00
README Added a README link to satisfy sdist. 2013-02-10 18:25:59 +01:00
README.rst Added coveralls shield. 2014-07-26 01:27:55 +02:00
runtests.py Add empty MIDDLEWARE_CLASSES to test settings in order to disable system check warning. 2014-09-07 21:43:58 +02:00
setup.py Indicated Python 3.4 support (close #254). 2014-07-11 14:44:16 +02:00
tox.ini Use Django 1.7 final release in tests. 2014-09-07 21:52:05 +02:00
travis.py Auto use newest django micro release in Travis. 2013-04-08 11:41:06 +02:00

================
Modeltranslation
================

The modeltranslation application is used to translate dynamic content of
existing Django 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-app 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.


.. image:: http://img.shields.io/travis/deschler/django-modeltranslation/master.png?style=flat
    :target: https://travis-ci.org/deschler/django-modeltranslation

.. image:: http://img.shields.io/coveralls/deschler/django-modeltranslation.png?style=flat
    :target: https://coveralls.io/r/deschler/django-modeltranslation

.. image:: https://pypip.in/v/django-modeltranslation/badge.png?style=flat
    :target: https://pypi.python.org/pypi/django-modeltranslation/
    :alt: Latest PyPI version

.. image:: https://pypip.in/py_versions/django-modeltranslation/badge.png?style=flat
    :target: https://pypi.python.org/pypi/django-modeltranslation/
    :alt: Supported Python versions

.. image:: https://pypip.in/d/django-modeltranslation/badge.png?style=flat
    :target: https://pypi.python.org/pypi/django-modeltranslation/
    :alt: Number of PyPI downloads


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
- Django admin integration
- Flexible fallbacks, auto-population and more!


Project Home
------------
https://github.com/deschler/django-modeltranslation

Documentation
-------------
https://django-modeltranslation.readthedocs.org/en/latest

Mailing List
------------
http://groups.google.com/group/django-modeltranslation