Skip to content

Commit

Permalink
i18n: improve error message formatting for unrecognized field types
Browse files Browse the repository at this point in the history
  • Loading branch information
Samk13 committed Feb 5, 2025
1 parent 0fd57e8 commit d028aee
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions invenio_administration/marshmallow_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def find_type_in_mapping(field_type, custom_mapping):
return custom_mapping[current_type]
current_type = current_type.__base__

raise KeyError(_("Unrecognized field type: {field_type}", field_type=field_type))
raise KeyError(_("Unrecognized field type: %(field_type)s", field_type=field_type))


def jsonify_schema(schema):
Expand Down Expand Up @@ -162,7 +162,7 @@ def jsonify_schema(schema):
except KeyError:
raise Exception(
_(
"Unrecognised schema field {field}: {field_type_name}",
"Unrecognised schema field %(field)s: %(field_type_name)s",
field=field,
field_type_name=field_type_name,
)
Expand Down

0 comments on commit d028aee

Please sign in to comment.