From 07402a35ced5912302676898488e30dd50eeb561 Mon Sep 17 00:00:00 2001 From: "Zeller, Christina" Date: Mon, 1 Aug 2022 09:43:18 +0200 Subject: [PATCH 1/2] global: Fixes typo. As overall else: Pid --> PID. Refs: https://github.com/inveniosoftware/invenio-app-rdm/issues/1707 --- invenio_vocabularies/contrib/awards/schema.py | 2 +- invenio_vocabularies/contrib/funders/schema.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/invenio_vocabularies/contrib/awards/schema.py b/invenio_vocabularies/contrib/awards/schema.py index a6e16cb5..176c4769 100644 --- a/invenio_vocabularies/contrib/awards/schema.py +++ b/invenio_vocabularies/contrib/awards/schema.py @@ -50,7 +50,7 @@ class AwardSchema(BaseVocabularySchema): acronym = SanitizedUnicode() id = SanitizedUnicode( - validate=validate.Length(min=1, error=_("Pid cannot be blank.")) + validate=validate.Length(min=1, error=_("PID cannot be blank.")) ) @validates_schema diff --git a/invenio_vocabularies/contrib/funders/schema.py b/invenio_vocabularies/contrib/funders/schema.py index cfc1832d..29026a13 100644 --- a/invenio_vocabularies/contrib/funders/schema.py +++ b/invenio_vocabularies/contrib/funders/schema.py @@ -69,7 +69,7 @@ class FunderSchema(BaseVocabularySchema): ) id = SanitizedUnicode( - validate=validate.Length(min=1, error=_("Pid cannot be blank.")) + validate=validate.Length(min=1, error=_("PID cannot be blank.")) ) @validates_schema From 00a3d59aafda39d9e8b024b32f7208203e827387 Mon Sep 17 00:00:00 2001 From: "Zeller, Christina" Date: Mon, 1 Aug 2022 11:33:45 +0200 Subject: [PATCH 2/2] global: Clarifies error message. Refs: https://github.com/inveniosoftware/invenio-app-rdm/issues/1707 --- invenio_vocabularies/contrib/names/schema.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/invenio_vocabularies/contrib/names/schema.py b/invenio_vocabularies/contrib/names/schema.py index e205b445..f8c07f1e 100644 --- a/invenio_vocabularies/contrib/names/schema.py +++ b/invenio_vocabularies/contrib/names/schema.py @@ -49,7 +49,11 @@ def validate_names(self, data, **kwargs): can_compose = data.get("family_name") and data.get("given_name") name = data.get("name") if not can_compose and not name: - messages = [_("name or family_name and given_name must be present.")] + messages = [ + _( + "A name or the family name together with the given name must be present." + ) + ] raise ValidationError({"family_name": messages}) @post_load