-
-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[fc] Repository: plone.app.vocabularies
Branch: refs/heads/master Date: 2023-09-15T12:25:09+02:00 Author: Philip Bauer (pbauer) <[email protected]> Commit: plone/plone.app.vocabularies@8b2f4f7 translate column-heading title in listing_tabular Files changed: M plone/app/vocabularies/metadatafields.py Repository: plone.app.vocabularies Branch: refs/heads/master Date: 2023-09-15T12:27:40+02:00 Author: Philip Bauer (pbauer) <[email protected]> Commit: plone/plone.app.vocabularies@f9f7b90 add changenote Files changed: A news/82.bugfix Repository: plone.app.vocabularies Branch: refs/heads/master Date: 2023-09-15T07:58:46-07:00 Author: David Glick (davisagli) <[email protected]> Commit: plone/plone.app.vocabularies@dd79810 Merge pull request #82 from plone/translate_title Translate column-heading title in listing_tabular Files changed: A news/82.bugfix M plone/app/vocabularies/metadatafields.py
- Loading branch information
Showing
1 changed file
with
30 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,48 @@ | ||
Repository: plone.releaser | ||
Repository: plone.app.vocabularies | ||
|
||
|
||
Branch: refs/heads/master | ||
Date: 2023-09-14T20:59:13+02:00 | ||
Author: Maurits van Rees (mauritsvanrees) <[email protected]> | ||
Commit: https://github.com/plone/plone.releaser/commit/b60db647cc6d0b4360a75f6aea38853286b974a3 | ||
Date: 2023-09-15T12:25:09+02:00 | ||
Author: Philip Bauer (pbauer) <[email protected]> | ||
Commit: https://github.com/plone/plone.app.vocabularies/commit/8b2f4f70c45cf589668e0a827303ac9d4c682161 | ||
|
||
Fix setting version for non-lowercase package. | ||
translate column-heading title in listing_tabular | ||
|
||
In the previous release this would add a duplicate line. | ||
Fixes https://github.com/plone/plone.releaser/issues/58 | ||
Files changed: | ||
M plone/app/vocabularies/metadatafields.py | ||
|
||
b'diff --git a/plone/app/vocabularies/metadatafields.py b/plone/app/vocabularies/metadatafields.py\nindex 2ef09d3..16d157d 100644\n--- a/plone/app/vocabularies/metadatafields.py\n+++ b/plone/app/vocabularies/metadatafields.py\n@@ -26,6 +26,7 @@\n "Type": _("Type"),\n "total_comments": _("Total comments"),\n "mime_type": _("MIME type"),\n+ "Title": _("Title"),\n }\n \n \n' | ||
|
||
Repository: plone.app.vocabularies | ||
|
||
|
||
Branch: refs/heads/master | ||
Date: 2023-09-15T12:27:40+02:00 | ||
Author: Philip Bauer (pbauer) <[email protected]> | ||
Commit: https://github.com/plone/plone.app.vocabularies/commit/f9f7b90395c1e47424c1f6622f1577217537ba7d | ||
|
||
add changenote | ||
|
||
Files changed: | ||
A news/58.bugfix | ||
M plone/releaser/buildout.py | ||
M plone/releaser/pip.py | ||
M plone/releaser/tests/test_buildout.py | ||
M plone/releaser/tests/test_pip.py | ||
A news/82.bugfix | ||
|
||
b'diff --git a/news/58.bugfix b/news/58.bugfix\nnew file mode 100644\nindex 0000000..c7b35cc\n--- /dev/null\n+++ b/news/58.bugfix\n@@ -0,0 +1,3 @@\n+Fix setting version for non-lowercase package.\n+In the previous release this would add a duplicate line.\n+[maurits]\ndiff --git a/plone/releaser/buildout.py b/plone/releaser/buildout.py\nindex b1fca5c..15db5af 100644\n--- a/plone/releaser/buildout.py\n+++ b/plone/releaser/buildout.py\n@@ -99,7 +99,8 @@ def __setitem__(self, package_name, new_version):\n self.path.write_text(contents)\n \n newline = f"{package_name} = {new_version}"\n- line_reg = re.compile(rf"^{package_name.lower()} *=.*")\n+ # Search case insensitively.\n+ line_reg = re.compile(rf"^{package_name} *=.*", flags=re.I)\n \n def line_check(line):\n # Look for the \'package name = version\' on a line of its own,\ndiff --git a/plone/releaser/pip.py b/plone/releaser/pip.py\nindex 9e59b43..2c8cb95 100644\n--- a/plone/releaser/pip.py\n+++ b/plone/releaser/pip.py\n@@ -57,7 +57,7 @@ def __setitem__(self, package_name, new_version):\n newline = f"{package_name}=={new_version}"\n # Look for \'package name==version\' on a line of its own,\n # no whitespace, no environment markers.\n- line_reg = re.compile(rf"^{package_name.lower()}==[^;]*$")\n+ line_reg = re.compile(rf"^{package_name}==[^;]*$", flags=re.I)\n \n def line_check(line):\n return line_reg.match(line)\ndiff --git a/plone/releaser/tests/test_buildout.py b/plone/releaser/tests/test_buildout.py\nindex eb479e8..b231fbc 100644\n--- a/plone/releaser/tests/test_buildout.py\n+++ b/plone/releaser/tests/test_buildout.py\n@@ -236,6 +236,19 @@ def test_versions_file_set_normal(tmp_path):\n vf["package"] = "3.0"\n vf = VersionsFile(copy_path)\n assert vf.get("package") == "3.0"\n+ # How about packages that are not lowercase?\n+ # ConfigParser reports all package names as lower case, so we don\'t know\n+ # what their exact spelling is. So whatever we pass on, should be used.\n+ assert "CamelCase = 1.0" in copy_path.read_text()\n+ assert copy_path.read_text().lower().count("camelcase") == 1\n+ vf["CAMELcase"] = "1.1"\n+ vf = VersionsFile(copy_path)\n+ assert vf["camelCASE"] == "1.1"\n+ assert vf["CaMeLcAsE"] == "1.1"\n+ text = copy_path.read_text()\n+ assert "CamelCase = 1.0" not in text\n+ assert "CAMELcase = 1.1" in text\n+ assert copy_path.read_text().lower().count("camelcase") == 1\n \n \n def test_versions_file_set_ignore_markers(tmp_path):\ndiff --git a/plone/releaser/tests/test_pip.py b/plone/releaser/tests/test_pip.py\nindex 5e256bf..30774c1 100644\n--- a/plone/releaser/tests/test_pip.py\n+++ b/plone/releaser/tests/test_pip.py\n@@ -158,6 +158,20 @@ def test_constraints_file_set_normal(tmp_path):\n cf["package"] = "3.0"\n cf = ConstraintsFile(copy_path)\n assert cf.get("package") == "3.0"\n+ # How about packages that are not lowercase?\n+ # Currently in ConstraintsFile we report all package names as lower case,\n+ # so we don\'t know what their exact spelling is, which is what ConfigParser\n+ # does for the Buildout versions file. So whatever we pass on, should be used.\n+ assert "CamelCase==1.0" in copy_path.read_text()\n+ assert copy_path.read_text().lower().count("camelcase") == 1\n+ cf["CAMELcase"] = "1.1"\n+ cf = ConstraintsFile(copy_path)\n+ assert cf["camelCASE"] == "1.1"\n+ assert cf["CaMeLcAsE"] == "1.1"\n+ text = copy_path.read_text()\n+ assert "CamelCase==1.0" not in text\n+ assert "CAMELcase==1.1" in text\n+ assert copy_path.read_text().lower().count("camelcase") == 1\n \n \n def test_constraints_file_set_ignore_markers(tmp_path):\n' | ||
b'diff --git a/news/82.bugfix b/news/82.bugfix\nnew file mode 100644\nindex 0000000..8db1ab9\n--- /dev/null\n+++ b/news/82.bugfix\n@@ -0,0 +1,2 @@\n+Fix the untranslated table-column-heading "Title" in listing_tabular for collections and folders.\n+[pbauer]\n' | ||
|
||
Repository: plone.releaser | ||
Repository: plone.app.vocabularies | ||
|
||
|
||
Branch: refs/heads/master | ||
Date: 2023-09-14T21:35:41+02:00 | ||
Author: Maurits van Rees (mauritsvanrees) <[email protected]> | ||
Commit: https://github.com/plone/plone.releaser/commit/b84d36349554a6b6f6ee2767fb6ae34551f43186 | ||
Date: 2023-09-15T07:58:46-07:00 | ||
Author: David Glick (davisagli) <[email protected]> | ||
Commit: https://github.com/plone/plone.app.vocabularies/commit/dd798108acd0d5fc8556fa429897d74af5e231b5 | ||
|
||
Merge pull request #59 from plone/maurits-issue-58-lower-case | ||
Merge pull request #82 from plone/translate_title | ||
|
||
Fix setting version for non-lowercase package. | ||
Translate column-heading title in listing_tabular | ||
|
||
Files changed: | ||
A news/58.bugfix | ||
M plone/releaser/buildout.py | ||
M plone/releaser/pip.py | ||
M plone/releaser/tests/test_buildout.py | ||
M plone/releaser/tests/test_pip.py | ||
A news/82.bugfix | ||
M plone/app/vocabularies/metadatafields.py | ||
|
||
b'diff --git a/news/58.bugfix b/news/58.bugfix\nnew file mode 100644\nindex 0000000..c7b35cc\n--- /dev/null\n+++ b/news/58.bugfix\n@@ -0,0 +1,3 @@\n+Fix setting version for non-lowercase package.\n+In the previous release this would add a duplicate line.\n+[maurits]\ndiff --git a/plone/releaser/buildout.py b/plone/releaser/buildout.py\nindex b1fca5c..15db5af 100644\n--- a/plone/releaser/buildout.py\n+++ b/plone/releaser/buildout.py\n@@ -99,7 +99,8 @@ def __setitem__(self, package_name, new_version):\n self.path.write_text(contents)\n \n newline = f"{package_name} = {new_version}"\n- line_reg = re.compile(rf"^{package_name.lower()} *=.*")\n+ # Search case insensitively.\n+ line_reg = re.compile(rf"^{package_name} *=.*", flags=re.I)\n \n def line_check(line):\n # Look for the \'package name = version\' on a line of its own,\ndiff --git a/plone/releaser/pip.py b/plone/releaser/pip.py\nindex 9e59b43..2c8cb95 100644\n--- a/plone/releaser/pip.py\n+++ b/plone/releaser/pip.py\n@@ -57,7 +57,7 @@ def __setitem__(self, package_name, new_version):\n newline = f"{package_name}=={new_version}"\n # Look for \'package name==version\' on a line of its own,\n # no whitespace, no environment markers.\n- line_reg = re.compile(rf"^{package_name.lower()}==[^;]*$")\n+ line_reg = re.compile(rf"^{package_name}==[^;]*$", flags=re.I)\n \n def line_check(line):\n return line_reg.match(line)\ndiff --git a/plone/releaser/tests/test_buildout.py b/plone/releaser/tests/test_buildout.py\nindex eb479e8..b231fbc 100644\n--- a/plone/releaser/tests/test_buildout.py\n+++ b/plone/releaser/tests/test_buildout.py\n@@ -236,6 +236,19 @@ def test_versions_file_set_normal(tmp_path):\n vf["package"] = "3.0"\n vf = VersionsFile(copy_path)\n assert vf.get("package") == "3.0"\n+ # How about packages that are not lowercase?\n+ # ConfigParser reports all package names as lower case, so we don\'t know\n+ # what their exact spelling is. So whatever we pass on, should be used.\n+ assert "CamelCase = 1.0" in copy_path.read_text()\n+ assert copy_path.read_text().lower().count("camelcase") == 1\n+ vf["CAMELcase"] = "1.1"\n+ vf = VersionsFile(copy_path)\n+ assert vf["camelCASE"] == "1.1"\n+ assert vf["CaMeLcAsE"] == "1.1"\n+ text = copy_path.read_text()\n+ assert "CamelCase = 1.0" not in text\n+ assert "CAMELcase = 1.1" in text\n+ assert copy_path.read_text().lower().count("camelcase") == 1\n \n \n def test_versions_file_set_ignore_markers(tmp_path):\ndiff --git a/plone/releaser/tests/test_pip.py b/plone/releaser/tests/test_pip.py\nindex 5e256bf..30774c1 100644\n--- a/plone/releaser/tests/test_pip.py\n+++ b/plone/releaser/tests/test_pip.py\n@@ -158,6 +158,20 @@ def test_constraints_file_set_normal(tmp_path):\n cf["package"] = "3.0"\n cf = ConstraintsFile(copy_path)\n assert cf.get("package") == "3.0"\n+ # How about packages that are not lowercase?\n+ # Currently in ConstraintsFile we report all package names as lower case,\n+ # so we don\'t know what their exact spelling is, which is what ConfigParser\n+ # does for the Buildout versions file. So whatever we pass on, should be used.\n+ assert "CamelCase==1.0" in copy_path.read_text()\n+ assert copy_path.read_text().lower().count("camelcase") == 1\n+ cf["CAMELcase"] = "1.1"\n+ cf = ConstraintsFile(copy_path)\n+ assert cf["camelCASE"] == "1.1"\n+ assert cf["CaMeLcAsE"] == "1.1"\n+ text = copy_path.read_text()\n+ assert "CamelCase==1.0" not in text\n+ assert "CAMELcase==1.1" in text\n+ assert copy_path.read_text().lower().count("camelcase") == 1\n \n \n def test_constraints_file_set_ignore_markers(tmp_path):\n' | ||
b'diff --git a/news/82.bugfix b/news/82.bugfix\nnew file mode 100644\nindex 0000000..8db1ab9\n--- /dev/null\n+++ b/news/82.bugfix\n@@ -0,0 +1,2 @@\n+Fix the untranslated table-column-heading "Title" in listing_tabular for collections and folders.\n+[pbauer]\ndiff --git a/plone/app/vocabularies/metadatafields.py b/plone/app/vocabularies/metadatafields.py\nindex 2ef09d3..16d157d 100644\n--- a/plone/app/vocabularies/metadatafields.py\n+++ b/plone/app/vocabularies/metadatafields.py\n@@ -26,6 +26,7 @@\n "Type": _("Type"),\n "total_comments": _("Total comments"),\n "mime_type": _("MIME type"),\n+ "Title": _("Title"),\n }\n \n \n' | ||
|