您没有为…指定i18n翻译域。。。在Plone的[genericsetupprofile注册]中

您没有为…指定i18n翻译域。。。在Plone的[genericsetupprofile注册]中,plone,zope,Plone,Zope,在Plone启动时,我收到一个来自定制产品的警告 /Users/mikko/code/buildout-cache/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/fields.py:416: UserWarning: You did not specify an i18n translation domain for the 'title' field in /Users/mikko/code/xxx-dev/src/xxx

在Plone启动时,我收到一个来自定制产品的警告

/Users/mikko/code/buildout-cache/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/fields.py:416:
UserWarning: You did not specify an i18n translation domain for the 'title' field in /Users/mikko/code/xxx-dev/src/xxx-eggs/Products.xxxExternal/Products/xxxExternal/configure.zcml
但是在
configure.zcml
中有
i18:domain
集合。我还使用一些额外的属性直接设置它,以确保:


这是给出警告的相关代码:

def fromUnicode(self,u):
context=self.context
domain=getattr(上下文“i18n_domain”,“”)
如果不是域:
域='未翻译'
进口pdb;pdb.set_trace()
警告,警告(
“您没有为指定i18n翻译域”\
“%s”字段位于%s%”(self.getName(),context.info.file)
)
v=super(MessageID,self).fromUnicode(u)

知道为什么i18n:domain没有出现,或者如何消除警告吗?

注意,代码正在查找带有下划线的
i18n\u domain
,但您将其指定为
i18n:domain
,一个命名空间值

以下工作:



ZCML在国际化方面与ZPT不同。:-)

我认为i18n名称空间是XML本地化的某种标准。。。。为什么ZCML的创建者想要做一些如此微妙的不同?这纯粹是邪恶。