{ "info": { "author": "Oscar Carballal Prego", "author_email": "oscar.carballal@cidadania.coop", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: GNU Affero General Public License v3", "Natural Language :: English", "Operating System :: POSIX :: Linux", "Topic :: Software Development :: Build Tools" ], "description": "django-modular-languages\n========================\n\n**Current version:** 0.5\n\nThis script automates the creation and maintenance of multiple language catalogs\nacross a django project. The current language maintenance tool included in django\ndoes not manage multiple catalogs sparsed through the django project tree, this\nscript ends that. Using this script with transifex-client is a very good option.\n\nHow to install\n==============\n\nTo install this script you must copy it inside your project root (in the same\ndirectory as settings.py) or you can make a \"scripts\" directory inside your\nproject root and copy the script there.\n\nConfiguring django to use the script\n====================================\n\nDjango has (in my opinion) the bad habit of including all the applications in\nthe same variable: INSTALLED_APPS, that is not a good thing, because it doesn't\nisolate the user applications.\n\nWhat you need to do is just that, isolate your applications from the django ones,\nmaking another variable, for example MYPROJECT_APPS and then unite them to the\ndjango ones in INSTALLED_APPS. In this example case, the project applications have\nbeen separated into three categories: DJANGO_APPS, THIRDPARTY_APPS (applications\nincluded in the project but not developed by the team) and MYPROJECT_APPS, including\njust the project application that we have developed.\n\n::\n\n DJANGO_APPS = (\n # This list is from the builtin applications in django. Watch out for\n # applications that need some specific order, like django-grappelli in\n # this case. It's a third part app, but due to the load order, we must\n # put it here.\n 'django.contrib.auth',\n 'django.contrib.contenttypes',\n 'django.contrib.sessions',\n 'django.contrib.staticfiles',\n 'django.contrib.sites',\n 'django.contrib.messages',\n 'grappelli.dashboard',\n 'grappelli',\n 'django.contrib.admin',\n 'django.contrib.comments',\n )\n\n THIRDPARTY_APPS = (\n # This list is from the third party software included in the project or\n # system-wide dependencies.\n 'django_wysiwyg',\n 'myproject.apps.userprofile',\n 'myproject.apps.tagging',\n #'django_extensions',\n )\n\n MYPROJECT_MODULES = (\n # Modules created for the project and installed by default. You can add\n # here your own modules.\n 'myproject.apps.accounts',\n 'myproject.apps.proposals',\n 'myproject.apps.news',\n 'myproject.apps.debate',\n 'myproject.apps.spaces',\n 'myproject.apps.staticpages',\n 'myproject.apps.cal',\n )\n\n INSTALLED_APPS = DJANGO_APPS + THIRDPARTY_APPS + MYPROJECT_MODULES\n\nAfter you have configured your applications variables, you must declare the\nlanguages you will use on the project with LANGUAGES. If you already have a\nmultilingual django project it's quite probable that you already have this\ndefined. If not, you will have to define a python dictionary with LANG_CODE:LANG_NAME. For example::\n\n LANGUAGES = (\n ('es_ES', 'Espanol'),\n ('en_GB', 'English'),\n ('gl_ES', 'Galego'),\n )\n\nHow to use the script\n=====================\n\nThis script is run from the command line, in the project root or in the scripts\ndirectory. If you don't exceute it from there it will fail to locate the\nsettings.py file. It has three basic commands:\n\n * *make* Creates (or updates) all the language catalogs in your project\n * *compile* Compiles after translation all the language catalogs\n * *clean* Removes all the language catalogs from the project. Asks for confirmation first\n \nThere is also a \"help\" command which output is::\n\n $ ./generate_languages.py --help\n usage: generate_languages.py [-h] {make,compile,clean} ...\n\n e-cidadania language catalog generator. This script manages all the .po and\n .mo files from templates, python code and javascript i18n (if used).\n\n positional arguments:\n {make,compile,clean}\n make Create all the language catalogs for translation,\n including JavaScript.\n compile Compile all the language catalogs for use.\n clean Delete all the language catalogs. After this you will\n have to rebuild the catalogs and translate them.\n\n optional arguments:\n -h, --help show this help message and exit\n \nFor example, to create or update your language catalogs, the command would be::\n\n $ python generate_languages.py make\n \nWhich output should be (we're using e-cidadania project as example)::\n\n >> Languages to generate:\n - Espanol\n - English\n - Galego\n\n >> Installed applications:\n - accounts\n - proposals\n - news\n - debate\n - spaces\n - staticpages\n - cal\n\n >> Generating language catalog: accounts\n processing language es_ES\n processing language en_GB\n processing language gl_ES\n\n >> Generating language catalog: proposals\n processing language es_ES\n processing language en_GB\n processing language gl_ES\n\n (after ending the standard catalogs it starts with JavaScript ones)\n \n >> Generating JavaScript language catalog: accounts\n processing language es_ES\n processing language en_GB\n processing language gl_ES\n\n >> Generating JavaScript language catalog: proposals\n processing language es_ES\n processing language en_GB\n processing language gl_ES\n\n (etc., etc.)", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/oscarcp/django-modular-languages", "keywords": "script manage language i18n catalog django project", "license": "GPLv3", "maintainer": null, "maintainer_email": null, "name": "django-modular-languages", "package_url": "https://pypi.org/project/django-modular-languages/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django-modular-languages/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://github.com/oscarcp/django-modular-languages" }, "release_url": "https://pypi.org/project/django-modular-languages/0.5/", "requires_dist": null, "requires_python": null, "summary": "Simple script to manage multiple language catalogs in a django project.", "version": "0.5" }, "last_serial": 790110, "releases": { "0.5": [ { "comment_text": "", "digests": { "md5": "42c8dd16d82121ad696c68de7b5d649f", "sha256": "3251ae7af713358ddd8240026771f8174a5b81072dce1c4582d01d21d9a0e3c2" }, "downloads": -1, "filename": "django-modular-languages-0.5.tar.gz", "has_sig": false, "md5_digest": "42c8dd16d82121ad696c68de7b5d649f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4854, "upload_time": "2012-03-09T13:33:48", "url": "https://files.pythonhosted.org/packages/dd/7c/ab32953f154a9d46e00904070c97350fef5849b64ff2bd413a5f7331ebde/django-modular-languages-0.5.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "42c8dd16d82121ad696c68de7b5d649f", "sha256": "3251ae7af713358ddd8240026771f8174a5b81072dce1c4582d01d21d9a0e3c2" }, "downloads": -1, "filename": "django-modular-languages-0.5.tar.gz", "has_sig": false, "md5_digest": "42c8dd16d82121ad696c68de7b5d649f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4854, "upload_time": "2012-03-09T13:33:48", "url": "https://files.pythonhosted.org/packages/dd/7c/ab32953f154a9d46e00904070c97350fef5849b64ff2bd413a5f7331ebde/django-modular-languages-0.5.tar.gz" } ] }