{
"info": {
"author": "Wil Clouser",
"author_email": "wclouser@mozilla.com",
"bugtrack_url": null,
"classifiers": [
"Development Status :: 4 - Beta",
"Environment :: Web Environment",
"Environment :: Web Environment :: Mozilla",
"Framework :: Django",
"Intended Audience :: Developers",
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Topic :: Software Development :: Libraries :: Python Modules"
],
"description": "=====\nTower\n=====\n\nTower provides some additional functionality to Jinja and it's i18n extension,\nand the Babel library.\n\n* Author: Wil Clouser and contributors_\n* Licence: BSD\n* Compatibility: Python 2.6 and 2.7, Django 1.4, 1.5 and 1.6\n* Requirements: django, babel, jinja2, jingo and translate-toolkit\n* Project URL: https://github.com/clouserw/tower\n* Documentation: http://tower.readthedocs.org/en/latest/\n\n.. _contributors: https://github.com/clouserw/tower/contributors\n\nSpecifics:\n\n- Pulls strings from a variety of sources: Python, JavaScript, and .lhtml files.\n- Collapses whitespace in all strings to prevent unwieldy msgids.\n- Supports Gettext context (msgctxt) in all gettext, and ngettext calls.\n- Supports merging PHP and Python .pot files. This is temporary. If you want\n to support that for an extended time look at phppo2pypo in the `Translate Toolkit\n `_.\n\n\nRequirements\n============\n\n* Django\n* Babel\n* Jinja2 and Jingo\n* translate-toolkit\n\nSee `requirements.txt `_\nfor details.\n\n\nInstallation\n============\n\nInstall from pypi with::\n\n pip install tower\n\nSource code is at ``_.\n\nInstall from GitHub with::\n\n pip install -e git://github.com/clouserw/tower.git#egg=tower\n\n\nConfigure\n=========\n\nAdd to ``INSTALLED_APPS`` in your Django settings file::\n\n INSTALLED_APPS = (\n # ...\n 'tower',\n # ...\n )\n\nThen configure.\n\n``django.conf.settings.DOMAIN_METHODS``\n\n **Default:** None--you must set this.\n\n The value is a dict of domain to file spec and extraction method tuples.\n\n For example, this creates a domain \"messages\" and in that domain\n extracts all the l10n strings from .py and .html files::\n\n DOMAIN_METHODS = {\n 'messages': [\n ('fjord/**.py', 'tower.tools.extract_tower_python'),\n ('fjord/**.html', 'tower.tools.extract_tower_template'),\n ]\n }\n\n Use ``tower.tools.extract_tower_python`` for Python files and\n ``tower.tools.extract_tower_template`` for Jinja2 templates.\n\n The l10n strings will be saved in a .pot file with the name of the\n domain. In the above example, it'd be ``messages.pot``.\n\n``django.conf.settings.STANDALONE_DOMAINS``\n\n **Default:** ``['messages']``\n\n By default, all domains specified in ``DOMAIN_METHODS`` get merged\n into one big .pot file. If you don't want that, you can specify\n which domains get their own .pot file with ``STANDALONE_DOMAINS``.\n\n``django.conf.settings.TOWER_KEYWORDS``\n\n TODO: Document this.\n\n``django.conf.settings.TOWER_ADD_HEADERS``\n\n **Default:** False\n\n If you have trouble extracting strings with Tower, try setting this\n to True.\n\n``django.conf.settings.ROOT``\n\n This points to the source code directory where you want your\n ``locale/`` directory to be.\n\n``django.conf.settings.path``\n\n This is a function that takes arbitrary set of args and combines\n them with ``ROOT`` to form a new path.\n\n Example::\n\n import os\n\n # The settings file is in fjord/fjord/settings/base.py. From\n # base, up two directories is the initial fjord directory\n # which is where all the source code and the fjord Django\n # project are.\n ROOT = os.path.dirname(os.path.dirname(__file__))\n\n path = lambda *args: os.path.abspath(os.path.join(ROOT, *args))\n\n\nUsage\n=====\n\nExtract::\n\n ./manage.py extract\n\n\nMerge::\n\n ./manage.py merge\n\n\nA note on whitespace\n====================\n\nWhen tower extracts strings, it collapses whitespace. This makes it easier\nfor localizers. It also means you need to use ugettext, ungettext, ugettext_lazy\nand ungettext_lazy from tower. Otherwise the msgids being passed in won't have\ntheir whitespace stripped and thus won't match anything in your .mo file.\n\n\nA note on ``safe``-ness\n=======================\n\nL10n strings are marked \"safe\" for Jinja2 automatically, so they will not be\nHTML-escaped::\n\n {{ _('Hello World') }}\n\nThis works as expected. When interpolating into an L10n string, however, it will\nbe marked as \"unsafe\" and escaped, unless you use `jingo's\n`_ ``|fe()`` helper (which will escape the\narguments but not the string they are interpolated into). Like this::\n\n {{ _('Hello {0}')|fe(user.nickname) }}\n\n\nRun tests\n=========\n\nRun::\n\n python run_tests.py",
"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/clouserw/tower",
"keywords": null,
"license": "BSD",
"maintainer": null,
"maintainer_email": null,
"name": "tower",
"package_url": "https://pypi.org/project/tower/",
"platform": "UNKNOWN",
"project_url": "https://pypi.org/project/tower/",
"project_urls": {
"Download": "UNKNOWN",
"Homepage": "http://github.com/clouserw/tower"
},
"release_url": "https://pypi.org/project/tower/0.4.1/",
"requires_dist": null,
"requires_python": null,
"summary": "Pull strings from a variety of sources, collapse whitespace, support context (msgctxt), and merging .pot files.",
"version": "0.4.1"
},
"last_serial": 1035202,
"releases": {
"0.3.4": [
{
"comment_text": "",
"digests": {
"md5": "ae98c38986206a1262061154659b27e8",
"sha256": "d302a6c5bc799db2813ff3adb841a45c46ef9ab368aa3d6c4e14a76096985176"
},
"downloads": -1,
"filename": "tower-0.3.4.tar.gz",
"has_sig": false,
"md5_digest": "ae98c38986206a1262061154659b27e8",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 11959,
"upload_time": "2012-08-02T20:32:34",
"url": "https://files.pythonhosted.org/packages/5a/98/70b24f87e4692b941efb18ff2526549fd9cdec1158947d271ff13b21a390/tower-0.3.4.tar.gz"
}
],
"0.4.1": [
{
"comment_text": "",
"digests": {
"md5": "8db1d1bdb8afcfc1b2c5083bc3e55b17",
"sha256": "b13b8c19d9c36143fd614e535c23fdbe7b146cb82b8d9a246ecacb368e14d2dd"
},
"downloads": -1,
"filename": "tower-0.4.1.tar.gz",
"has_sig": false,
"md5_digest": "8db1d1bdb8afcfc1b2c5083bc3e55b17",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 15830,
"upload_time": "2014-03-19T16:55:18",
"url": "https://files.pythonhosted.org/packages/cf/53/5b6063fa2e03d53b8782fa6c01bf6676a60cd186eed47914a02c269ac239/tower-0.4.1.tar.gz"
}
]
},
"urls": [
{
"comment_text": "",
"digests": {
"md5": "8db1d1bdb8afcfc1b2c5083bc3e55b17",
"sha256": "b13b8c19d9c36143fd614e535c23fdbe7b146cb82b8d9a246ecacb368e14d2dd"
},
"downloads": -1,
"filename": "tower-0.4.1.tar.gz",
"has_sig": false,
"md5_digest": "8db1d1bdb8afcfc1b2c5083bc3e55b17",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 15830,
"upload_time": "2014-03-19T16:55:18",
"url": "https://files.pythonhosted.org/packages/cf/53/5b6063fa2e03d53b8782fa6c01bf6676a60cd186eed47914a02c269ac239/tower-0.4.1.tar.gz"
}
]
}