Markdown syntax added to possible comment text transforms.
svn path=/plone.app.discussion/trunk/; revision=51530
This commit is contained in:
parent
cdf2beda40
commit
87700f3810
@ -4,6 +4,9 @@ Changelog
|
|||||||
2.1.0 (unreleased)
|
2.1.0 (unreleased)
|
||||||
------------------
|
------------------
|
||||||
|
|
||||||
|
- New feature: Markdown syntax added to possible comment text transforms.
|
||||||
|
[timo]
|
||||||
|
|
||||||
- Make sure the comment brains are updated properly when the content object is
|
- Make sure the comment brains are updated properly when the content object is
|
||||||
renamed.
|
renamed.
|
||||||
[hannosch, timo]
|
[hannosch, timo]
|
||||||
|
@ -49,6 +49,12 @@ COMMENT_DESCRIPTION_PLAIN_TEXT = _(
|
|||||||
default=u"You can add a comment by filling out the form below. " +
|
default=u"You can add a comment by filling out the form below. " +
|
||||||
"Plain text formatting.")
|
"Plain text formatting.")
|
||||||
|
|
||||||
|
COMMENT_DESCRIPTION_MARKDOWN = _(
|
||||||
|
u"comment_description_markdown",
|
||||||
|
default=u"You can add a comment by filling out the form below. " +
|
||||||
|
"Plain text formatting. You can use the Markdown syntax for " +
|
||||||
|
"links and images.")
|
||||||
|
|
||||||
COMMENT_DESCRIPTION_INTELLIGENT_TEXT = _(
|
COMMENT_DESCRIPTION_INTELLIGENT_TEXT = _(
|
||||||
u"comment_description_intelligent_text",
|
u"comment_description_intelligent_text",
|
||||||
default=u"You can add a comment by filling out the form below. " +
|
default=u"You can add a comment by filling out the form below. " +
|
||||||
@ -293,6 +299,9 @@ class CommentsViewlet(ViewletBase):
|
|||||||
if settings.text_transform == "text/x-web-intelligent":
|
if settings.text_transform == "text/x-web-intelligent":
|
||||||
message = translate(Message(COMMENT_DESCRIPTION_INTELLIGENT_TEXT),
|
message = translate(Message(COMMENT_DESCRIPTION_INTELLIGENT_TEXT),
|
||||||
context=self.request)
|
context=self.request)
|
||||||
|
elif settings.text_transform == "text/x-web-markdown":
|
||||||
|
message = translate(Message(COMMENT_DESCRIPTION_MARKDOWN),
|
||||||
|
context=self.request)
|
||||||
else:
|
else:
|
||||||
message = translate(Message(COMMENT_DESCRIPTION_PLAIN_TEXT),
|
message = translate(Message(COMMENT_DESCRIPTION_PLAIN_TEXT),
|
||||||
context=self.request)
|
context=self.request)
|
||||||
|
@ -81,6 +81,11 @@ def text_transform_vocabulary(context):
|
|||||||
value='text/plain',
|
value='text/plain',
|
||||||
token='text/plain',
|
token='text/plain',
|
||||||
title='Plain text'))
|
title='Plain text'))
|
||||||
|
terms.append(
|
||||||
|
SimpleTerm(
|
||||||
|
value='text/x-web-markdown',
|
||||||
|
token='text/x-web-markdown',
|
||||||
|
title='Markdown'))
|
||||||
terms.append(
|
terms.append(
|
||||||
SimpleTerm(
|
SimpleTerm(
|
||||||
value='text/x-web-intelligent',
|
value='text/x-web-intelligent',
|
||||||
|
Loading…
Reference in New Issue
Block a user