From 30677bceb63489f28ab450002a376ab926e63433 Mon Sep 17 00:00:00 2001 From: petschki Date: Thu, 7 Nov 2024 15:22:01 +0100 Subject: [PATCH] [fc] Repository: plone.app.multilingual Branch: refs/heads/master Date: 2024-11-07T12:23:59+01:00 Author: 1letter (1letter) <1letter@gmx.de> Commit: https://github.com/plone/plone.app.multilingual/commit/9227f3d37a43d0735ff408130b6b574f19e76588 switch to pat-contentbrowser widget in IConnectTranslation Files changed: M src/plone/app/multilingual/browser/interfaces.py Repository: plone.app.multilingual Branch: refs/heads/master Date: 2024-11-07T12:23:59+01:00 Author: 1letter (1letter) <1letter@gmx.de> Commit: https://github.com/plone/plone.app.multilingual/commit/5a56ab2d7849095d230226528a9967b95ae29220 Update robottest to check the pat-contentbrowser Files changed: M src/plone/app/multilingual/tests/robot/test_add_translation.robot Repository: plone.app.multilingual Branch: refs/heads/master Date: 2024-11-07T12:23:59+01:00 Author: 1letter (1letter) <1letter@gmx.de> Commit: https://github.com/plone/plone.app.multilingual/commit/240e2bf014f3d79ff7b8a2286f302618b8787ac2 add news Files changed: A news/461.feature Repository: plone.app.multilingual Branch: refs/heads/master Date: 2024-11-07T12:24:52+01:00 Author: 1letter (1letter) <1letter@gmx.de> Commit: https://github.com/plone/plone.app.multilingual/commit/b85dac4de570e7a94b4a4f9ae0531c9270c19098 Update config Files changed: M pyproject.toml M setup.py Repository: plone.app.multilingual Branch: refs/heads/master Date: 2024-11-07T12:43:37+01:00 Author: 1letter (1letter) <1letter@gmx.de> Commit: https://github.com/plone/plone.app.multilingual/commit/348aaeae4b9ba1a8d110ad4d86dba18b4b3ffbd1 fix robot test Files changed: M src/plone/app/multilingual/tests/robot/test_add_translation.robot Repository: plone.app.multilingual Branch: refs/heads/master Date: 2024-11-07T15:22:01+01:00 Author: Peter Mathis (petschki) Commit: https://github.com/plone/plone.app.multilingual/commit/a173ada395b25b07fc4a40ff8681d1041c063058 Merge pull request #470 from plone/implement-pat-contentbrowser Implement pat contentbrowser Files changed: A news/461.feature M pyproject.toml M setup.py M src/plone/app/multilingual/browser/interfaces.py M src/plone/app/multilingual/tests/robot/test_add_translation.robot --- last_commit.txt | 87 ++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 68 insertions(+), 19 deletions(-) diff --git a/last_commit.txt b/last_commit.txt index b4d4935e9c..cdb7629227 100644 --- a/last_commit.txt +++ b/last_commit.txt @@ -1,48 +1,97 @@ -Repository: plone.app.event +Repository: plone.app.multilingual Branch: refs/heads/master -Date: 2024-11-07T11:01:21+01:00 +Date: 2024-11-07T12:23:59+01:00 Author: 1letter (1letter) <1letter@gmx.de> -Commit: https://github.com/plone/plone.app.event/commit/91708eb98bff5607f22030c893b213865158a1a8 +Commit: https://github.com/plone/plone.app.multilingual/commit/9227f3d37a43d0735ff408130b6b574f19e76588 -fix import of TextLinesFieldWidget +switch to pat-contentbrowser widget in IConnectTranslation Files changed: -M plone/app/event/dx/behaviors.py +M src/plone/app/multilingual/browser/interfaces.py -b'diff --git a/plone/app/event/dx/behaviors.py b/plone/app/event/dx/behaviors.py\nindex d29addf2..f8595105 100644\n--- a/plone/app/event/dx/behaviors.py\n+++ b/plone/app/event/dx/behaviors.py\n@@ -51,7 +51,7 @@\n # Import fails for Plone < 6.1\n # version pin of plone.app.z3cform is set to plone.app.z3cform==4.3.2\n # TextLinesFieldWidget is introduced in plone.app.z3cform==4.4.0\n- from plone.app.z3cform.widgets.textlines import TextLinesFieldWidget\n+ from plone.app.z3cform.widgets.text import TextLinesFieldWidget\n except ImportError:\n from z3c.form.browser.textlines import TextLinesFieldWidget\n \n' +b'diff --git a/src/plone/app/multilingual/browser/interfaces.py b/src/plone/app/multilingual/browser/interfaces.py\nindex 8977a0e3..7190d911 100644\n--- a/src/plone/app/multilingual/browser/interfaces.py\n+++ b/src/plone/app/multilingual/browser/interfaces.py\n@@ -2,7 +2,7 @@\n from plone.app.multilingual import _\n from plone.app.multilingual.browser.vocabularies import untranslated_languages\n from plone.app.multilingual.interfaces import ITranslationManager\n-from plone.app.z3cform.widget import RelatedItemsFieldWidget\n+from plone.app.z3cform.widgets.contentbrowser import ContentBrowserFieldWidget\n from plone.autoform import directives\n from plone.autoform.interfaces import IFormFieldProvider\n from plone.base.interfaces import IPloneSiteRoot\n@@ -98,7 +98,7 @@ class IConnectTranslation(model.Schema):\n )\n directives.widget(\n "content",\n- RelatedItemsFieldWidget,\n+ ContentBrowserFieldWidget,\n pattern_options={\n "basePath": make_relation_root_path,\n },\n' -Repository: plone.app.event +Repository: plone.app.multilingual Branch: refs/heads/master -Date: 2024-11-07T11:01:26+01:00 +Date: 2024-11-07T12:23:59+01:00 Author: 1letter (1letter) <1letter@gmx.de> -Commit: https://github.com/plone/plone.app.event/commit/db919758a6f298122cfab14612276d2447579dab +Commit: https://github.com/plone/plone.app.multilingual/commit/5a56ab2d7849095d230226528a9967b95ae29220 + +Update robottest to check the pat-contentbrowser + +Files changed: +M src/plone/app/multilingual/tests/robot/test_add_translation.robot + +b'diff --git a/src/plone/app/multilingual/tests/robot/test_add_translation.robot b/src/plone/app/multilingual/tests/robot/test_add_translation.robot\nindex 236a49dd..f75ade04 100644\n--- a/src/plone/app/multilingual/tests/robot/test_add_translation.robot\n+++ b/src/plone/app/multilingual/tests/robot/test_add_translation.robot\n@@ -46,10 +46,10 @@ I link the document in English as a translation\n Get Element States //a[@id="_modify_translations"] contains visible\n Click //a[@id="_modify_translations"]\n Click //table[@id="translations-overview"]/tbody/tr[1]/td[3]/a[contains(@class,"connectTranslationAction")]\n- Click //div[@id="formfield-form-widgets-content"]//div[contains(@class,"pat-relateditems-container")]//button[contains(@class,"mode") and contains(@class,"search")]\n- Type Text //div[@id="formfield-form-widgets-content"]//input[contains(@class,"select2-input")] en\n- Click //span[contains(., \'An English Document\')]\n- Click //*[contains(@class, \'modal-footer\')]//button[@id=\'form-buttons-connect_translation\']\n+ Click //div[@id="formfield-form-widgets-content"]//div[@class="content-browser-wrapper"]//button[contains(text(),"Select")]\n+ Click item in column 2 2\n+ Click //div[contains(@class, "content-browser-wrapper")]//div[contains(@class, "levelColumns")]/div[contains(@class, "preview")]/div[contains(@class, "levelToolbar")]/button\n+ Click //*[contains(@class, \'modal-footer\')]//button[@name=\'form.buttons.connect_translation\']\n Get Text //table[@id="translations-overview"]/tbody/tr[1]/td[2]/h3[@class="translationTitle"] should be An English Document\n Click //table[@id="translations-overview"]//a[contains(text(),\'/plone/ca/a-catalan-document\')]\n Get Text //*[@id="content"]/header/h1 should be A Catalan Document\n@@ -63,3 +63,14 @@ I switch to English\n I can view the document in English\n Get Element //h1[1][contains(text(),\'English Document\')]\n Get Element //ul[@id=\'portal-languageselector\']/li[contains(@class, \'currentLanguage\')]/a[@title=\'English\']\n+\n+\n+# DRY\n+\n+Click item in column\n+ [arguments] ${colnumber} ${itemposition}\n+ Click //div[contains(@class, "content-browser-wrapper")]//div[contains(@class, "levelColumns")]/div[${colnumber}]/div[contains(@class, "levelItems")]/div[${itemposition}]\n+\n+Pause\n+ Import library Dialogs\n+ Pause execution\n\\ No newline at end of file\n' + +Repository: plone.app.multilingual + + +Branch: refs/heads/master +Date: 2024-11-07T12:23:59+01:00 +Author: 1letter (1letter) <1letter@gmx.de> +Commit: https://github.com/plone/plone.app.multilingual/commit/240e2bf014f3d79ff7b8a2286f302618b8787ac2 add news Files changed: -A news/414.bugfix +A news/461.feature + +b'diff --git a/news/461.feature b/news/461.feature\nnew file mode 100644\nindex 00000000..6e24cb94\n--- /dev/null\n+++ b/news/461.feature\n@@ -0,0 +1 @@\n+use pat-contentbrowser as default widget for add translation form [@1letter]\n' + +Repository: plone.app.multilingual + + +Branch: refs/heads/master +Date: 2024-11-07T12:24:52+01:00 +Author: 1letter (1letter) <1letter@gmx.de> +Commit: https://github.com/plone/plone.app.multilingual/commit/b85dac4de570e7a94b4a4f9ae0531c9270c19098 + +Update config + +Files changed: +M pyproject.toml +M setup.py + +b'diff --git a/pyproject.toml b/pyproject.toml\nindex 762cf44b..e8239a22 100644\n--- a/pyproject.toml\n+++ b/pyproject.toml\n@@ -120,7 +120,7 @@ Zope = [\n ]\n python-dateutil = [\'dateutil\']\n pytest-plone = [\'pytest\', \'zope.pytestlayer\', \'plone.testing\', \'plone.app.testing\']\n-ignore-packages = [\'Products.LinguaPlone\']\n+ignore-packages = [\'Products.LinguaPlone\', \'Products.CMFPlacefulWorkflow\']\n \n ##\n # Add extra configuration options in .meta.toml:\ndiff --git a/setup.py b/setup.py\nindex fa6db140..179e0022 100644\n--- a/setup.py\n+++ b/setup.py\n@@ -62,6 +62,7 @@\n "plone.rfc822",\n "plone.testing",\n "robotsuite",\n+ "Products.CMFPlacefulWorkflow",\n ],\n },\n entry_points="""\n' + +Repository: plone.app.multilingual + + +Branch: refs/heads/master +Date: 2024-11-07T12:43:37+01:00 +Author: 1letter (1letter) <1letter@gmx.de> +Commit: https://github.com/plone/plone.app.multilingual/commit/348aaeae4b9ba1a8d110ad4d86dba18b4b3ffbd1 + +fix robot test + +Files changed: +M src/plone/app/multilingual/tests/robot/test_add_translation.robot -b'diff --git a/news/414.bugfix b/news/414.bugfix\nnew file mode 100644\nindex 000000000..244d32255\n--- /dev/null\n+++ b/news/414.bugfix\n@@ -0,0 +1,2 @@\n+fix import of TextLinesFieldWidget, correctness the rendering of EventAttendees TextLinesFieldWidget\n+[1letter]\n' +b'diff --git a/src/plone/app/multilingual/tests/robot/test_add_translation.robot b/src/plone/app/multilingual/tests/robot/test_add_translation.robot\nindex f75ade04..66d592b2 100644\n--- a/src/plone/app/multilingual/tests/robot/test_add_translation.robot\n+++ b/src/plone/app/multilingual/tests/robot/test_add_translation.robot\n@@ -46,7 +46,7 @@ I link the document in English as a translation\n Get Element States //a[@id="_modify_translations"] contains visible\n Click //a[@id="_modify_translations"]\n Click //table[@id="translations-overview"]/tbody/tr[1]/td[3]/a[contains(@class,"connectTranslationAction")]\n- Click //div[@id="formfield-form-widgets-content"]//div[@class="content-browser-wrapper"]//button[contains(text(),"Select")]\n+ Click //div[@id="formfield-form-widgets-content"]//div[@class="content-browser-wrapper"]//a[contains(text(),"Select")]\n Click item in column 2 2\n Click //div[contains(@class, "content-browser-wrapper")]//div[contains(@class, "levelColumns")]/div[contains(@class, "preview")]/div[contains(@class, "levelToolbar")]/button\n Click //*[contains(@class, \'modal-footer\')]//button[@name=\'form.buttons.connect_translation\']\n' -Repository: plone.app.event +Repository: plone.app.multilingual Branch: refs/heads/master -Date: 2024-11-07T12:21:17+01:00 +Date: 2024-11-07T15:22:01+01:00 Author: Peter Mathis (petschki) -Commit: https://github.com/plone/plone.app.event/commit/aedf39df2ef91c60a9cc48bb6429e961f85b7fdc +Commit: https://github.com/plone/plone.app.multilingual/commit/a173ada395b25b07fc4a40ff8681d1041c063058 -Merge pull request #415 from plone/fix#414 +Merge pull request #470 from plone/implement-pat-contentbrowser -fix import of widget +Implement pat contentbrowser Files changed: -A news/414.bugfix -M plone/app/event/dx/behaviors.py +A news/461.feature +M pyproject.toml +M setup.py +M src/plone/app/multilingual/browser/interfaces.py +M src/plone/app/multilingual/tests/robot/test_add_translation.robot -b'diff --git a/news/414.bugfix b/news/414.bugfix\nnew file mode 100644\nindex 000000000..244d32255\n--- /dev/null\n+++ b/news/414.bugfix\n@@ -0,0 +1,2 @@\n+fix import of TextLinesFieldWidget, correctness the rendering of EventAttendees TextLinesFieldWidget\n+[1letter]\ndiff --git a/plone/app/event/dx/behaviors.py b/plone/app/event/dx/behaviors.py\nindex d29addf24..f85951050 100644\n--- a/plone/app/event/dx/behaviors.py\n+++ b/plone/app/event/dx/behaviors.py\n@@ -51,7 +51,7 @@\n # Import fails for Plone < 6.1\n # version pin of plone.app.z3cform is set to plone.app.z3cform==4.3.2\n # TextLinesFieldWidget is introduced in plone.app.z3cform==4.4.0\n- from plone.app.z3cform.widgets.textlines import TextLinesFieldWidget\n+ from plone.app.z3cform.widgets.text import TextLinesFieldWidget\n except ImportError:\n from z3c.form.browser.textlines import TextLinesFieldWidget\n \n' +b'diff --git a/news/461.feature b/news/461.feature\nnew file mode 100644\nindex 00000000..6e24cb94\n--- /dev/null\n+++ b/news/461.feature\n@@ -0,0 +1 @@\n+use pat-contentbrowser as default widget for add translation form [@1letter]\ndiff --git a/pyproject.toml b/pyproject.toml\nindex 762cf44b..e8239a22 100644\n--- a/pyproject.toml\n+++ b/pyproject.toml\n@@ -120,7 +120,7 @@ Zope = [\n ]\n python-dateutil = [\'dateutil\']\n pytest-plone = [\'pytest\', \'zope.pytestlayer\', \'plone.testing\', \'plone.app.testing\']\n-ignore-packages = [\'Products.LinguaPlone\']\n+ignore-packages = [\'Products.LinguaPlone\', \'Products.CMFPlacefulWorkflow\']\n \n ##\n # Add extra configuration options in .meta.toml:\ndiff --git a/setup.py b/setup.py\nindex fa6db140..179e0022 100644\n--- a/setup.py\n+++ b/setup.py\n@@ -62,6 +62,7 @@\n "plone.rfc822",\n "plone.testing",\n "robotsuite",\n+ "Products.CMFPlacefulWorkflow",\n ],\n },\n entry_points="""\ndiff --git a/src/plone/app/multilingual/browser/interfaces.py b/src/plone/app/multilingual/browser/interfaces.py\nindex 8977a0e3..7190d911 100644\n--- a/src/plone/app/multilingual/browser/interfaces.py\n+++ b/src/plone/app/multilingual/browser/interfaces.py\n@@ -2,7 +2,7 @@\n from plone.app.multilingual import _\n from plone.app.multilingual.browser.vocabularies import untranslated_languages\n from plone.app.multilingual.interfaces import ITranslationManager\n-from plone.app.z3cform.widget import RelatedItemsFieldWidget\n+from plone.app.z3cform.widgets.contentbrowser import ContentBrowserFieldWidget\n from plone.autoform import directives\n from plone.autoform.interfaces import IFormFieldProvider\n from plone.base.interfaces import IPloneSiteRoot\n@@ -98,7 +98,7 @@ class IConnectTranslation(model.Schema):\n )\n directives.widget(\n "content",\n- RelatedItemsFieldWidget,\n+ ContentBrowserFieldWidget,\n pattern_options={\n "basePath": make_relation_root_path,\n },\ndiff --git a/src/plone/app/multilingual/tests/robot/test_add_translation.robot b/src/plone/app/multilingual/tests/robot/test_add_translation.robot\nindex 236a49dd..66d592b2 100644\n--- a/src/plone/app/multilingual/tests/robot/test_add_translation.robot\n+++ b/src/plone/app/multilingual/tests/robot/test_add_translation.robot\n@@ -46,10 +46,10 @@ I link the document in English as a translation\n Get Element States //a[@id="_modify_translations"] contains visible\n Click //a[@id="_modify_translations"]\n Click //table[@id="translations-overview"]/tbody/tr[1]/td[3]/a[contains(@class,"connectTranslationAction")]\n- Click //div[@id="formfield-form-widgets-content"]//div[contains(@class,"pat-relateditems-container")]//button[contains(@class,"mode") and contains(@class,"search")]\n- Type Text //div[@id="formfield-form-widgets-content"]//input[contains(@class,"select2-input")] en\n- Click //span[contains(., \'An English Document\')]\n- Click //*[contains(@class, \'modal-footer\')]//button[@id=\'form-buttons-connect_translation\']\n+ Click //div[@id="formfield-form-widgets-content"]//div[@class="content-browser-wrapper"]//a[contains(text(),"Select")]\n+ Click item in column 2 2\n+ Click //div[contains(@class, "content-browser-wrapper")]//div[contains(@class, "levelColumns")]/div[contains(@class, "preview")]/div[contains(@class, "levelToolbar")]/button\n+ Click //*[contains(@class, \'modal-footer\')]//button[@name=\'form.buttons.connect_translation\']\n Get Text //table[@id="translations-overview"]/tbody/tr[1]/td[2]/h3[@class="translationTitle"] should be An English Document\n Click //table[@id="translations-overview"]//a[contains(text(),\'/plone/ca/a-catalan-document\')]\n Get Text //*[@id="content"]/header/h1 should be A Catalan Document\n@@ -63,3 +63,14 @@ I switch to English\n I can view the document in English\n Get Element //h1[1][contains(text(),\'English Document\')]\n Get Element //ul[@id=\'portal-languageselector\']/li[contains(@class, \'currentLanguage\')]/a[@title=\'English\']\n+\n+\n+# DRY\n+\n+Click item in column\n+ [arguments] ${colnumber} ${itemposition}\n+ Click //div[contains(@class, "content-browser-wrapper")]//div[contains(@class, "levelColumns")]/div[${colnumber}]/div[contains(@class, "levelItems")]/div[${itemposition}]\n+\n+Pause\n+ Import library Dialogs\n+ Pause execution\n\\ No newline at end of file\n'