Welcome, guest | Sign In | My Account | Store | Cart

Notice! PyPM is being replaced with the ActiveState Platform, which enhances PyPM’s build and deploy capabilities. Create your free Platform account to download ActivePython or customize Python with the packages you require and get automatic updates.

Download
ActivePython
INSTALL>
pypm install tranchitella.recipe.i18n

How to install tranchitella.recipe.i18n

  1. Download and install ActivePython
  2. Open Command Prompt
  3. Type pypm install tranchitella.recipe.i18n
 Python 2.7Python 3.2Python 3.3
Windows (32-bit)
0.6 Available View build log
0.5 Available View build log
Windows (64-bit)
0.6 Available View build log
0.5 Available View build log
Mac OS X (10.5+)
0.6 Available View build log
0.5 Available View build log
Linux (32-bit)
0.6 Available View build log
0.5 Available View build log
Linux (64-bit)
0.6 Available View build log
0.5 Available View build log
 
License
GPL 2
Lastest release
version 0.6 on Jun 21st, 2011

tranchitella.recipe.i18n

This buildout recipe creates i18n tools to extract and manage po files. More specifically, i18n messages can occur in Python code, in Chameleon (ZPT) page templates and in ZCML declarations.

Scripts

This recipe provides the following scripts:

i18nextract:

extract the i18n messages from the Python code, the Chameleon (ZPT) page templates and the ZCML configuration files;

i18nmerge:

requires the GNU gettext package to be installed; the command 'msgmerge' will be executed for each language;

i18nstatus:

prints a simple statistics with the status of the translations.
Usage

Add to your buildout configuration file the following snippet:

[i18n]
recipe = tranchitella.recipe.i18n
package = PACKAGE
zcml = PACKAGE:configure.zcml
expressions =
    first=PACKAGE.expressions:FirstExpression
    last=PACKAGE.expressions:LastExpression
output = locales
domain = DOMAIN
verify_domain = true
exclude =
    tests.py
    ftests.py

Replace PACKAGE with your Python package name and DOMAIN with your i18n domain; the zcml setting is optional.

0.6 (2011-06-20)

  • Do not break if the message extracted from a python file contains utf-8 text.

0.5 (2010-06-06)

  • Soft-dependency on quipu.publisher for the correct processing of ZCML files.
  • Avoid useless double new line at the end of the autogenerated POT file.
  • Avoid empty defaaults for zope.i18n's MessageID instances.

0.4 (2010-04-15)

  • Install again on update, otherwise the i18n scripts are not updated unless they are explicitly removed.

0.3 (2010-03-17)

  • Added support for Chameleon expressions using the expressions option in buildout.cfg or the --expression command line argument.
  • Bug fix: now the po template file is correctly encoded in UTF-8.
  • Bug fix: element's tail should not be included in the msg id.
  • Bug fix: added support for translated elements contained in other translated elements and marked with i18n:name.

0.2 (2010-03-02)

  • Added a new helper script to recompile the po files.

0.1 (2010-02-17)

  • First public release.

Subscribe to package updates

Last updated Jun 21st, 2011

Download Stats

Last month:2

What does the lock icon mean?

Builds marked with a lock icon are only available via PyPM to users with a current ActivePython Business Edition subscription.

Need custom builds or support?

ActivePython Enterprise Edition guarantees priority access to technical support, indemnification, expert consulting and quality-assured language builds.

Plan on re-distributing ActivePython?

Get re-distribution rights and eliminate legal risks with ActivePython OEM Edition.