From 50fe95e3ed72687da046966a32ce44eb05e07fb8 Mon Sep 17 00:00:00 2001 From: Sam Arbid Date: Fri, 25 Oct 2024 14:12:36 +0200 Subject: [PATCH] i18n: mark missing translations for errors.py --- invenio_drafts_resources/resources/records/errors.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/invenio_drafts_resources/resources/records/errors.py b/invenio_drafts_resources/resources/records/errors.py index 3ad6a92..7c8de1c 100644 --- a/invenio_drafts_resources/resources/records/errors.py +++ b/invenio_drafts_resources/resources/records/errors.py @@ -2,6 +2,7 @@ # # Copyright (C) 2021 CERN. # Copyright (C) 2021 TU Wien. +# Copyright (C) 2024 KTH Royal Institute of Technology. # # Invenio-Drafts-Resources is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see LICENSE file for more @@ -12,6 +13,7 @@ import json from flask_resources.errors import HTTPJSONException +from invenio_i18n import lazy_gettext as _ from invenio_pidstore.errors import PIDDoesNotExistError @@ -28,7 +30,7 @@ class RedirectException(HTTPJSONException): def __init__(self, location, **kwargs): """Constructor.""" self.location = location - kwargs.setdefault("description", "Redirecting...") + kwargs.setdefault("description", _("Redirecting...")) super().__init__(**kwargs) def get_headers(self, environ=None, scope=None):