zope_i18n_compile_mo_files不适用于零配置

时间:2015-04-19 20:21:41

标签: plone zope

我遇到了buildout配置覆盖的“本地翻译”问题。我想使用额外的conf参数“zope_i18n_compile_mo_files”覆盖plone的一些标准标签,文件夹放在buildout的目录中(plone 4.3):“locales / it / LC_MESSAGES / plone.po” 在另一个Plone 4.1安装中它运行良好。这些安装之间的唯一区别是plone版本(4.1对4.3)和架构(独立对比zeo集群)。

这是我的扩建部分:

[instance-settings]
user = admin:admin
debug-mode = off
verbose-security = off
blob-storage = ${buildout:directory}/var/blobstorage
effective-user = ${config:system-user}
products = ${buildout:directory}/products
eggs =
    ${plone:eggs}
zcml =
    ${plone:zcml}
resources = ${buildout:directory}/resources
environment-vars =
    PTS_LANGUAGES it en
    LANG it_IT.utf8
    TZ Europe/Rome
    zope_i18n_allowed_languages it en
    zope_i18n_compile_mo_files true

有什么问题?

1 个答案:

答案 0 :(得分:6)

您需要注册该locales目录。我没有在你的buildout配置中看到它。像这样:

[instance] recipe = plone.recipe.zope2instance locales = ${buildout:directory}/locales

请参阅https://github.com/mauritsvanrees/maurits.i18ntalk/blob/master/talk.rst#buildoutcfg