i18ndude performs various tasks related to ZPT's, Python Scripts and i18n.
Python
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
docs
src/i18ndude
.gitignore
.travis.yml
CHANGES.rst
MANIFEST.in
README.rst
bootstrap.py
buildout.cfg
plone.cfg
requirements.txt
setup.cfg
setup.py
tox.ini

README.rst

i18ndude

Introduction

i18ndude performs various tasks related to ZPT's, Python Scripts and i18n.

Travis CI badge

Compatibility

i18ndude works with Python 2.7, 3.5, 3.5, 3.6, pypy and pypy3. Older versions are not supported anymore, use the i18ndude 4.x series if you need that.

i18ndude uses a few zope packages. If you install i18ndude using a buildout, you may want to pin their versions to the ones in the current latest ztk (Zope Tool Kit) versions, as that is what we test with: http://download.zope.org/zopetoolkit/index/1.1.6/ztk-versions.cfg

If you use a separate buildout for i18ndude, you may want to update the zope.tal version to 4.3.0 or higher.

If you add i18ndude to a buildout that handles a Zope, CMF or Plone site, you probably already have versions pinned so then you do not need to add an extends line.

You can also use pip or easy_install to install it. With pip you may want to create a requirements.txt based on that ztk versions list.

UnicodeEncodeError

When running some i18ndude commands, you might get a UnicodeEncodeError. This can especially happen when i18ndude prints the result and you redirect the output or pipe it. This is tricky, maybe impossible, to solve in i18ndude itself. See this related question on stackoverflow. This question points to a solution that you yourself can do when you encounter this. In the (Unix-like) shell, do this:

export PYTHONIOENCODING=utf-8

This fixes UnicodeEncodeErrors when piping or redirecting output that contains non-ascii. I (Maurits) have this line in my bash profile now.

Note: if you get a UnicodeDecodeError, so 'decode' instead of 'encode', then it may be something that needs fixing in i18ndude. Please report it then.