Use only one MessageFactory.
svn path=/plone.app.discussion/trunk/; revision=38551
This commit is contained in:
parent
25d1da3475
commit
27a2d3fa36
@ -1,3 +1,8 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
from zope.i18nmessageid import MessageFactory
|
||||||
|
PloneAppDiscussionMessageFactory = MessageFactory('plone.app.discussion')
|
||||||
|
|
||||||
# Monkey patch plone.app.vocabularies.types.BAD_TYPES and remove
|
# Monkey patch plone.app.vocabularies.types.BAD_TYPES and remove
|
||||||
# 'Discussion Item' from this tuple, so that Comments can be found
|
# 'Discussion Item' from this tuple, so that Comments can be found
|
||||||
# in the search. This will become needless once plone.app.discussion
|
# in the search. This will become needless once plone.app.discussion
|
||||||
|
@ -22,7 +22,7 @@ from plone.registry.interfaces import IRegistry
|
|||||||
|
|
||||||
from plone.app.layout.viewlets.common import ViewletBase
|
from plone.app.layout.viewlets.common import ViewletBase
|
||||||
|
|
||||||
from plone.app.discussion.interfaces import _
|
from plone.app.discussion import PloneAppDiscussionMessageFactory as _
|
||||||
from plone.app.discussion.interfaces import IConversation
|
from plone.app.discussion.interfaces import IConversation
|
||||||
from plone.app.discussion.interfaces import IComment
|
from plone.app.discussion.interfaces import IComment
|
||||||
from plone.app.discussion.interfaces import IReplies
|
from plone.app.discussion.interfaces import IReplies
|
||||||
|
@ -2,9 +2,7 @@ from zope.interface import Interface
|
|||||||
from zope.interface.common.mapping import IIterableMapping
|
from zope.interface.common.mapping import IIterableMapping
|
||||||
from zope import schema
|
from zope import schema
|
||||||
|
|
||||||
from zope.i18nmessageid import MessageFactory
|
from plone.app.discussion import PloneAppDiscussionMessageFactory as _
|
||||||
|
|
||||||
_ = MessageFactory('plone.app.discussion')
|
|
||||||
|
|
||||||
|
|
||||||
class IDiscussionSettings(Interface):
|
class IDiscussionSettings(Interface):
|
||||||
@ -34,7 +32,8 @@ class IDiscussionSettings(Interface):
|
|||||||
default=True)
|
default=True)
|
||||||
|
|
||||||
anonymous_comments = schema.Bool(
|
anonymous_comments = schema.Bool(
|
||||||
title=_(u"Enable anonymous comments"),
|
title=_(u"label_anonymous_comments",
|
||||||
|
default="Enable anonymous comments"),
|
||||||
description=_(u"help_anonymous_comments",
|
description=_(u"help_anonymous_comments",
|
||||||
default=u"If selected, anonymous "
|
default=u"If selected, anonymous "
|
||||||
"users are able to post "
|
"users are able to post "
|
||||||
@ -48,7 +47,7 @@ class IDiscussionSettings(Interface):
|
|||||||
default=False)
|
default=False)
|
||||||
|
|
||||||
captcha = schema.Choice(
|
captcha = schema.Choice(
|
||||||
title=_(u"Captcha"),
|
title=_(u"label_captcha", default="Captcha"),
|
||||||
description=_(u"help_captcha",
|
description=_(u"help_captcha",
|
||||||
default=u"Use this setting to enable or "
|
default=u"Use this setting to enable or "
|
||||||
"disable Captcha validation for "
|
"disable Captcha validation for "
|
||||||
@ -61,7 +60,8 @@ class IDiscussionSettings(Interface):
|
|||||||
vocabulary='plone.app.discussion.vocabularies.CaptchaVocabulary',)
|
vocabulary='plone.app.discussion.vocabularies.CaptchaVocabulary',)
|
||||||
|
|
||||||
show_commenter_image = schema.Bool(
|
show_commenter_image = schema.Bool(
|
||||||
title=_(u"Show commenter image"),
|
title=_(u"label_show_commenter_image",
|
||||||
|
default=u"Show commenter image"),
|
||||||
description=_(u"help_show_commenter_image",
|
description=_(u"help_show_commenter_image",
|
||||||
default=u"If selected, an image "
|
default=u"If selected, an image "
|
||||||
"of the user is shown "
|
"of the user is shown "
|
||||||
@ -235,10 +235,12 @@ class IComment(Interface):
|
|||||||
author_name = schema.TextLine(title=_(u"Name"), required=False)
|
author_name = schema.TextLine(title=_(u"Name"), required=False)
|
||||||
author_email = schema.TextLine(title=_(u"Email"), required=False)
|
author_email = schema.TextLine(title=_(u"Email"), required=False)
|
||||||
|
|
||||||
title = schema.TextLine(title=_(u"Subject"))
|
title = schema.TextLine(title=_(u"label_subject",
|
||||||
|
default=u"Subject"))
|
||||||
|
|
||||||
mime_type = schema.ASCIILine(title=_(u"MIME type"), default="text/plain")
|
mime_type = schema.ASCIILine(title=_(u"MIME type"), default="text/plain")
|
||||||
text = schema.Text(title=_(u"Comment"))
|
text = schema.Text(title=_(u"label_comment",
|
||||||
|
default=u"Comment"))
|
||||||
|
|
||||||
#author_notification = schema.Bool(title=_(u"Notify me of new comments via "
|
#author_notification = schema.Bool(title=_(u"Notify me of new comments via "
|
||||||
# "email."),
|
# "email."),
|
||||||
|
Loading…
Reference in New Issue
Block a user