Skip to content

Commit

Permalink
i18n: use gettext for translatable strings in admin
Browse files Browse the repository at this point in the history
* Replaced the custom _ function with gettext from invenio_i18n to standardize internationalization and make translatable strings compatible with Invenio's i18n
  • Loading branch information
Samk13 committed Oct 28, 2024
1 parent d318704 commit 47a2c29
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions invenio_oaiserver/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,19 @@
#
# This file is part of Invenio.
# Copyright (C) 2015-2018 CERN.
# Copyright (C) 2024 KTH Royal Institute of Technology.
#
# Invenio is free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details.

"""Admin model views for OAI sets."""

from flask_admin.contrib.sqla import ModelView
from invenio_i18n import gettext as _

from .models import OAISet


def _(x):
"""Identity."""
return x


class OAISetModelView(ModelView):
"""OAISets model view."""

Expand Down

0 comments on commit 47a2c29

Please sign in to comment.