From bf5fd95a545e5d4e590c9cde7139fad2d2a1036d Mon Sep 17 00:00:00 2001 From: Philip Bauer Date: Fri, 12 Jan 2018 12:48:19 +0100 Subject: [PATCH 01/12] add z3c.autoinclude.plugin --- setup.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/setup.py b/setup.py index fe3afc5..8684bdd 100644 --- a/setup.py +++ b/setup.py @@ -49,4 +49,9 @@ 'pytest', 'gocept.pytestlayer', ]), + entry_points=""" + # -*- Entry points: -*- + [z3c.autoinclude.plugin] + target = plone + """, ) From fc5b6932c2653f6e4a572182f6d6935240c72e82 Mon Sep 17 00:00:00 2001 From: Philip Bauer Date: Fri, 12 Jan 2018 12:48:37 +0100 Subject: [PATCH 02/12] fix controlpanel (widget needs love though) --- CHANGES.txt | 3 + src/collective/jekyll/browser/configure.zcml | 2 - src/collective/jekyll/browser/controlpanel.py | 59 +++---------------- 3 files changed, 12 insertions(+), 52 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index fb1b853..121102c 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -9,6 +9,9 @@ Changelog This also fixes tests on local machine [laulaz] +- Fix controlpanel in Plone 5. + [pbauer] + 0.4.0 (2018-06-25) ------------------ diff --git a/src/collective/jekyll/browser/configure.zcml b/src/collective/jekyll/browser/configure.zcml index c43c754..1663fb7 100644 --- a/src/collective/jekyll/browser/configure.zcml +++ b/src/collective/jekyll/browser/configure.zcml @@ -6,8 +6,6 @@ xmlns:browser="http://namespaces.zope.org/browser" i18n_domain="collective.jekyll"> - - Date: Fri, 18 Jan 2019 11:55:49 +0100 Subject: [PATCH 03/12] Revert "add z3c.autoinclude.plugin" This reverts commit b23ac418e88738d67c1966001e4625a75a1ea227. --- setup.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/setup.py b/setup.py index 8684bdd..fe3afc5 100644 --- a/setup.py +++ b/setup.py @@ -49,9 +49,4 @@ 'pytest', 'gocept.pytestlayer', ]), - entry_points=""" - # -*- Entry points: -*- - [z3c.autoinclude.plugin] - target = plone - """, ) From c3d0c738c1b4fd38c229c4d23f9e3beb837d408b Mon Sep 17 00:00:00 2001 From: Nicolas Demonte Date: Tue, 19 Mar 2019 09:34:55 +0100 Subject: [PATCH 04/12] Recreate control panel functional tests as robot tests The new control panel uses javascript, which zope.testbrowser ignores. --- src/collective/jekyll/tests/functional.txt | 90 ------------------- .../jekyll/tests/robot/controlpanel.robot | 43 +++++++++ .../jekyll/tests/test_functional_doctest.py | 29 ------ src/collective/jekyll/tests/test_robot.py | 16 +++- 4 files changed, 57 insertions(+), 121 deletions(-) delete mode 100644 src/collective/jekyll/tests/functional.txt create mode 100644 src/collective/jekyll/tests/robot/controlpanel.robot delete mode 100644 src/collective/jekyll/tests/test_functional_doctest.py diff --git a/src/collective/jekyll/tests/functional.txt b/src/collective/jekyll/tests/functional.txt deleted file mode 100644 index 353c8d5..0000000 --- a/src/collective/jekyll/tests/functional.txt +++ /dev/null @@ -1,90 +0,0 @@ -Jekyll control panel -==================== - -First some initial setup code: - - >>> from plone.testing.z2 import Browser - >>> browser = Browser(layer['app']) - >>> browser.handleErrors = False - >>> browser.addHeader('Authorization', 'Basic admin:secret') - -Viewing the jekyll control panel --------------------------------- - - >>> browser.open('http://nohost/plone/@@jekyll-controlpanel') - >>> browser.url.endswith('jekyll-controlpanel') - True - -Click the save button without making any changes: - - >>> browser.getControl(name="form.actions.save").click() - >>> browser.url.endswith('jekyll-controlpanel') - True - -Activating just 2 symptoms --------------------------- - - >>> browser.open('http://nohost/plone/@@jekyll-controlpanel') - >>> browser.url.endswith('jekyll-controlpanel') - True - - >>> browser.getControl(name='form.activeSymptoms').value = \ - ... ['collective.jekyll.symptoms.IdFormatSymptom', - ... 'collective.jekyll.symptoms.TitleLengthSymptom'] - -Click the save button: - - >>> browser.getControl(name="form.actions.save").click() - >>> browser.url.endswith('jekyll-controlpanel') - True - -We should be informed that something has changed: - - >>> 'Changes saved.' in browser.contents - True - -Make sure the changes have been applied correctly to the registry: - - >>> portal = layer['portal'] - >>> records = portal.portal_registry.records - >>> active = records['collective.jekyll.interfaces.IJekyllSettings.activeSymptoms'] - >>> 'collective.jekyll.symptoms.IdFormatSymptom' in active.value - True - >>> 'collective.jekyll.symptoms.TitleLengthSymptom' in active.value - True - >>> len(active.value) - 2 - -The viewlet should be available: - - >>> browser.open('http://nohost/plone/') - >>> 'ok' in browser.contents - True - -Deactivating all symptoms -------------------------- - - >>> browser.open('http://nohost/plone/@@jekyll-controlpanel') - >>> browser.url.endswith('jekyll-controlpanel') - True - - >>> browser.getControl(name='form.activeSymptoms').value = [] - -Click the save button: - - >>> browser.getControl(name="form.actions.save").click() - >>> browser.url.endswith('jekyll-controlpanel') - True - -Make sure the changes have been applied correctly to the registry: - - >>> records = portal.portal_registry.records - >>> active = records['collective.jekyll.interfaces.IJekyllSettings.activeSymptoms'] - >>> len(active.value) - 0 - -The viewlet shouldn't be available anymore: - - >>> browser.open('http://nohost/plone/') - >>> 'ok' in browser.contents - False diff --git a/src/collective/jekyll/tests/robot/controlpanel.robot b/src/collective/jekyll/tests/robot/controlpanel.robot new file mode 100644 index 0000000..f64b32a --- /dev/null +++ b/src/collective/jekyll/tests/robot/controlpanel.robot @@ -0,0 +1,43 @@ +*** Settings *** +Resource plone/app/robotframework/keywords.robot +Resource plone/app/robotframework/selenium.robot + +Library Remote ${PLONE_URL}/RobotRemote +Library plone.app.robotframework.keywords.Debugging + +Suite Setup Suite Setup +Suite Teardown Close all browsers + +*** Test cases *** + +Viewing the jekyll control panel + [tags] testing + Go to ${PLONE_URL}/@@jekyll-controlpanel + Location should contain jekyll-controlpanel + Click button Save + Wait until page contains Changes saved. + Location should contain jekyll-controlpanel + +Deactivating all symptoms, then activating just 2 + [tags] testing + Go to ${PLONE_URL}/@@jekyll-controlpanel + Select all from list name=form.widgets.activeSymptoms.to + Click button name=to2fromButton + Click button Save + Wait until page contains Changes saved. + ${to}= Get List Items name=form.widgets.activeSymptoms.to + Should Be Empty ${to} + Select from list name=form.widgets.activeSymptoms.from Short Name format + Click button name=from2toButton + Select from list name=form.widgets.activeSymptoms.from Title length + Click button name=from2toButton + Click button Save + Wait until page contains Changes saved. + ${to}= Get List Items name=form.widgets.activeSymptoms.to + ${expected}= Create List Short Name format Title length + Should be equal ${to} ${expected} + +*** Keywords *** +Suite Setup + Open test browser + Enable autologin as Manager diff --git a/src/collective/jekyll/tests/test_functional_doctest.py b/src/collective/jekyll/tests/test_functional_doctest.py deleted file mode 100644 index c97fc18..0000000 --- a/src/collective/jekyll/tests/test_functional_doctest.py +++ /dev/null @@ -1,29 +0,0 @@ -import doctest -from unittest import TestSuite - -from plone.app.controlpanel.tests.cptc import ControlPanelTestCase - -from collective.jekyll.testing import COLLECTIVE_JEKYLL_FUNCTIONAL -from plone.testing import layered - - -class JekyllControlPanelTestCase(ControlPanelTestCase): - - layer = COLLECTIVE_JEKYLL_FUNCTIONAL - - -def test_suite(): - suite = TestSuite() - - OPTIONFLAGS = (doctest.ELLIPSIS | doctest.NORMALIZE_WHITESPACE) - - suite.addTests([ - layered( - doctest.DocFileSuite( - 'functional.txt', - optionflags=OPTIONFLAGS, - ), - layer=COLLECTIVE_JEKYLL_FUNCTIONAL - ), - ]) - return suite diff --git a/src/collective/jekyll/tests/test_robot.py b/src/collective/jekyll/tests/test_robot.py index c6f2a14..bbd7b6d 100644 --- a/src/collective/jekyll/tests/test_robot.py +++ b/src/collective/jekyll/tests/test_robot.py @@ -1,10 +1,22 @@ from plone.testing import layered import robotsuite +import unittest from collective.jekyll.testing import COLLECTIVE_JEKYLL_ROBOT_TESTING def test_suite(): - return layered(robotsuite.RobotTestSuite('robot/symptom.robot'), - layer=COLLECTIVE_JEKYLL_ROBOT_TESTING) + suite = unittest.TestSuite() + suite.addTests( + [ + layered( + robotsuite.RobotTestSuite("robot/symptom.robot"), + layer=COLLECTIVE_JEKYLL_ROBOT_TESTING, + ), + layered( + robotsuite.RobotTestSuite("robot/controlpanel.robot"), + layer=COLLECTIVE_JEKYLL_ROBOT_TESTING, + ), + ]) + return suite From 01959a311f58d61a13b981a9da01581dcb811c19 Mon Sep 17 00:00:00 2001 From: Nicolas Demonte Date: Tue, 26 Mar 2019 13:59:23 +0100 Subject: [PATCH 05/12] Test on Travis for Plone 4.3 & 5.1 --- .travis.yml | 6 +++++- versions.cfg | 3 --- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index e3b56ab..4f291ff 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,12 +2,16 @@ after_success: - coveralls addons: firefox: "latest" -install: +install: +- sed -ie "s#travis-4.3#travis-$PLONE_VERSION#" travis.cfg - pip install coveralls - make bin/test env: global: secure: aeJaNydBzTcyBwbbluHDvs8vmryEpwaSFYD+SvTlD2e341Ilye+vxKR2/fT56OYLONEvFXkc5K1maw4caJqaxAfjlfO80Id3FsIO3f/AM/zTl3SERHd//y8CaaokL9vaxqNRjUHRMrpJZQpTFKW8V7HMnK88ulQF8nuM1gaQU/Q= + matrix: + - PLONE_VERSION=4.3 + - PLONE_VERSION=5.1 language: python before_script: - export DISPLAY=:99.0 diff --git a/versions.cfg b/versions.cfg index 7cd9f69..e468ccf 100644 --- a/versions.cfg +++ b/versions.cfg @@ -1,6 +1,3 @@ -[buildout] -extends = http://dist.plone.org/release/4.3.17/versions.cfg - [versions] zc.buildout = 2.11.5 setuptools = 39.2.0 From be88ffa44bb9a89b09908ec4e83ee84e177b5ce3 Mon Sep 17 00:00:00 2001 From: Nicolas Demonte Date: Fri, 29 Mar 2019 13:17:17 +0100 Subject: [PATCH 06/12] Test for Plone 5.1 only --- .travis.yml | 4 ---- travis.cfg | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4f291ff..042b7c1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,15 +3,11 @@ after_success: addons: firefox: "latest" install: -- sed -ie "s#travis-4.3#travis-$PLONE_VERSION#" travis.cfg - pip install coveralls - make bin/test env: global: secure: aeJaNydBzTcyBwbbluHDvs8vmryEpwaSFYD+SvTlD2e341Ilye+vxKR2/fT56OYLONEvFXkc5K1maw4caJqaxAfjlfO80Id3FsIO3f/AM/zTl3SERHd//y8CaaokL9vaxqNRjUHRMrpJZQpTFKW8V7HMnK88ulQF8nuM1gaQU/Q= - matrix: - - PLONE_VERSION=4.3 - - PLONE_VERSION=5.1 language: python before_script: - export DISPLAY=:99.0 diff --git a/travis.cfg b/travis.cfg index 389bc66..3adfb0e 100644 --- a/travis.cfg +++ b/travis.cfg @@ -1,6 +1,6 @@ [buildout] extends = - https://raw.github.com/collective/buildout.plonetest/master/travis-4.3.x.cfg + https://raw.github.com/collective/buildout.plonetest/master/travis-5.1.x.cfg varnish.cfg versions.cfg coverage.cfg From 01b01489de05cb7a7bcdd946aba0396213fd5a2e Mon Sep 17 00:00:00 2001 From: Nicolas Demonte Date: Fri, 29 Mar 2019 13:17:58 +0100 Subject: [PATCH 07/12] Fix diagnosis collection view --- .../jekyll/browser/collection_view.pt | 48 +++++++++++-------- src/collective/jekyll/browser/configure.zcml | 2 +- src/collective/jekyll/browser/diagnosis.py | 2 +- .../jekyll/profiles/default/metadata.xml | 1 + .../jekyll/profiles/testing/metadata.xml | 1 + 5 files changed, 31 insertions(+), 23 deletions(-) diff --git a/src/collective/jekyll/browser/collection_view.pt b/src/collective/jekyll/browser/collection_view.pt index 02cce9f..54fa7b1 100644 --- a/src/collective/jekyll/browser/collection_view.pt +++ b/src/collective/jekyll/browser/collection_view.pt @@ -16,8 +16,7 @@ batch topicContents;"> @@ -27,8 +26,8 @@ tal:attributes="title type/help; href type/url" /> - @@ -44,38 +43,45 @@ tal:replace="structure symptom/@@status" /> - -
+ + + August 16, 2001 at 23:35:59 + + - - + + Item Title @@ -84,7 +90,7 @@ diff --git a/src/collective/jekyll/browser/configure.zcml b/src/collective/jekyll/browser/configure.zcml index 1663fb7..4cefc00 100644 --- a/src/collective/jekyll/browser/configure.zcml +++ b/src/collective/jekyll/browser/configure.zcml @@ -15,7 +15,7 @@ /> 0001 profile-plone.app.registry:default + profile-plone.app.contenttypes:default diff --git a/src/collective/jekyll/profiles/testing/metadata.xml b/src/collective/jekyll/profiles/testing/metadata.xml index c4314e3..029bc8c 100644 --- a/src/collective/jekyll/profiles/testing/metadata.xml +++ b/src/collective/jekyll/profiles/testing/metadata.xml @@ -2,6 +2,7 @@ 0001 + profile-plone.app.contenttypes:default profile-collective.jekyll:default From 8cbde9eeab6d80cd71609e9d72c61570a324ed29 Mon Sep 17 00:00:00 2001 From: Nicolas Demonte Date: Fri, 29 Mar 2019 21:24:05 +0100 Subject: [PATCH 08/12] Adapt symptoms to Dexterity --- src/collective/jekyll/configure.zcml | 14 +- .../jekyll/locales/collective.jekyll.pot | 141 ++++++++--------- .../en/LC_MESSAGES/collective.jekyll.po | 149 +++++++++--------- .../fr/LC_MESSAGES/collective.jekyll.po | 149 +++++++++--------- .../it/LC_MESSAGES/collective.jekyll.po | 142 ++++++++--------- .../nl/LC_MESSAGES/collective.jekyll.po | 149 +++++++++--------- src/collective/jekyll/symptoms.py | 80 ++++------ 7 files changed, 399 insertions(+), 425 deletions(-) diff --git a/src/collective/jekyll/configure.zcml b/src/collective/jekyll/configure.zcml index 7ff45aa..732e9ed 100644 --- a/src/collective/jekyll/configure.zcml +++ b/src/collective/jekyll/configure.zcml @@ -66,37 +66,37 @@ factory=".symptoms.TitleFormatSymptom" /> diff --git a/src/collective/jekyll/locales/collective.jekyll.pot b/src/collective/jekyll/locales/collective.jekyll.pot index e6e9994..ac6065e 100644 --- a/src/collective/jekyll/locales/collective.jekyll.pot +++ b/src/collective/jekyll/locales/collective.jekyll.pot @@ -4,7 +4,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2013-09-03 14:23+0000\n" +"POT-Creation-Date: 2019-03-29 20:18+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI +ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -17,192 +17,191 @@ msgstr "" "Preferred-Encodings: utf-8 latin1\n" "Domain: collective.jekyll\n" -#: collective/jekyll/interfaces.py:40 +#: ../interfaces.py:46 msgid "Active Symptoms" msgstr "" -#: collective/jekyll/symptoms.py:244 +#: ../symptoms.py:236 msgid "Body text" msgstr "" -#: collective/jekyll/symptoms.py:250 +#: ../symptoms.py:243 msgid "Body text does not have content." msgstr "" -#: collective/jekyll/symptoms.py:272 +#: ../symptoms.py:266 msgid "Body text ends with empty tags or BR." msgstr "" -#: collective/jekyll/symptoms.py:245 +#: ../symptoms.py:237 msgid "Body text should have content." msgstr "" -#: collective/jekyll/symptoms.py:256 +#: ../symptoms.py:249 msgid "Body text should not start or end with empty tags or BR." msgstr "" -#: collective/jekyll/symptoms.py:267 +#: ../symptoms.py:261 msgid "Body text starts with empty tags or BR." msgstr "" -#: collective/jekyll/browser/controlpanel.py:50 -#: collective/jekyll/profiles/default/controlpanel.xml +#: ../browser/diagnosis.py:102 +msgid "Consider" +msgstr "" + +#: ../browser/controlpanel.py:11 +#: ../profiles/default/controlpanel.xml msgid "Content quality" msgstr "" -#: collective/jekyll/symptoms.py:170 +#: ../testing.zcml:16 +msgid "Content to ease tests" +msgstr "" + +#: ../symptoms.py:174 msgid "Description does not begin with uppercase letter." msgstr "" -#: collective/jekyll/symptoms.py:206 +#: ../symptoms.py:203 msgid "Description does not have content." msgstr "" -#: collective/jekyll/symptoms.py:94 +#: ../symptoms.py:168 +msgid "Description format" +msgstr "" + +#: ../symptoms.py:185 +msgid "Description length" +msgstr "" + +#: ../symptoms.py:99 msgid "Id format" msgstr "" -#: collective/jekyll/symptoms.py:95 +#: ../symptoms.py:100 msgid "Id should not start with 'copy_of'." msgstr "" -#: collective/jekyll/symptoms.py:103 +#: ../symptoms.py:108 msgid "Id starts with '${start}'." msgstr "" -#: collective/jekyll/browser/diagnosis.py:102 +#: ../browser/diagnosis.py:105 msgid "Ignore" msgstr "" -#: collective/jekyll/browser/symptom.pt:4 +#: ../browser/symptom.pt:4 msgid "Ignored" msgstr "" -#: collective/jekyll/symptoms.py:347 +#: ../symptoms.py:341 msgid "Image field content has correct size." msgstr "" -#: collective/jekyll/symptoms.py:326 +#: ../symptoms.py:321 msgid "Image field does not have content." msgstr "" -#: collective/jekyll/symptoms.py:324 +#: ../symptoms.py:319 msgid "Image field has content." msgstr "" -#: collective/jekyll/symptoms.py:319 +#: ../symptoms.py:314 msgid "Image field should have content." msgstr "" -#: collective/jekyll/symptoms.py:332 +#: ../symptoms.py:327 msgid "Image field should have correct size." msgstr "" -#: collective/jekyll/symptoms.py:318 +#: ../symptoms.py:313 msgid "Image present" msgstr "" -#: collective/jekyll/symptoms.py:331 +#: ../symptoms.py:326 msgid "Image size" msgstr "" -#: collective/jekyll/symptoms.py:283 -msgid "Links In Body" +#: ../configure.zcml:28 +msgid "Installs the collective.jekyll package" msgstr "" -#: collective/jekyll/browser/diagnosis.py:99 -msgid "Consider" +#: ../symptoms.py:277 +msgid "Links In Body" msgstr "" -#: collective/jekyll/interfaces.py:41 +#: ../interfaces.py:47 msgid "Select which symptoms will be taken in account when diagnosing content quality." msgstr "" -#: collective/jekyll/symptoms.py:255 +#: ../symptoms.py:248 msgid "Spaces In Body" msgstr "" -#: collective/jekyll/symptoms.py:171 -msgid "Summary does not begin with uppercase letter." -msgstr "" - -#: collective/jekyll/symptoms.py:207 -msgid "Summary does not have content." -msgstr "" - -#: collective/jekyll/symptoms.py:163 -msgid "Summary format" -msgstr "" - -#: collective/jekyll/symptoms.py:187 -msgid "Summary length" -msgstr "" - -#: collective/jekyll/browser/controlpanel.py:52 -msgid "Symptoms activation" -msgstr "" - -#: collective/jekyll/symptoms.py:307 +#: ../symptoms.py:302 msgid "The body text has less than ${minimum} links to other pages." msgstr "" -#: collective/jekyll/symptoms.py:291 +#: ../symptoms.py:285 msgid "The body text should have at least ${minimum} links to other pages. " msgstr "" -#: collective/jekyll/symptoms.py:211 +#: ../symptoms.py:205 msgid "The description counts ${word_count} significant words (longer than 3 letters). It should have at most ${maximum} significant words." msgstr "" -#: collective/jekyll/symptoms.py:164 -msgid "The summary (or description) should begin with uppercase letter." +#: ../symptoms.py:169 +msgid "The description should begin with uppercase letter." msgstr "" -#: collective/jekyll/symptoms.py:195 +#: ../symptoms.py:193 msgid "The summary (or description) should not be empty and should have at most ${maximum} significant words (longer than 3 letters). " msgstr "" -#: collective/jekyll/symptoms.py:216 -msgid "The summary counts ${word_count} significant words (longer than 3 letters). It should have at most ${maximum} significant words." -msgstr "" - -#: collective/jekyll/symptoms.py:134 +#: ../symptoms.py:139 msgid "The title counts ${word_count} significant words (longer than 3 letters). It should have at most ${maximum} significant words." msgstr "" -#: collective/jekyll/symptoms.py:120 +#: ../symptoms.py:125 msgid "The title should have at most ${maximum} significant words (longer than 3 letters). " msgstr "" -#: collective/jekyll/symptoms.py:158 +#: ../symptoms.py:163 msgid "Title does not begin with uppercase letter." msgstr "" -#: collective/jekyll/symptoms.py:151 +#: ../symptoms.py:156 msgid "Title format" msgstr "" -#: collective/jekyll/symptoms.py:112 +#: ../symptoms.py:117 msgid "Title length" msgstr "" -#: collective/jekyll/symptoms.py:152 +#: ../symptoms.py:157 msgid "Title should begin with uppercase letter." msgstr "" -#: collective/jekyll/symptoms.py:349 +#: ../symptoms.py:343 msgid "Wrong size : image is ${actual_width} by ${actual_height} pixels. It should be ${width} by ${height} pixels." msgstr "" -#: collective/jekyll/browser/controlpanel.py:51 +#: ../browser/controlpanel.py:12 msgid "You can activate / deactivate symptoms using this form." msgstr "" -#: collective/jekyll/__init__.py:7 +#: ../configure.zcml:28 +msgid "collective.jekyll" +msgstr "" + +#: ../testing.zcml:16 +msgid "collective.jekyll tests" +msgstr "" + +#: ../__init__.py:7 msgid "ok" msgstr "" -#: collective/jekyll/__init__.py:8 +#: ../__init__.py:8 msgid "warning" msgstr "" - diff --git a/src/collective/jekyll/locales/en/LC_MESSAGES/collective.jekyll.po b/src/collective/jekyll/locales/en/LC_MESSAGES/collective.jekyll.po index 41eeff1..af27a4c 100644 --- a/src/collective/jekyll/locales/en/LC_MESSAGES/collective.jekyll.po +++ b/src/collective/jekyll/locales/en/LC_MESSAGES/collective.jekyll.po @@ -1,20 +1,20 @@ # ############################################################################# -# +# # Copyright (c) 2003-2004 Zope Foundation and Contributors. # All Rights Reserved. -# +# # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS # FOR A PARTICULAR PURPOSE. -# +# # ############################################################################# msgid "" msgstr "" "Project-Id-Version: 1.0\n" -"POT-Creation-Date: 2013-09-03 14:23+0000\n" +"POT-Creation-Date: 2019-03-29 20:18+0000\n" "PO-Revision-Date: 2012-05-11 15:55+0200\n" "Last-Translator: bsuttor \n" "Language-Team: English\n" @@ -29,193 +29,192 @@ msgstr "" "Language: en\n" "Generated-By: zope/app/locales/extract.py\n" -#: collective/jekyll/interfaces.py:40 +#: ../interfaces.py:46 msgid "Active Symptoms" msgstr "" -#: collective/jekyll/symptoms.py:244 +#: ../symptoms.py:236 msgid "Body text" msgstr "Body text present" -#: collective/jekyll/symptoms.py:250 +#: ../symptoms.py:243 msgid "Body text does not have content." msgstr "" -#: collective/jekyll/symptoms.py:272 +#: ../symptoms.py:266 msgid "Body text ends with empty tags or BR." msgstr "" -#: collective/jekyll/symptoms.py:245 +#: ../symptoms.py:237 msgid "Body text should have content." msgstr "" -#: collective/jekyll/symptoms.py:256 +#: ../symptoms.py:249 msgid "Body text should not start or end with empty tags or BR." msgstr "" -#: collective/jekyll/symptoms.py:267 +#: ../symptoms.py:261 msgid "Body text starts with empty tags or BR." msgstr "" -#: collective/jekyll/browser/controlpanel.py:50 -#: collective/jekyll/profiles/default/controlpanel.xml +#: ../browser/diagnosis.py:102 +msgid "Consider" +msgstr "Consider" + +#: ../browser/controlpanel.py:11 +#: ../profiles/default/controlpanel.xml msgid "Content quality" msgstr "" -#: collective/jekyll/symptoms.py:170 +#: ../testing.zcml:16 +msgid "Content to ease tests" +msgstr "" + +#: ../symptoms.py:174 msgid "Description does not begin with uppercase letter." msgstr "" -#: collective/jekyll/symptoms.py:206 +#: ../symptoms.py:203 msgid "Description does not have content." msgstr "" -#: collective/jekyll/symptoms.py:94 +#: ../symptoms.py:168 +msgid "Description format" +msgstr "" + +#: ../symptoms.py:185 +msgid "Description length" +msgstr "" + +#: ../symptoms.py:99 msgid "Id format" msgstr "Short Name format" -#: collective/jekyll/symptoms.py:95 +#: ../symptoms.py:100 msgid "Id should not start with 'copy_of'." msgstr "Short Name should not start with 'copy_of'." -#: collective/jekyll/symptoms.py:103 +#: ../symptoms.py:108 msgid "Id starts with '${start}'." msgstr "Short Name starts with '${start}'." -#: collective/jekyll/browser/diagnosis.py:102 +#: ../browser/diagnosis.py:105 msgid "Ignore" msgstr "" -#: collective/jekyll/browser/symptom.pt:4 +#: ../browser/symptom.pt:4 msgid "Ignored" msgstr "" -#: collective/jekyll/symptoms.py:347 +#: ../symptoms.py:341 msgid "Image field content has correct size." msgstr "" -#: collective/jekyll/symptoms.py:326 +#: ../symptoms.py:321 msgid "Image field does not have content." msgstr "" -#: collective/jekyll/symptoms.py:324 +#: ../symptoms.py:319 msgid "Image field has content." msgstr "" -#: collective/jekyll/symptoms.py:319 +#: ../symptoms.py:314 msgid "Image field should have content." msgstr "" -#: collective/jekyll/symptoms.py:332 +#: ../symptoms.py:327 msgid "Image field should have correct size." msgstr "" -#: collective/jekyll/symptoms.py:318 +#: ../symptoms.py:313 msgid "Image present" msgstr "" -#: collective/jekyll/symptoms.py:331 +#: ../symptoms.py:326 msgid "Image size" msgstr "" -#: collective/jekyll/symptoms.py:283 +#: ../configure.zcml:28 +msgid "Installs the collective.jekyll package" +msgstr "" + +#: ../symptoms.py:277 msgid "Links In Body" msgstr "Links In Body Text" -#: collective/jekyll/browser/diagnosis.py:99 -msgid "Consider" -msgstr "Consider" - -#: collective/jekyll/interfaces.py:41 +#: ../interfaces.py:47 msgid "Select which symptoms will be taken in account when diagnosing content quality." msgstr "" -#: collective/jekyll/symptoms.py:255 +#: ../symptoms.py:248 msgid "Spaces In Body" msgstr "Spaces In Body Text" -#: collective/jekyll/symptoms.py:171 -msgid "Summary does not begin with uppercase letter." -msgstr "" - -#: collective/jekyll/symptoms.py:207 -msgid "Summary does not have content." -msgstr "" - -#: collective/jekyll/symptoms.py:163 -msgid "Summary format" -msgstr "" - -#: collective/jekyll/symptoms.py:187 -msgid "Summary length" -msgstr "" - -#: collective/jekyll/browser/controlpanel.py:52 -msgid "Symptoms activation" -msgstr "" - -#: collective/jekyll/symptoms.py:307 +#: ../symptoms.py:302 msgid "The body text has less than ${minimum} links to other pages." msgstr "" -#: collective/jekyll/symptoms.py:291 +#: ../symptoms.py:285 msgid "The body text should have at least ${minimum} links to other pages. " msgstr "" -#: collective/jekyll/symptoms.py:211 +#: ../symptoms.py:205 msgid "The description counts ${word_count} significant words (longer than 3 letters). It should have at most ${maximum} significant words." msgstr "" -#: collective/jekyll/symptoms.py:164 -msgid "The summary (or description) should begin with uppercase letter." +#: ../symptoms.py:169 +msgid "The description should begin with uppercase letter." msgstr "" -#: collective/jekyll/symptoms.py:195 +#: ../symptoms.py:193 msgid "The summary (or description) should not be empty and should have at most ${maximum} significant words (longer than 3 letters). " msgstr "" -#: collective/jekyll/symptoms.py:216 -msgid "The summary counts ${word_count} significant words (longer than 3 letters). It should have at most ${maximum} significant words." -msgstr "" - -#: collective/jekyll/symptoms.py:134 +#: ../symptoms.py:139 msgid "The title counts ${word_count} significant words (longer than 3 letters). It should have at most ${maximum} significant words." msgstr "" -#: collective/jekyll/symptoms.py:120 +#: ../symptoms.py:125 msgid "The title should have at most ${maximum} significant words (longer than 3 letters). " msgstr "" -#: collective/jekyll/symptoms.py:158 +#: ../symptoms.py:163 msgid "Title does not begin with uppercase letter." msgstr "" -#: collective/jekyll/symptoms.py:151 +#: ../symptoms.py:156 msgid "Title format" msgstr "" -#: collective/jekyll/symptoms.py:112 +#: ../symptoms.py:117 msgid "Title length" msgstr "" -#: collective/jekyll/symptoms.py:152 +#: ../symptoms.py:157 msgid "Title should begin with uppercase letter." msgstr "" -#: collective/jekyll/symptoms.py:349 +#: ../symptoms.py:343 msgid "Wrong size : image is ${actual_width} by ${actual_height} pixels. It should be ${width} by ${height} pixels." msgstr "" -#: collective/jekyll/browser/controlpanel.py:51 +#: ../browser/controlpanel.py:12 msgid "You can activate / deactivate symptoms using this form." msgstr "" +#: ../configure.zcml:28 +msgid "collective.jekyll" +msgstr "" + +#: ../testing.zcml:16 +msgid "collective.jekyll tests" +msgstr "" + # values for status -#: collective/jekyll/__init__.py:7 +#: ../__init__.py:7 msgid "ok" msgstr "" -#: collective/jekyll/__init__.py:8 +#: ../__init__.py:8 msgid "warning" msgstr "" - diff --git a/src/collective/jekyll/locales/fr/LC_MESSAGES/collective.jekyll.po b/src/collective/jekyll/locales/fr/LC_MESSAGES/collective.jekyll.po index a8e4ca6..3bf6ec8 100644 --- a/src/collective/jekyll/locales/fr/LC_MESSAGES/collective.jekyll.po +++ b/src/collective/jekyll/locales/fr/LC_MESSAGES/collective.jekyll.po @@ -1,20 +1,20 @@ # ############################################################################# -# +# # Copyright (c) 2003-2004 Zope Foundation and Contributors. # All Rights Reserved. -# +# # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS # FOR A PARTICULAR PURPOSE. -# +# # ############################################################################# msgid "" msgstr "" "Project-Id-Version: 1.0\n" -"POT-Creation-Date: 2013-09-03 14:19+0000\n" +"POT-Creation-Date: 2019-03-29 20:18+0000\n" "PO-Revision-Date: 2012-05-11 15:55+0200\n" "Last-Translator: bsuttor \n" "Language-Team: French\n" @@ -29,193 +29,192 @@ msgstr "" "Language: fr\n" "Generated-By: zope/app/locales/extract.py\n" -#: collective/jekyll/interfaces.py:40 +#: ../interfaces.py:46 msgid "Active Symptoms" msgstr "Symptomes actifs" -#: collective/jekyll/symptoms.py:244 +#: ../symptoms.py:236 msgid "Body text" msgstr "Corps du texte requis" -#: collective/jekyll/symptoms.py:250 +#: ../symptoms.py:243 msgid "Body text does not have content." msgstr "Le corps du texte n'a pas de contenu." -#: collective/jekyll/symptoms.py:272 +#: ../symptoms.py:266 msgid "Body text ends with empty tags or BR." msgstr "Le corps du texte se termine avec des balises vides ou des retours à la ligne." -#: collective/jekyll/symptoms.py:245 +#: ../symptoms.py:237 msgid "Body text should have content." msgstr "Le corps de texte doit avoir du contenu." -#: collective/jekyll/symptoms.py:256 +#: ../symptoms.py:249 msgid "Body text should not start or end with empty tags or BR." msgstr "Le corps de texte ne doit pas commencer ou terminer avec des balises vides ou des retours à la ligne." -#: collective/jekyll/symptoms.py:267 +#: ../symptoms.py:261 msgid "Body text starts with empty tags or BR." msgstr "Le corps de texte commence avec des balises vides ou des retours à la ligne." -#: collective/jekyll/browser/controlpanel.py:50 -#: collective/jekyll/profiles/default/controlpanel.xml +#: ../browser/diagnosis.py:102 +msgid "Consider" +msgstr "Rétablir" + +#: ../browser/controlpanel.py:11 +#: ../profiles/default/controlpanel.xml msgid "Content quality" msgstr "Qualité du contenu" -#: collective/jekyll/symptoms.py:170 +#: ../testing.zcml:16 +msgid "Content to ease tests" +msgstr "" + +#: ../symptoms.py:174 msgid "Description does not begin with uppercase letter." msgstr "La description ne commence pas par une lettre majuscule." -#: collective/jekyll/symptoms.py:206 +#: ../symptoms.py:203 msgid "Description does not have content." msgstr "La description n'a pas de contenu." -#: collective/jekyll/symptoms.py:94 +#: ../symptoms.py:168 +msgid "Description format" +msgstr "Format de la description" + +#: ../symptoms.py:185 +msgid "Description length" +msgstr "Longueur de la description" + +#: ../symptoms.py:99 msgid "Id format" msgstr "Format du nom court" -#: collective/jekyll/symptoms.py:95 +#: ../symptoms.py:100 msgid "Id should not start with 'copy_of'." msgstr "Le nom court ne doit pas commencer par 'copy_of'." -#: collective/jekyll/symptoms.py:103 +#: ../symptoms.py:108 msgid "Id starts with '${start}'." msgstr "Le nom court commence par '${start}'." # values for ignore -#: collective/jekyll/browser/diagnosis.py:102 +#: ../browser/diagnosis.py:105 msgid "Ignore" msgstr "Ignorer" -#: collective/jekyll/browser/symptom.pt:4 +#: ../browser/symptom.pt:4 msgid "Ignored" msgstr "Ignoré" -#: collective/jekyll/symptoms.py:347 +#: ../symptoms.py:341 msgid "Image field content has correct size." msgstr "Le contenu du champs image a une taille correcte." -#: collective/jekyll/symptoms.py:326 +#: ../symptoms.py:321 msgid "Image field does not have content." msgstr "Le champs image n'a pas de contenu." -#: collective/jekyll/symptoms.py:324 +#: ../symptoms.py:319 msgid "Image field has content." msgstr "Le champs image a du contenu." -#: collective/jekyll/symptoms.py:319 +#: ../symptoms.py:314 msgid "Image field should have content." msgstr "Le champs image doit avoir du contenu." -#: collective/jekyll/symptoms.py:332 +#: ../symptoms.py:327 msgid "Image field should have correct size." msgstr "La taille de l'image doit être correcte." -#: collective/jekyll/symptoms.py:318 +#: ../symptoms.py:313 msgid "Image present" msgstr "Image requise" -#: collective/jekyll/symptoms.py:331 +#: ../symptoms.py:326 msgid "Image size" msgstr "Taille de l'image" -#: collective/jekyll/symptoms.py:283 +#: ../configure.zcml:28 +msgid "Installs the collective.jekyll package" +msgstr "" + +#: ../symptoms.py:277 msgid "Links In Body" msgstr "Liens dans le corps du texte" -#: collective/jekyll/browser/diagnosis.py:99 -msgid "Consider" -msgstr "Rétablir" - -#: collective/jekyll/interfaces.py:41 +#: ../interfaces.py:47 msgid "Select which symptoms will be taken in account when diagnosing content quality." msgstr "Sélectionnez les symptomes pris en compte lors du diagnostic de la qualité du contenu." -#: collective/jekyll/symptoms.py:255 +#: ../symptoms.py:248 msgid "Spaces In Body" msgstr "Espaces dans le corps" -#: collective/jekyll/symptoms.py:171 -msgid "Summary does not begin with uppercase letter." -msgstr "Le résumé ne commence pas par une majuscule." - -#: collective/jekyll/symptoms.py:207 -msgid "Summary does not have content." -msgstr "Le résumé n'a pas de contenu." - -#: collective/jekyll/symptoms.py:163 -msgid "Summary format" -msgstr "Format du résumé" - -#: collective/jekyll/symptoms.py:187 -msgid "Summary length" -msgstr "Longueur du résumé" - -#: collective/jekyll/browser/controlpanel.py:52 -msgid "Symptoms activation" -msgstr "Activation des symptomes" - -#: collective/jekyll/symptoms.py:307 +#: ../symptoms.py:302 msgid "The body text has less than ${minimum} links to other pages." msgstr "Le corps du texte a moins de ${minimum} liens vers d'autres pages." -#: collective/jekyll/symptoms.py:291 +#: ../symptoms.py:285 msgid "The body text should have at least ${minimum} links to other pages. " msgstr "Le corps du texte doit avoir au moins ${minimum} liens vers d'autres pages." -#: collective/jekyll/symptoms.py:211 +#: ../symptoms.py:205 msgid "The description counts ${word_count} significant words (longer than 3 letters). It should have at most ${maximum} significant words." msgstr "La description a ${word_count} mots significatifs (de plus de 3 lettres). Elle doit avoir au plus ${maximum} mots significatifs." -#: collective/jekyll/symptoms.py:164 -msgid "The summary (or description) should begin with uppercase letter." +#: ../symptoms.py:169 +msgid "The description should begin with uppercase letter." msgstr "Le résumé (ou la description) doit commencer par une majuscule." -#: collective/jekyll/symptoms.py:195 +#: ../symptoms.py:193 msgid "The summary (or description) should not be empty and should have at most ${maximum} significant words (longer than 3 letters). " msgstr "Le résumé (ou la description) ne doit pas être vide et doit avoir au plus ${maximum} mots significatifs (de plus de 3 lettres)." -#: collective/jekyll/symptoms.py:216 -msgid "The summary counts ${word_count} significant words (longer than 3 letters). It should have at most ${maximum} significant words." -msgstr "Le résumé a plus de ${word_count} mots significatifs (de plus de 3 lettres). Il doit avoir au plus ${maximum} mots significatifs." - -#: collective/jekyll/symptoms.py:134 +#: ../symptoms.py:139 msgid "The title counts ${word_count} significant words (longer than 3 letters). It should have at most ${maximum} significant words." msgstr "Le titre a ${word_count} mots significatifs (de plus de 3 lettres). Il doit avoir au plus ${maximum} mots significatifs." -#: collective/jekyll/symptoms.py:120 +#: ../symptoms.py:125 msgid "The title should have at most ${maximum} significant words (longer than 3 letters). " msgstr "Le titre doit avoir au plus ${maximum} mots significatifs (de plus de 3 lettres)." -#: collective/jekyll/symptoms.py:158 +#: ../symptoms.py:163 msgid "Title does not begin with uppercase letter." msgstr "Le titre ne commence pas avec une lettre majuscule." -#: collective/jekyll/symptoms.py:151 +#: ../symptoms.py:156 msgid "Title format" msgstr "Format du titre" -#: collective/jekyll/symptoms.py:112 +#: ../symptoms.py:117 msgid "Title length" msgstr "Longueur du titre" -#: collective/jekyll/symptoms.py:152 +#: ../symptoms.py:157 msgid "Title should begin with uppercase letter." msgstr "Le titre doit commencer avec une lettre majuscule." -#: collective/jekyll/symptoms.py:349 +#: ../symptoms.py:343 msgid "Wrong size : image is ${actual_width} by ${actual_height} pixels. It should be ${width} by ${height} pixels." msgstr "Taille incorrecte: l'image est de ${actual_width} par ${actual_height} pixels. Elle doit être de ${width} par ${height} pixels." -#: collective/jekyll/browser/controlpanel.py:51 +#: ../browser/controlpanel.py:12 msgid "You can activate / deactivate symptoms using this form." msgstr "Vous pouvez (dés)activer les symptomes." -#: collective/jekyll/__init__.py:7 +#: ../configure.zcml:28 +msgid "collective.jekyll" +msgstr "" + +#: ../testing.zcml:16 +msgid "collective.jekyll tests" +msgstr "" + +#: ../__init__.py:7 msgid "ok" msgstr "ok" -#: collective/jekyll/__init__.py:8 +#: ../__init__.py:8 msgid "warning" msgstr "alerte" - diff --git a/src/collective/jekyll/locales/it/LC_MESSAGES/collective.jekyll.po b/src/collective/jekyll/locales/it/LC_MESSAGES/collective.jekyll.po index 51283e5..c4e026e 100644 --- a/src/collective/jekyll/locales/it/LC_MESSAGES/collective.jekyll.po +++ b/src/collective/jekyll/locales/it/LC_MESSAGES/collective.jekyll.po @@ -14,7 +14,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2014-04-12 14:23+0000\n" +"POT-Creation-Date: 2019-03-29 20:18+0000\n" "PO-Revision-Date: 2014-04-12 14:23+0000\n" "Last-Translator: Maurizio Delmonte \n" "Language-Team: Italiano\n" @@ -27,191 +27,191 @@ msgstr "" "Preferred-Encodings: utf-8 latin1\n" "Domain: collective.jekyll\n" -#: collective/jekyll/interfaces.py:40 +#: ../interfaces.py:46 msgid "Active Symptoms" msgstr "Sintomi Attivi" -#: collective/jekyll/symptoms.py:244 +#: ../symptoms.py:236 msgid "Body text" msgstr "Testo del documento" -#: collective/jekyll/symptoms.py:250 +#: ../symptoms.py:243 msgid "Body text does not have content." msgstr "Testo del documento senza contenuto." -#: collective/jekyll/symptoms.py:272 +#: ../symptoms.py:266 msgid "Body text ends with empty tags or BR." msgstr "Il testo del documento finisce con tag HTML vuoti o BR." -#: collective/jekyll/symptoms.py:245 +#: ../symptoms.py:237 msgid "Body text should have content." msgstr "Il testo del documento dovrebbe contenere qualcosa." -#: collective/jekyll/symptoms.py:256 +#: ../symptoms.py:249 msgid "Body text should not start or end with empty tags or BR." msgstr "Testo del documento non dovrebbe iniziare con tag HTML vuoti o BR." -#: collective/jekyll/symptoms.py:267 +#: ../symptoms.py:261 msgid "Body text starts with empty tags or BR." msgstr "Il testo del documento inizia con tag HTML vuoti o BR." -#: collective/jekyll/browser/controlpanel.py:50 -#: collective/jekyll/profiles/default/controlpanel.xml +#: ../browser/diagnosis.py:102 +msgid "Consider" +msgstr "Ripristina" + +#: ../browser/controlpanel.py:11 +#: ../profiles/default/controlpanel.xml msgid "Content quality" msgstr "Qualità del contenuto" -#: collective/jekyll/symptoms.py:170 +#: ../testing.zcml:16 +msgid "Content to ease tests" +msgstr "" + +#: ../symptoms.py:174 msgid "Description does not begin with uppercase letter." msgstr "La descrizione non inizia con una lettera maiuscola." -#: collective/jekyll/symptoms.py:206 +#: ../symptoms.py:203 msgid "Description does not have content." msgstr "La descrizione non ha contenuto." -#: collective/jekyll/symptoms.py:94 +#: ../symptoms.py:168 +msgid "Description format" +msgstr "Format della descrizione" + +#: ../symptoms.py:185 +msgid "Description length" +msgstr "Lunghezza della descrizione" + +#: ../symptoms.py:99 msgid "Id format" msgstr "Format dell'id" -#: collective/jekyll/symptoms.py:95 +#: ../symptoms.py:100 msgid "Id should not start with 'copy_of'." msgstr "L'id non dovrebbe iniziare con 'copy_of'." -#: collective/jekyll/symptoms.py:103 +#: ../symptoms.py:108 msgid "Id starts with '${start}'." msgstr "L'id inizia con '${start}'." -#: collective/jekyll/browser/diagnosis.py:102 +#: ../browser/diagnosis.py:105 msgid "Ignore" msgstr "Ignora" -#: collective/jekyll/browser/symptom.pt:4 +#: ../browser/symptom.pt:4 msgid "Ignored" msgstr "Ignorato" -#: collective/jekyll/symptoms.py:347 +#: ../symptoms.py:341 msgid "Image field content has correct size." msgstr "Il contenuto del campo immagine ha dimensione corretta." -#: collective/jekyll/symptoms.py:326 +#: ../symptoms.py:321 msgid "Image field does not have content." msgstr "Il campo immagine non ha contenuto." -#: collective/jekyll/symptoms.py:324 +#: ../symptoms.py:319 msgid "Image field has content." msgstr "Il campo immagine ha contenuto." -#: collective/jekyll/symptoms.py:319 +#: ../symptoms.py:314 msgid "Image field should have content." msgstr "Il campo immagine dovrebbe avere contenuto." -#: collective/jekyll/symptoms.py:332 +#: ../symptoms.py:327 msgid "Image field should have correct size." msgstr "Il campo immagine dovrebbe avere una dimensione corretta." -#: collective/jekyll/symptoms.py:318 +#: ../symptoms.py:313 msgid "Image present" msgstr "Immagine presente" -#: collective/jekyll/symptoms.py:331 +#: ../symptoms.py:326 msgid "Image size" msgstr "Dimensione immagine" -#: collective/jekyll/symptoms.py:283 +#: ../configure.zcml:28 +msgid "Installs the collective.jekyll package" +msgstr "" + +#: ../symptoms.py:277 msgid "Links In Body" msgstr "Link nel testo del documento" -#: collective/jekyll/browser/diagnosis.py:99 -msgid "Consider" -msgstr "Ripristina" - -#: collective/jekyll/interfaces.py:41 +#: ../interfaces.py:47 msgid "Select which symptoms will be taken in account when diagnosing content quality." msgstr "Seleziona i sintomi di cui tenere conto quando si valuta la qualità del contenuto." -#: collective/jekyll/symptoms.py:255 +#: ../symptoms.py:248 msgid "Spaces In Body" msgstr "Spazi nel testo del documento" -#: collective/jekyll/symptoms.py:171 -msgid "Summary does not begin with uppercase letter." -msgstr "La descrizione non inizia con una lettera maiuscola." - -#: collective/jekyll/symptoms.py:207 -msgid "Summary does not have content." -msgstr "La descrizione non ha contenuto." - -#: collective/jekyll/symptoms.py:163 -msgid "Summary format" -msgstr "Format della descrizione" - -#: collective/jekyll/symptoms.py:187 -msgid "Summary length" -msgstr "Lunghezza della descrizione" - -#: collective/jekyll/browser/controlpanel.py:52 -msgid "Symptoms activation" -msgstr "Attivazione dei sintomi." - -#: collective/jekyll/symptoms.py:307 +#: ../symptoms.py:302 msgid "The body text has less than ${minimum} links to other pages." msgstr "Il testo del documento ha meno di ${minimum} link ad altre pagine." -#: collective/jekyll/symptoms.py:291 +#: ../symptoms.py:285 msgid "The body text should have at least ${minimum} links to other pages. " msgstr "Il testo del documento dovrebbe avere almeno ${minimum} link ad altre pagine." -#: collective/jekyll/symptoms.py:211 +#: ../symptoms.py:205 msgid "The description counts ${word_count} significant words (longer than 3 letters). It should have at most ${maximum} significant words." msgstr "La descrizione conta ${word_count} parole significative (più lunghe di 3 lettere). Dovrebbe avere al massimo ${maximum} parole significative." -#: collective/jekyll/symptoms.py:164 -msgid "The summary (or description) should begin with uppercase letter." +#: ../symptoms.py:169 +msgid "The description should begin with uppercase letter." msgstr "La descrizione dovrebbe iniziare con una lettera maiuscola." -#: collective/jekyll/symptoms.py:195 +#: ../symptoms.py:193 msgid "The summary (or description) should not be empty and should have at most ${maximum} significant words (longer than 3 letters). " msgstr "La descrizione non dovrebbe essere vuota e dovrebbe avere al massimo ${maximum} parole significative (più lunghe di 3 lettere)." -#: collective/jekyll/symptoms.py:216 -msgid "The summary counts ${word_count} significant words (longer than 3 letters). It should have at most ${maximum} significant words." -msgstr "La descrizione conta ${word_count} parole significative (più lunghe di 3 lettere). Dovrebbe avere al massimo ${maximum} parole significative." - -#: collective/jekyll/symptoms.py:134 +#: ../symptoms.py:139 msgid "The title counts ${word_count} significant words (longer than 3 letters). It should have at most ${maximum} significant words." msgstr "Il titolo conta ${word_count} parole significative (più lunghe di 3 lettere). Dovrebbe avere al massimo ${maximum} parole significative." -#: collective/jekyll/symptoms.py:120 +#: ../symptoms.py:125 msgid "The title should have at most ${maximum} significant words (longer than 3 letters). " msgstr "Il titolo dovrebbe avere al massimo ${maximum} parole significative (più lunghe di 3 lettere)." -#: collective/jekyll/symptoms.py:158 +#: ../symptoms.py:163 msgid "Title does not begin with uppercase letter." msgstr "Il titolo non inizia con una lettera maiuscola." -#: collective/jekyll/symptoms.py:151 +#: ../symptoms.py:156 msgid "Title format" msgstr "Format del titolo" -#: collective/jekyll/symptoms.py:112 +#: ../symptoms.py:117 msgid "Title length" msgstr "Lunghezza del titolo" -#: collective/jekyll/symptoms.py:152 +#: ../symptoms.py:157 msgid "Title should begin with uppercase letter." msgstr "Il titolo dovrebbe iniziare con una lettera maiuscola." -#: collective/jekyll/symptoms.py:349 +#: ../symptoms.py:343 msgid "Wrong size : image is ${actual_width} by ${actual_height} pixels. It should be ${width} by ${height} pixels." msgstr "Dimensione errata: l'Immagine è ${actual_width} per ${actual_height} pixel. Dovrebbe essere ${width} per ${height} pixel." -#: collective/jekyll/browser/controlpanel.py:51 +#: ../browser/controlpanel.py:12 msgid "You can activate / deactivate symptoms using this form." msgstr "Puoi attivare / disattivare i sintomi usando questa form." -#: collective/jekyll/__init__.py:7 +#: ../configure.zcml:28 +msgid "collective.jekyll" +msgstr "" + +#: ../testing.zcml:16 +msgid "collective.jekyll tests" +msgstr "" + +#: ../__init__.py:7 msgid "ok" msgstr "ok" -#: collective/jekyll/__init__.py:8 +#: ../__init__.py:8 msgid "warning" msgstr "attenzione" diff --git a/src/collective/jekyll/locales/nl/LC_MESSAGES/collective.jekyll.po b/src/collective/jekyll/locales/nl/LC_MESSAGES/collective.jekyll.po index 90a6e5b..875d5ba 100644 --- a/src/collective/jekyll/locales/nl/LC_MESSAGES/collective.jekyll.po +++ b/src/collective/jekyll/locales/nl/LC_MESSAGES/collective.jekyll.po @@ -1,20 +1,20 @@ # ############################################################################# -# +# # Copyright (c) 2003-2004 Zope Foundation and Contributors. # All Rights Reserved. -# +# # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS # FOR A PARTICULAR PURPOSE. -# +# # ############################################################################# msgid "" msgstr "" "Project-Id-Version: 1.0\n" -"POT-Creation-Date: 2013-09-03 14:23+0000\n" +"POT-Creation-Date: 2019-03-29 20:18+0000\n" "PO-Revision-Date: 2012-05-11 15:55+0200\n" "Last-Translator: bsuttor \n" "Language-Team: Dutch\n" @@ -29,194 +29,193 @@ msgstr "" "Language: nl\n" "Generated-By: zope/app/locales/extract.py\n" -#: collective/jekyll/interfaces.py:40 +#: ../interfaces.py:46 msgid "Active Symptoms" msgstr "Actieve criteria" -#: collective/jekyll/symptoms.py:244 +#: ../symptoms.py:236 msgid "Body text" msgstr "Hoofdtekst aanwezig" -#: collective/jekyll/symptoms.py:250 +#: ../symptoms.py:243 msgid "Body text does not have content." msgstr "De hoofdtekst is leeg." -#: collective/jekyll/symptoms.py:272 +#: ../symptoms.py:266 msgid "Body text ends with empty tags or BR." msgstr "De hoofdtekst eindigt met lege tags of BR." -#: collective/jekyll/symptoms.py:245 +#: ../symptoms.py:237 msgid "Body text should have content." msgstr "De hoofdtekst moet inhoud hebben." -#: collective/jekyll/symptoms.py:256 +#: ../symptoms.py:249 msgid "Body text should not start or end with empty tags or BR." msgstr "Hoofdtekst mag niet starten of eindigen met lege tags of BR." -#: collective/jekyll/symptoms.py:267 +#: ../symptoms.py:261 msgid "Body text starts with empty tags or BR." msgstr "De hoofdtekst start met lege tags of BR." -#: collective/jekyll/browser/controlpanel.py:50 -#: collective/jekyll/profiles/default/controlpanel.xml +#: ../browser/diagnosis.py:102 +msgid "Consider" +msgstr "Herstellen" + +#: ../browser/controlpanel.py:11 +#: ../profiles/default/controlpanel.xml msgid "Content quality" msgstr "Kwaliteit van de inhoud" -#: collective/jekyll/symptoms.py:170 +#: ../testing.zcml:16 +msgid "Content to ease tests" +msgstr "" + +#: ../symptoms.py:174 msgid "Description does not begin with uppercase letter." msgstr "De beschrijving begint niet met een hoofdletter." -#: collective/jekyll/symptoms.py:206 +#: ../symptoms.py:203 msgid "Description does not have content." msgstr "De beschrijving is leeg." -#: collective/jekyll/symptoms.py:94 +#: ../symptoms.py:168 +msgid "Description format" +msgstr "" + +#: ../symptoms.py:185 +msgid "Description length" +msgstr "" + +#: ../symptoms.py:99 msgid "Id format" msgstr "Formaat van de verkorte naam" -#: collective/jekyll/symptoms.py:95 +#: ../symptoms.py:100 msgid "Id should not start with 'copy_of'." msgstr "Verkorte naam mag niet starten met 'copy_of'." -#: collective/jekyll/symptoms.py:103 +#: ../symptoms.py:108 msgid "Id starts with '${start}'." msgstr "Verkorte naam start met '${start}'." # values for ignore -#: collective/jekyll/browser/diagnosis.py:102 +#: ../browser/diagnosis.py:105 msgid "Ignore" msgstr "Negeren" -#: collective/jekyll/browser/symptom.pt:4 +#: ../browser/symptom.pt:4 msgid "Ignored" msgstr "Genegeerd" -#: collective/jekyll/symptoms.py:347 +#: ../symptoms.py:341 msgid "Image field content has correct size." msgstr "Het veld afbeelding heeft een correcte grootte." -#: collective/jekyll/symptoms.py:326 +#: ../symptoms.py:321 msgid "Image field does not have content." msgstr "Het veld afbeelding is niet ingevuld." -#: collective/jekyll/symptoms.py:324 +#: ../symptoms.py:319 msgid "Image field has content." msgstr "Het veld afbeelding is ingevuld." -#: collective/jekyll/symptoms.py:319 +#: ../symptoms.py:314 msgid "Image field should have content." msgstr "Het veld afbeelding moet ingevuld zijn." -#: collective/jekyll/symptoms.py:332 +#: ../symptoms.py:327 msgid "Image field should have correct size." msgstr "Het veld afbeelding moet een correcte grootte hebben." -#: collective/jekyll/symptoms.py:318 +#: ../symptoms.py:313 msgid "Image present" msgstr "Afbeelding aanwezig" -#: collective/jekyll/symptoms.py:331 +#: ../symptoms.py:326 msgid "Image size" msgstr "Grootte van de afbeelding" -#: collective/jekyll/symptoms.py:283 +#: ../configure.zcml:28 +msgid "Installs the collective.jekyll package" +msgstr "" + +#: ../symptoms.py:277 msgid "Links In Body" msgstr "Links in hoofdtekst" -#: collective/jekyll/browser/diagnosis.py:99 -msgid "Consider" -msgstr "Herstellen" - -#: collective/jekyll/interfaces.py:41 +#: ../interfaces.py:47 msgid "Select which symptoms will be taken in account when diagnosing content quality." msgstr "Selecteer de criteria die gebruikt zullen worden tijdens de diagnose van de kwaliteit van de inhoud." -#: collective/jekyll/symptoms.py:255 +#: ../symptoms.py:248 msgid "Spaces In Body" msgstr "Spaties in hoofdtekst" -#: collective/jekyll/symptoms.py:171 -msgid "Summary does not begin with uppercase letter." -msgstr "" - -#: collective/jekyll/symptoms.py:207 -msgid "Summary does not have content." -msgstr "" - -#: collective/jekyll/symptoms.py:163 -msgid "Summary format" -msgstr "" - -#: collective/jekyll/symptoms.py:187 -msgid "Summary length" -msgstr "" - -#: collective/jekyll/browser/controlpanel.py:52 -msgid "Symptoms activation" -msgstr "Criteria activeren" - -#: collective/jekyll/symptoms.py:307 +#: ../symptoms.py:302 msgid "The body text has less than ${minimum} links to other pages." msgstr "" -#: collective/jekyll/symptoms.py:291 +#: ../symptoms.py:285 msgid "The body text should have at least ${minimum} links to other pages. " msgstr "" -#: collective/jekyll/symptoms.py:211 +#: ../symptoms.py:205 msgid "The description counts ${word_count} significant words (longer than 3 letters). It should have at most ${maximum} significant words." msgstr "De beschrijving telt ${word_count} significante woorden (langer dan 3 letters). Ze zou hoogstens ${maximum} significante woorden mogen bevatten." -#: collective/jekyll/symptoms.py:164 -msgid "The summary (or description) should begin with uppercase letter." +#: ../symptoms.py:169 +msgid "The description should begin with uppercase letter." msgstr "" -#: collective/jekyll/symptoms.py:195 +#: ../symptoms.py:193 msgid "The summary (or description) should not be empty and should have at most ${maximum} significant words (longer than 3 letters). " msgstr "" -#: collective/jekyll/symptoms.py:216 -msgid "The summary counts ${word_count} significant words (longer than 3 letters). It should have at most ${maximum} significant words." -msgstr "" - -#: collective/jekyll/symptoms.py:134 +#: ../symptoms.py:139 msgid "The title counts ${word_count} significant words (longer than 3 letters). It should have at most ${maximum} significant words." msgstr "De titel bevat ${word_count} significante woorden (langer dan 3 letters). Hij zou hoogstens ${maximum} significante woorden mogen bevatten." -#: collective/jekyll/symptoms.py:120 +#: ../symptoms.py:125 msgid "The title should have at most ${maximum} significant words (longer than 3 letters). " msgstr "De title zou hoogstens ${maximum} significante woorden (langer dan 3 letters) bevatten." -#: collective/jekyll/symptoms.py:158 +#: ../symptoms.py:163 msgid "Title does not begin with uppercase letter." msgstr "De titel begint niet met een hoofdletter." -#: collective/jekyll/symptoms.py:151 +#: ../symptoms.py:156 msgid "Title format" msgstr "Formaat van de titel" -#: collective/jekyll/symptoms.py:112 +#: ../symptoms.py:117 msgid "Title length" msgstr "Lengte van de titel" -#: collective/jekyll/symptoms.py:152 +#: ../symptoms.py:157 msgid "Title should begin with uppercase letter." msgstr "De titel moet beginnen met een hoofdletter." -#: collective/jekyll/symptoms.py:349 +#: ../symptoms.py:343 msgid "Wrong size : image is ${actual_width} by ${actual_height} pixels. It should be ${width} by ${height} pixels." msgstr "Verkeerde grootte: de afbeelding is ${actual_width} op ${actual_height} pixels groot. Ze zou ${width} op ${height} pixels groot moeten zijn." -#: collective/jekyll/browser/controlpanel.py:51 +#: ../browser/controlpanel.py:12 msgid "You can activate / deactivate symptoms using this form." msgstr "U kan met dit formulier criteria activeren of desactiveren." +#: ../configure.zcml:28 +msgid "collective.jekyll" +msgstr "" + +#: ../testing.zcml:16 +msgid "collective.jekyll tests" +msgstr "" + # values for status -#: collective/jekyll/__init__.py:7 +#: ../__init__.py:7 msgid "ok" msgstr "" -#: collective/jekyll/__init__.py:8 +#: ../__init__.py:8 msgid "warning" msgstr "niet ok" - diff --git a/src/collective/jekyll/symptoms.py b/src/collective/jekyll/symptoms.py index 79938df..f3684f2 100644 --- a/src/collective/jekyll/symptoms.py +++ b/src/collective/jekyll/symptoms.py @@ -165,31 +165,24 @@ def _update(self): class DescriptionFormatSymptom(SymptomBase): - title = _(u"Summary format") + title = _(u"Description format") help = _( - u"The summary (or description) should begin with " + u"The description should begin with " u"uppercase letter." ) - FORMAT = dict( - description=_(u"Description does not begin with uppercase letter."), - summary=_(u"Summary does not begin with uppercase letter."), - ) + FORMAT = _(u"Description does not begin with uppercase letter.") def _update(self): description = self.context.Description() - if 'summary' in self.context.Schema()['description'].widget.label: - key = 'summary' - else: - key = 'description' if len(description): self.status = description[0].isupper() - self.description = self.FORMAT[key] + self.description = self.FORMAT class DescriptionLengthSymptom(SymptomBase): - title = _(u"Summary length") + title = _(u"Description length") @property def maximum(self): @@ -207,51 +200,45 @@ def help(self): mapping={'maximum': self.maximum} ) - EMPTY = dict( - description=_(u"Description does not have content."), - summary=_(u"Summary does not have content."), - ) + EMPTY = _(u"Description does not have content.") - TOO_LONG = dict( - description=_( + TOO_LONG = _( u"The description counts ${word_count} significant words " u"(longer than 3 letters). " u"It should have at most ${maximum} significant words." - ), - summary=_( - u"The summary counts ${word_count} significant words " - u"(longer than 3 letters). " - u"It should have at most ${maximum} significant words." - ), - ) + ) def _update(self): maximum = self.maximum word_count = countWords(self.context.Description()) - if 'summary' in self.context.Schema()['description'].widget.label: - key = 'summary' - else: - key = 'description' if not len(self.context.Description()): self.status = False - self.description = self.EMPTY[key] + self.description = self.EMPTY else: self.status = (word_count <= maximum) - symptom_description = self.TOO_LONG[key] + symptom_description = self.TOO_LONG self.description = Message( symptom_description, mapping={'word_count': word_count, 'maximum': maximum} ) +def get_text(context): + text = context.text + if text: + return text.output.strip() + else: + return '' + + class BodyTextPresentSymptom(SymptomBaseWithCache): title = _(u"Body text") help = _(u"Body text should have content.") def _update(self): - cooked = self.cache.setdefault('cooked_body', self.context.CookedBody(stx_level=2).strip()) - self.status = len(cooked) + text = self.cache.setdefault('body', get_text(self.context)) + self.status = len(text) if not self.status: self.description = _(u"Body text does not have content.") @@ -263,10 +250,9 @@ class SpacesInBodySymptom(SymptomBaseWithCache): def _update(self): self.status = True - cooked = self.cache.setdefault('cooked_body', - self.context.CookedBody(stx_level=2).strip()) - soup = self.cache.setdefault('cooked_body_soup', - BeautifulSoup(cooked.decode('utf-8'))) + text = self.cache.setdefault('body', get_text(self.context)) + soup = self.cache.setdefault('body_soup', + BeautifulSoup(text, features='lxml')) child_count = 0 for child in soup.children: child_count += 1 @@ -307,10 +293,9 @@ def help(self): def _update(self): minimum = self.minimum - cooked = self.cache.setdefault('cooked_body', - self.context.CookedBody(stx_level=2).strip()) - soup = self.cache.setdefault('cooked_body_soup', - BeautifulSoup(cooked.decode('utf-8'))) + text = self.cache.setdefault('body', get_text(self.context)) + soup = self.cache.setdefault('body_soup', + BeautifulSoup(text, features='lxml')) links = soup.find_all('a') self.status = len(links) >= minimum if not self.status: @@ -329,7 +314,7 @@ class ImagePresentSymptom(SymptomBase): help = _(u"Image field should have content.") def _update(self): - self.status = hasImage(self.context) + self.status = bool(self.context.image) if self.status: self.description = _(u"Image field has content.") else: @@ -346,9 +331,8 @@ def _update(self): width = int(self._registry.get('%s.width' % self.name, 675)) height = int(self._registry.get('%s.height' % self.name, 380)) - if hasImage(context): - imageField = context.Schema()['image'] - size = imageField.getSize(context) + if self.context.image: + size = self.context.image.getImageSize() self.status = size == (width, height) else: self.status = False @@ -370,9 +354,3 @@ def _update(self): 'height': height } ) - - -def hasImage(value): - imageField = value.Schema()['image'] - status = imageField.get_size(value) - return status From 59bb44b2a914a6b6f87a431d146a68884cc0642b Mon Sep 17 00:00:00 2001 From: Nicolas Demonte Date: Mon, 1 Apr 2019 12:44:12 +0200 Subject: [PATCH 09/12] Handle plone.protect --- src/collective/jekyll/symptoms.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/collective/jekyll/symptoms.py b/src/collective/jekyll/symptoms.py index f3684f2..f9844a9 100644 --- a/src/collective/jekyll/symptoms.py +++ b/src/collective/jekyll/symptoms.py @@ -10,6 +10,12 @@ from zope.schema.vocabulary import SimpleVocabulary from zope.schema.vocabulary import SimpleTerm +try: + from plone.protect.auto import safeWrite +except ImportError: + def safeWrite(*args): + pass + from plone.registry.interfaces import IRegistry from collective.jekyll.interfaces import ISymptom @@ -36,6 +42,7 @@ def __init__(self, context): self.status = True self.description = '' self._registry = queryUtility(IRegistry, default={}) + safeWrite(self.context, self.context.REQUEST) def _update(self): raise NotImplementedError(u"") From 580fdf04216d7faf92f289516a86fb144653c765 Mon Sep 17 00:00:00 2001 From: Nicolas Demonte Date: Mon, 1 Apr 2019 13:13:18 +0200 Subject: [PATCH 10/12] Get request without help from the context --- src/collective/jekyll/symptoms.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/collective/jekyll/symptoms.py b/src/collective/jekyll/symptoms.py index f9844a9..29b0e12 100644 --- a/src/collective/jekyll/symptoms.py +++ b/src/collective/jekyll/symptoms.py @@ -6,10 +6,10 @@ from zope.i18nmessageid import Message from zope.component import queryUtility from zope.component import getGlobalSiteManager +from zope.globalrequest import getRequest from zope.schema.interfaces import IVocabularyFactory from zope.schema.vocabulary import SimpleVocabulary from zope.schema.vocabulary import SimpleTerm - try: from plone.protect.auto import safeWrite except ImportError: @@ -42,7 +42,7 @@ def __init__(self, context): self.status = True self.description = '' self._registry = queryUtility(IRegistry, default={}) - safeWrite(self.context, self.context.REQUEST) + safeWrite(self.context, getRequest()) def _update(self): raise NotImplementedError(u"") From 6e887761202798914a8656265bde54e822e1b229 Mon Sep 17 00:00:00 2001 From: Kim Paulissen Date: Tue, 16 Apr 2019 09:40:00 +0200 Subject: [PATCH 11/12] add z3c.autoinclude and uninstall profile --- setup.py | 11 ++++++++++- src/collective/jekyll/configure.zcml | 10 +++++++++- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index fe3afc5..894ddba 100644 --- a/setup.py +++ b/setup.py @@ -19,6 +19,10 @@ # Get more strings from # http://pypi.python.org/pypi?%3Aaction=list_classifiers classifiers=[ + "Framework :: Plone", + "Framework :: Plone :: 4.3", + "Framework :: Plone :: 5.0", + "Framework :: Plone :: 5.1", "Programming Language :: Python", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", @@ -26,7 +30,7 @@ keywords='Plone content diagnosis', author='Godefroid Chapelle', author_email='gotcha@bubblenet.be', - url='http://svn.plone.org/svn/collective/', + url='https://github.com/collective/collective.jekyll', license='gpl', packages=find_packages('src'), package_dir={'': 'src'}, @@ -49,4 +53,9 @@ 'pytest', 'gocept.pytestlayer', ]), + entry_points=""" + # -*- Entry points: -*- + [z3c.autoinclude.plugin] + target = plone + """, ) diff --git a/src/collective/jekyll/configure.zcml b/src/collective/jekyll/configure.zcml index 732e9ed..3620011 100644 --- a/src/collective/jekyll/configure.zcml +++ b/src/collective/jekyll/configure.zcml @@ -26,7 +26,15 @@ description="Installs the collective.jekyll package" provides="Products.GenericSetup.interfaces.EXTENSION" /> - + + + Date: Wed, 31 Jul 2019 16:53:03 +0200 Subject: [PATCH 12/12] Handle write on read for annotations This avoids plone.protect error --- CHANGES.txt | 3 +++ src/collective/jekyll/ignored.py | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 121102c..65e7a94 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -5,6 +5,9 @@ Changelog 0.4.1 (unreleased) ------------------ +- Fix plone.protect error + [laulaz] + - Renaming based on EN translation This also fixes tests on local machine [laulaz] diff --git a/src/collective/jekyll/ignored.py b/src/collective/jekyll/ignored.py index 04d09a4..2f3f516 100644 --- a/src/collective/jekyll/ignored.py +++ b/src/collective/jekyll/ignored.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- from collective.jekyll.interfaces import IIgnoredSymptomNames from persistent.dict import PersistentDict +from plone.protect.auto import safeWrite from zope.annotation.interfaces import IAnnotations from zope.interface import implements from zope.component import ComponentLookupError @@ -20,6 +21,10 @@ def _getNamesDict(self): annotations = IAnnotations(self.context) except ComponentLookupError: return {} + try: + safeWrite(annotations.obj.__annotations__) + except AttributeError: + pass return annotations.setdefault( JEKYLL_IGNORED_SYMPTOMS, PersistentDict())