Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

Buildout recipe to extract i18n files in Silva

Project Description

infrae.i18nextract is a buildout recipe which create a script to extract i18n strings from multiple packages into a .pot. A script to merge or compile all available translations is also available.

The script support extraction from Python Script, Zope Page Template, Chameleon Page Template, Formulator forms and Silva Metadata schemas.

Exemple in buildout:

recipe = infrae.i18nextract
packages =
output = ${buildout:directory}
output-package = silva.translations
domain = silva
extra-paths = ${zope2:location}/lib/python


List of packages to extract translation from.
Output directory for the created template file.
If specified, you will be able to create the template file directly inside that package.
Translation domain to use.
List of directories that contains Zope Products (Python packages that must loaded using the import path Products rather than their own).
Extra python path to add in order to able to load the Python code to extract translations strings from it.


Two scripts are created:

That do extract the translations. The option -p saves the created template file in the output-package specified in the buildout part.

Manage translation files in the output-package specified in the buildout part:

  • -m merge the translation template file into all existing translations files.
  • -c compile all existing translations files.

The last script requires to have the commands msgfmt and msgmerge installed on the system (available in gettext).


1.3.1 (2013-05-23)

  • Add support to extract the title and description fields from the Silva Metadata files.

1.3 (2012-08-17)

  • Add two options --export-tarball to create an archive that can be used to upload translations to Launchpad, and --import-tarball that can be used to import a tarball from Lanchpad.
  • Add zope-products options to enable extraction in code that uses old Zope products.

1.2.1 (2011-02-07)

  • .xml files are not always Silva Metadata. Don’t fail if they can’t be parsed as such.

1.2 (2010-10-06)

  • Rename the merge script into manage. Add an option to compile translation files.
  • Fix logging output that was wrong when the translation contained dots.

1.1 (2010-04-26)

  • Add support for extra-paths so the recipe can be used with older Zope version in buildout.
  • Add a script to merge translations.

1.0 (2010-04-02)

  • Initial version, built from previous Infrae package i18nextract-sa.
Release History

Release History

This version
History Node


History Node


History Node


History Node


History Node


History Node


Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
infrae.i18nextract-1.3.1.tar.gz (8.0 kB) Copy SHA256 Checksum SHA256 Source May 23, 2013

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting