From 6c2fac35e60eaf08cbd1a90bfc4be7e0b6fcc27c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Fri, 6 May 2016 09:18:20 +0200 Subject: [PATCH] fix translation support for new homenews object --- tabellio/pfbviews/__init__.py | 3 +++ tabellio/pfbviews/homenews.py | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/tabellio/pfbviews/__init__.py b/tabellio/pfbviews/__init__.py index e139fab..0d8a56b 100644 --- a/tabellio/pfbviews/__init__.py +++ b/tabellio/pfbviews/__init__.py @@ -5,3 +5,6 @@ def initialize(context): class IHemicycleDocument(Interface): pass + +import zope.i18nmessageid +MessageFactory = zope.i18nmessageid.MessageFactory('tabellio.pfbviews') diff --git a/tabellio/pfbviews/homenews.py b/tabellio/pfbviews/homenews.py index fe4b27b..7ff74a6 100644 --- a/tabellio/pfbviews/homenews.py +++ b/tabellio/pfbviews/homenews.py @@ -10,7 +10,7 @@ from plone.formwidget.contenttree import ObjPathSourceBinder from plone.app.textfield import RichText from plone.namedfile.field import NamedImage -from tabellio.pcfviews import MessageFactory as _ +from tabellio.pfbviews import MessageFactory as _ class IHomeNews(form.Schema): picture = NamedImage(title=_(u'Picture'), required=False)