Skip to content

Commit

Permalink
i18n: update string formatting for compatibility
Browse files Browse the repository at this point in the history
* Update string formatting for compatibility with i18n
the following strings were updated:
resources/serializers/utils.py
services/pids/errors.py
  • Loading branch information
Samk13 committed Feb 18, 2025
1 parent 28036c5 commit 0061ba3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 4 additions & 2 deletions invenio_rdm_records/resources/serializers/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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_,
)
)

Expand Down
4 changes: 3 additions & 1 deletion invenio_rdm_records/services/pids/errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)
)

0 comments on commit 0061ba3

Please sign in to comment.