From 0061ba32ac6c9330fcf230c7f9aa5447aa964974 Mon Sep 17 00:00:00 2001 From: Sam Arbid Date: Tue, 11 Feb 2025 20:55:18 +0100 Subject: [PATCH] i18n: update string formatting for compatibility * Update string formatting for compatibility with i18n the following strings were updated: resources/serializers/utils.py services/pids/errors.py --- invenio_rdm_records/resources/serializers/utils.py | 6 ++++-- invenio_rdm_records/services/pids/errors.py | 4 +++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/invenio_rdm_records/resources/serializers/utils.py b/invenio_rdm_records/resources/serializers/utils.py index dbeb7468e..8d36d00e2 100644 --- a/invenio_rdm_records/resources/serializers/utils.py +++ b/invenio_rdm_records/resources/serializers/utils.py @@ -34,8 +34,10 @@ def get_vocabulary_props(vocabulary, fields, id_): return h.get("props", {}) raise VocabularyItemNotFoundError( - _("The '{vocabulary}' vocabulary item '{id_}' was not found.").format( - vocabulary=vocabulary, id_=id_ + _( + "The '%(vocabulary)s' vocabulary item '%(id_)s' was not found.", + vocabulary=vocabulary, + id_=id_, ) ) diff --git a/invenio_rdm_records/services/pids/errors.py b/invenio_rdm_records/services/pids/errors.py index edf991d0a..6b44b677c 100644 --- a/invenio_rdm_records/services/pids/errors.py +++ b/invenio_rdm_records/services/pids/errors.py @@ -30,6 +30,8 @@ def __init__(self, provider, scheme): """Initialise error.""" super().__init__( _( - "Unknown PID provider %(provider)s for %(scheme)s", provider=provider, scheme=scheme + "Unknown PID provider %(provider)s for %(scheme)s", + provider=provider, + scheme=scheme, ) )