UNMAINTAINED: Django/Jinja2 l10n extract/merge commands and things (Tower replacement)
Перейти к файлу
Will Kahn-Greene d2e24cb1c3
Merge pull request #75 from willkg/last-release
Edits for last release
2022-05-11 16:31:35 -04:00
docs Edits for last release 2022-05-11 16:26:33 -04:00
puente Edits for last release 2022-05-11 16:26:33 -04:00
test_project_django_jinja Edits for last release 2022-05-11 16:26:33 -04:00
tests Edits for last release 2022-05-11 16:26:33 -04:00
.gitignore Add *.sqlite3 to .gitignore 2015-11-19 12:55:38 -05:00
.travis.yml Expand Python / Django test matrix 2019-04-03 10:18:11 -05:00
AUTHORS.rst Prep for v0.4 release 2015-11-20 16:48:58 -05:00
CODE_OF_CONDUCT.md Add Mozilla Code of Conduct file 2019-04-02 16:11:14 -05:00
CONTRIBUTING.rst Change repository to the new location 2015-10-29 20:34:51 -04:00
HISTORY.rst Edits for last release 2022-05-11 16:26:33 -04:00
LICENSE Initial code drop from Fjord 2015-10-26 15:12:08 -04:00
MANIFEST.in Edits for last release 2022-05-11 16:26:33 -04:00
Makefile Edits for last release 2022-05-11 16:26:33 -04:00
README.rst Edits for last release 2022-05-11 16:26:33 -04:00
puente_logo.jpg Add high-impact million-dollar logo 2015-11-05 13:35:25 -05:00
pytest.ini Add tox infrastructure for django 1.7/jingo tests 2015-10-27 14:25:30 -04:00
requirements-dev.txt Edits for last release 2022-05-11 16:26:33 -04:00
setup.cfg Edits for last release 2022-05-11 16:26:33 -04:00
setup.py Edits for last release 2022-05-11 16:26:33 -04:00
tox.ini Edits for last release 2022-05-11 16:26:33 -04:00

README.rst

======
puente
======

**Note (2022-05-11): This project is no longer maintained.**

.. image:: puente_logo.jpg

Puente is a Python library that handles l10n things for Django projects
using Jinja2 templates.

* extract command to extract strings from your project and shove them into a
  ``.pot`` file
* merge command that merges new strings from a ``.pot`` file into locale ``.po``
  files
* code to collapse whitespace for Jinja2's trans block
* add pgettext and npgettext to template environment and they correctly
  escape things and work the same way as Jinja2's newstyle gettext
* configured using Django settings
* solid documentation
* solid tests

This is derived from `Tower <https://github.com/clouserw/tower>`_, but heavily
changed.

This project is lightly maintained, and the goal is to phase it out, replacing
it with
`standard Django <https://docs.djangoproject.com/en/2.2/topics/i18n/translation/>`_
for most cases, and 
`Babel <http://babel.pocoo.org/en/latest/>`_ for more complex cases. For more
information, see the issues and the
`current status of phasing Puente out <https://puente.readthedocs.io/en/latest/goals.html#current-status-of-phasing-puente-out>`_.


:Code:          https://github.com/mozilla/puente/
:Issues:        No longer maintained.
:License:       BSD 3-clause; See LICENSE
:Contributors:  See AUTHORS.rst
:Documentation: https://puente.readthedocs.io/


Install
=======

From PyPI
---------

Run::

    $ pip install puente


For hacking
-----------

Run::

    # Clone the repository
    $ git clone https://github.com/mozilla/puente

    # Create a virtualenvironment
    ...

    # Install Puente and dev requirements
    $ pip install -r requirements-dev.txt


Usage
=====

See `documentation <https://puente.readthedocs.io/>` for configuration and usage.