i18ndude performs various tasks related to ZPT's, Python Scripts and i18n.
i18ndude works with Python 3.8-3.11, and PyPy3. Older versions are not supported anymore, use the i18ndude 5.x series if you need that.
You can install i18ndude
with Buildout or pip
.
With pip
you may want to look at our requirements.txt.
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.
Since version 6 we have a pre-commit
hook available:
- repo: https://github.com/collective/i18ndude rev: "master" hooks: - id: i18ndude
For now it only finds the strings not marked for translation.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。