Skip to main content
Archived

This project has been archived by its maintainers, and is no longer receiving any updates.

puente

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

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, but heavily changed.

This project is lightly maintained, and the goal is to phase it out, replacing it with standard Django for most cases, and Babel for more complex cases. For more information, see the issues and the 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.

History

1.0.0 (May 11th, 2022)

Backwards incompatible changes:

  • Dropped support for Python < 3.7.

  • Dropped support for Django < 3.2.

  • Ended the project. Please switch to something else.

Changes:

  • Added support for Django 3.2.

  • Added support for Python 3.7, 3.8, 3.9, and 3.10.

  • Fixed issues with recent Jinja2 releases.

  • Switched to semver!

0.5 (March 3rd, 2017)

  • Drop support for Django 1.7 and Jingo

  • Add support for Python 3.5 and 3.6

  • Add support for Django 1.9, 1.10 and 1.11b1 (#59) (Thank you, Thor K. H!)

0.4.1 (December 10th, 2015)

  • Add all the Django keywords for extraction (#53)

0.4 (November 20th, 2015)

  • Implement pgettext and npgettext (#45)

  • Remove undocumented STANDALONE_DOMAINS setting and fix extract/merge code (#44)

  • Add ngettext tests

  • Rework gettext code, clarify documentation and add tests (#42)

  • Project infrastructure fixes

0.3 (November 5th, 2015)

  • add “Translators:” to the translator prefix list (#34)

  • make puente.ext.i18n be an alias for puente.ext.PuenteI18nExtension

  • fix the gettext alias to be moar korrect (#35)

  • fix the jingo-related docs in regards to extensions (#35)

  • lots of changes to the Migrating from Tower document

  • fleshed out test_project_jingo so we can use it for development

  • fixed merge to handle LANGUAGES setting correctly

  • first pass on Python 3.4 support (pretty sure it works) (#15)

  • logo (#37)

0.2 (October 30th, 2015)

  • fix requirements

  • remove mention of elasticutils in release process

  • fix meta information regarding python 3–we don’t support that, yet

0.1 (October 30th, 2015)

Initial writing. Everything has changed!

Metadata

Release files for puente 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for puente 1.0.0
File Size Uploaded
puente-1.0.0.tar.gz 124.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for puente 1.0.0
File Interpreter ABI Platform
puente-1.0.0-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 143.1 kB

Release files / puente-1.0.0.tar.gz

Download URL puente-1.0.0.tar.gz
Size 124.5 kB
Tags Source
SHA-256 checksum
How to use checksums
3a30eb6668705a002f5eaee1386e3e11d26805ba41d8e4853d864b1170451111
BLAKE2b-256 checksum
How to use checksums
1ba282788de306b515a72aab908e308b162512fb3921107ee647caa3f337042d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.9.7

Release files / puente-1.0.0-py2.py3-none-any.whl

Download URL puente-1.0.0-py2.py3-none-any.whl
Size 18.7 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
faafd55d0cbc204b60d58969675435087b18b5ff43edebaacff822b2ff93b255
BLAKE2b-256 checksum
How to use checksums
219fca5fee366fc55eedd3f6495c1fad463aa48b7357e9be34a84dd77750925c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.9.7
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page