{ "info": { "author": "Luke Plant", "author_email": "L.Plant.98@cantab.net", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Framework :: Django :: 1.11", "Framework :: Django :: 2.0", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Natural Language :: English", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6" ], "description": "=============================\ndjango-ftl\n=============================\n\n.. image:: https://badge.fury.io/py/django-ftl.svg\n :target: https://badge.fury.io/py/django-ftl\n\n.. image:: https://readthedocs.org/projects/django-ftl/badge/?version=latest&style=flat\n :target: https://django-ftl.readthedocs.io\n\n.. image:: https://travis-ci.org/django-ftl/django-ftl.svg?branch=master\n :target: https://travis-ci.org/django-ftl/django-ftl\n\n.. image:: https://codecov.io/gh/django-ftl/django-ftl/branch/master/graph/badge.svg\n :target: https://codecov.io/gh/django-ftl/django-ftl\n\ndjango-ftl is a Django package for using for `Fluent `_, a\nlocalization system for today's world.\n\nThis package builds upon the `Python implementation of Fluent\n`_ and provides:\n\n* A structure for setting up and managing your ``.ftl`` files.\n* Methods for switching/setting the current language.\n* Integration into Django templates.\n\n\nWhy would I use this?\n---------------------\n\nThe defacto standard in Django world is GNU Gettext. See this `Fluent vs gettext\n`_ page for a\ncomparison. In brief, here are some advantages:\n\n* Fluent makes concerns like plural rules the job of the translator.\n\n* Fluent gives translators the power to obey language specific rules\n (gender, case, plurals) that the developer may not be aware of,\n and shouldn't have to build into the software.\n\n* Fluent integrates number and date formatting, and gives both developer and\n translators control over these, instead of these having to be handled\n separately, and only controlled by the developer.\n\nTo give an example, in GNU Gettext there is support for plural rules. However,\nthis is the only language specific feature Gettext supports, and it is kind of\nbolted on afterwards. The developer also has to partially hard code the English\nrules (that is, the fact that there are two variants in English), as per the\n`Django docs\n`_:\n\n\n.. code-block:: python\n\n msg = ngettext(\n 'there is %(count)d object.',\n 'there are %(count)d objects.',\n count) % {\n 'count': count,\n }\n\nFinally, this still doesn't work very well, because often you want to special\ncase zero anyway - \"there are no objects\" (or \"your inbox is empty\" etc.)\ninstead of \"there are 0 objects\".\n\nIn Fluent, plural rules are one example of a more generic mechanism for\nselecting variants, and the translator is in control. The equivalent with\nfluent/django-ftl, with special handling of the zero case included, looks like\nthis in an English ``.ftl`` file:\n\n::\n\n there-are-some-objects = { $count ->\n [0] There are no objects.\n [1] There is one object.\n [other] There are { $count } objects.\n }\n\nThe Python code referencing this will only need to use the ID\n(``there-are-some-objects``) and pass the ``$count`` argument.\n\nAnother problem that comes up is gender - for example, in French adjectives must\nagree in gender with the person being described. This can be solved in Fluent by\npassing the gender of the person as an argument, and allowing the translator to\nuse the variant mechanism to write the correct language. This contrasts with GNU\nGettext where the developer would have to create separate message strings for\neach case, because the message format is not powerful enough to allow the\ntranslator to add variant selection. Also, these different message strings will\nbe identical in languages which don't have that feature \u2014 in other words, the\ngrammatical features of all languages end up having a disproportionate affect on\nthe source code and on other translators.\n\n\nDocumentation\n-------------\n\nThe documentation for how to use django-ftl is in the docs/folder and online at\nhttps://django-ftl.readthedocs.io.\n\n\nCredits\n-------\n\nTools used in rendering this package:\n\n* Cookiecutter_\n* `cookiecutter-djangopackage`_\n\n.. _Cookiecutter: https://github.com/audreyr/cookiecutter\n.. _`cookiecutter-djangopackage`: https://github.com/pydanny/cookiecutter-djangopackage\n\n\n\n\nHistory\n-------\n\n0.10 (2019-05-23)\n+++++++++++++++++\n\n* Upgraded to more recent version of fluent.runtime (0.12 with modifications)\n* Fixed ``use_isolating`` behavior (BDI characters are now inserted for HTML messages)\n* Thread-safety fixes for loading bundles.\n* Corrected order of using 'locales' directories found via ``INSTALLED_APPS`` to\n be consistent with normal Django convention.\n\n\n0.9.1 (2019-03-02)\n++++++++++++++++++\n\n* Changed development autoreload mechanism to not interfere with Django's\n development server autoreload.\n* Bug fix for case when invalid mode is specified in template tag.\n* Various fixes and improvements to middlewares (plus tests)\n* Thread-safe Bundle\n* Method for configuring ``ftlmsg`` via context processor.\n\n0.9 (2018-09-10)\n++++++++++++++++\n\n* Working version\n* Depends on our version of python-fluent\n\n0.0.1 (2018-05-19)\n++++++++++++++++++\n\n* First release on PyPI - empty placeholder package\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/django-ftl/django-ftl", "keywords": "django-ftl", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "django-ftl", "package_url": "https://pypi.org/project/django-ftl/", "platform": "", "project_url": "https://pypi.org/project/django-ftl/", "project_urls": { "Homepage": "https://github.com/django-ftl/django-ftl" }, "release_url": "https://pypi.org/project/django-ftl/0.10/", "requires_dist": [ "fluent.runtime", "Django (>=1.11)", "coverage (==4.4.1) ; extra == 'develop'", "mock (>=1.0.1) ; extra == 'develop'", "flake8 (>=2.1.0) ; extra == 'develop'", "codecov (>=2.0.0) ; extra == 'develop'", "flake8-future-import (>=0.4.5) ; extra == 'develop'", "django-functest (==1.0.4) ; extra == 'develop'", "check-manifest ; extra == 'develop'" ], "requires_python": "", "summary": "Django bindings for 'fluent', the localization system for today's world.", "version": "0.10" }, "last_serial": 5304787, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "2df28f257ece5ffac591c213fb1b4637", "sha256": "69146cee4c98ad68728c016ff5a9898527e60032eb92bbf27d90e7def5a59f64" }, "downloads": -1, "filename": "django_ftl-0.0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "2df28f257ece5ffac591c213fb1b4637", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 3770, "upload_time": "2018-05-19T11:44:10", "url": "https://files.pythonhosted.org/packages/3a/a3/3e500b30f6acd13b9e520359188df8f17545a6d64c532b6442771789b072/django_ftl-0.0.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c3beb5383ba4b77a9dca4249fb16519a", "sha256": "5648b1f3f20ce405582fd1cd726f651fb8a0b0e18e48ea690826de4dc4843ff0" }, "downloads": -1, "filename": "django-ftl-0.0.1.tar.gz", "has_sig": false, "md5_digest": "c3beb5383ba4b77a9dca4249fb16519a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5506, "upload_time": "2018-05-19T11:44:12", "url": "https://files.pythonhosted.org/packages/38/e6/a540417d4ecb4af8500c146d2bc80eac14e613bd130449c664efd0dbbb59/django-ftl-0.0.1.tar.gz" } ], "0.10": [ { "comment_text": "", "digests": { "md5": "042dba7600c0ee5caf837f699e480386", "sha256": "05a9084ed93144ce4e92daf1a6dfa3ef552c0417d028a56cf59a54571e4aa622" }, "downloads": -1, "filename": "django_ftl-0.10-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "042dba7600c0ee5caf837f699e480386", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 12701, "upload_time": "2019-05-22T22:13:49", "url": "https://files.pythonhosted.org/packages/89/d0/9ca22b31a4b9b3ef78bdb9e3eb2e86d387e456e38882c5f4e15c6100fd87/django_ftl-0.10-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "698db69e29461cf64e7d279370dbe50c", "sha256": "fc6f0570eb6e50bf737a9ffd55c4bd5b28a9c40b5620064f24528aa167f37701" }, "downloads": -1, "filename": "django-ftl-0.10.tar.gz", "has_sig": false, "md5_digest": "698db69e29461cf64e7d279370dbe50c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 42325, "upload_time": "2019-05-22T22:13:51", "url": "https://files.pythonhosted.org/packages/17/fe/91e27dc1f922a6c0c7a5960b65240268dfdcfbf23c6641458028df21af79/django-ftl-0.10.tar.gz" } ], "0.9.0": [ { "comment_text": "", "digests": { "md5": "595db0be5f150cfef7e2ed176331df67", "sha256": "17903b56458f8830c27583ccaaf3e71c6c77370ce85f7941ca11003b453d1081" }, "downloads": -1, "filename": "django_ftl-0.9.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "595db0be5f150cfef7e2ed176331df67", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 14674, "upload_time": "2018-09-11T07:06:33", "url": "https://files.pythonhosted.org/packages/b2/92/27b4652915fa39d183fd9a96a568f5f893ffd373fb8bb72e735b282674db/django_ftl-0.9.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "cf67c3df37e6793ae75e97c3ec4ae905", "sha256": "a391ad2add024dcf2ccffa074610a8c836489df64b746738259eb863b8934787" }, "downloads": -1, "filename": "django-ftl-0.9.0.tar.gz", "has_sig": false, "md5_digest": "cf67c3df37e6793ae75e97c3ec4ae905", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 36086, "upload_time": "2018-09-11T07:06:34", "url": "https://files.pythonhosted.org/packages/a6/65/b28e38e63a51dbccf797e5909d1596920272a622212e55936f7565b42ef2/django-ftl-0.9.0.tar.gz" } ], "0.9.1": [ { "comment_text": "", "digests": { "md5": "a69aaecc7a4f9ade1c7a9b37c56bd672", "sha256": "af5953ecc632735d8ae3481f9ba5b9cee20a3aec48837e8751b205f050e74353" }, "downloads": -1, "filename": "django_ftl-0.9.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "a69aaecc7a4f9ade1c7a9b37c56bd672", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 12342, "upload_time": "2019-03-08T07:16:30", "url": "https://files.pythonhosted.org/packages/1d/e6/1053d653791d10b6280d3e958173f4b5327ff925f584836bae392788cf3a/django_ftl-0.9.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "514e03f1f226ff01da53476af4210993", "sha256": "2a1a518dc293d2a029f7e9b2c6905372b21f995ff8ef0a305973817522e9fc45" }, "downloads": -1, "filename": "django-ftl-0.9.1.tar.gz", "has_sig": false, "md5_digest": "514e03f1f226ff01da53476af4210993", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 37757, "upload_time": "2019-03-08T07:16:32", "url": "https://files.pythonhosted.org/packages/29/95/bed65fe492c492846817b131882e34381a12836b4f38b8d70e331642d520/django-ftl-0.9.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "042dba7600c0ee5caf837f699e480386", "sha256": "05a9084ed93144ce4e92daf1a6dfa3ef552c0417d028a56cf59a54571e4aa622" }, "downloads": -1, "filename": "django_ftl-0.10-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "042dba7600c0ee5caf837f699e480386", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 12701, "upload_time": "2019-05-22T22:13:49", "url": "https://files.pythonhosted.org/packages/89/d0/9ca22b31a4b9b3ef78bdb9e3eb2e86d387e456e38882c5f4e15c6100fd87/django_ftl-0.10-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "698db69e29461cf64e7d279370dbe50c", "sha256": "fc6f0570eb6e50bf737a9ffd55c4bd5b28a9c40b5620064f24528aa167f37701" }, "downloads": -1, "filename": "django-ftl-0.10.tar.gz", "has_sig": false, "md5_digest": "698db69e29461cf64e7d279370dbe50c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 42325, "upload_time": "2019-05-22T22:13:51", "url": "https://files.pythonhosted.org/packages/17/fe/91e27dc1f922a6c0c7a5960b65240268dfdcfbf23c6641458028df21af79/django-ftl-0.10.tar.gz" } ] }