From 6547486fd8c2ec7042845944f65d96f9d00bcc02 Mon Sep 17 00:00:00 2001 From: Daniel Jowett Date: Mon, 16 Jan 2017 21:13:38 +0000 Subject: [PATCH 1/2] Improve English on a couple of field descriptions --- CHANGES.rst | 3 +++ plone/app/discussion/interfaces.py | 8 ++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index 63d0829..d352d62 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -17,6 +17,9 @@ Bug fixes: - Make comment on private content not publicly available in search results. Part of PloneHotfix20161129. [vangheem, maurits] +- Improve English on a couple of field descriptions + [djowett] + 2.4.19 (2017-01-02) ------------------- diff --git a/plone/app/discussion/interfaces.py b/plone/app/discussion/interfaces.py index b5de309..a8d232c 100644 --- a/plone/app/discussion/interfaces.py +++ b/plone/app/discussion/interfaces.py @@ -199,9 +199,9 @@ class IDiscussionSettings(Interface): description=_( u'help_globally_enabled', default=u'If selected, users are able to post comments on the ' - u'site. Though, you have to enable comments for ' - u'specific content types, folders or content objects ' - u'before users will be able to post comments.' + u'site. However, you will still need to enable comments ' + u'for specific content types, folders or content ' + u'objects before users will be able to post comments.' ), required=False, default=False, @@ -213,7 +213,7 @@ class IDiscussionSettings(Interface): description=_( u'help_anonymous_comments', default=u'If selected, anonymous users are able to post ' - u'comments without loggin in. It is highly ' + u'comments without logging in. It is highly ' u'recommended to use a captcha solution to prevent ' u'spam if this setting is enabled.' ), From d2bba1d5ea4f78bd28d4059698580504ebacaea6 Mon Sep 17 00:00:00 2001 From: Daniel Jowett Date: Tue, 24 Jan 2017 10:58:39 +0000 Subject: [PATCH 2/2] Fix some easy pep8 issues --- CHANGES.rst | 3 +++ plone/app/discussion/browser/captcha.py | 2 ++ plone/app/discussion/browser/controlpanel.py | 6 ++++-- plone/app/discussion/comment.py | 1 + plone/app/discussion/tests/test_controlpanel.py | 3 ++- 5 files changed, 12 insertions(+), 3 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index d352d62..01ea409 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -20,6 +20,9 @@ Bug fixes: - Improve English on a couple of field descriptions [djowett] +- Fix some easy pep8 issues + [djowett] + 2.4.19 (2017-01-02) ------------------- diff --git a/plone/app/discussion/browser/captcha.py b/plone/app/discussion/browser/captcha.py index 50a11a0..ffbda2f 100644 --- a/plone/app/discussion/browser/captcha.py +++ b/plone/app/discussion/browser/captcha.py @@ -65,3 +65,5 @@ class CaptchaExtender(extensible.FormExtender): self.form.fields['captcha'].widgetFactory = NorobotsFieldWidget else: self.form.fields['captcha'].mode = interfaces.HIDDEN_MODE + + diff --git a/plone/app/discussion/browser/controlpanel.py b/plone/app/discussion/browser/controlpanel.py index 4bb3ba0..65bcce7 100644 --- a/plone/app/discussion/browser/controlpanel.py +++ b/plone/app/discussion/browser/controlpanel.py @@ -125,7 +125,8 @@ class DiscussionSettingsControlPanel(controlpanel.ControlPanelFormWrapper): output.append('globally_enabled') # Comment moderation - one_state_worklow_disabled = 'comment_one_state_workflow' not in workflow_chain + one_state_worklow_disabled = \ + 'comment_one_state_workflow' not in workflow_chain comment_review_workflow_disabled = \ 'comment_review_workflow' not in workflow_chain if one_state_worklow_disabled and comment_review_workflow_disabled: @@ -174,7 +175,8 @@ class DiscussionSettingsControlPanel(controlpanel.ControlPanelFormWrapper): """ wftool = getToolByName(self.context, 'portal_workflow', None) workflow_chain = wftool.getChainForPortalType('Discussion Item') - one_state_workflow_enabled = 'comment_one_state_workflow' in workflow_chain + one_state_workflow_enabled = \ + 'comment_one_state_workflow' in workflow_chain comment_review_workflow_enabled = \ 'comment_review_workflow' in workflow_chain if one_state_workflow_enabled or comment_review_workflow_enabled: diff --git a/plone/app/discussion/comment.py b/plone/app/discussion/comment.py index 6f2c04b..92c1c50 100644 --- a/plone/app/discussion/comment.py +++ b/plone/app/discussion/comment.py @@ -207,6 +207,7 @@ class Comment(CatalogAware, WorkflowAware, DynamicType, Traversable, def opaqueValues(self): # pragma: no cover return [] + CommentFactory = Factory(Comment) diff --git a/plone/app/discussion/tests/test_controlpanel.py b/plone/app/discussion/tests/test_controlpanel.py index 4c09594..c3f1ac5 100644 --- a/plone/app/discussion/tests/test_controlpanel.py +++ b/plone/app/discussion/tests/test_controlpanel.py @@ -163,7 +163,8 @@ class ConfigurationChangedSubscriberTest(unittest.TestCase): the 'comment_moderation' setting in the discussion control panel changes. """ - # By default the comment_one_state_workflow without moderation is enabled + # By default the comment_one_state_workflow without moderation is + # enabled self.assertEqual( ('comment_one_state_workflow',), self.portal.portal_workflow.getChainForPortalType(