From c8e6e3ac5e0fdfaf5deb2e8e5e7d504afcd40082 Mon Sep 17 00:00:00 2001 From: Mirek Simek Date: Wed, 23 Oct 2024 21:14:28 +0200 Subject: [PATCH] fix: translation only applied on app start * the problem was that with gettext the translations for column labels have been only be calculated on boot time. * using lazy_gettext instead fixes that, because it calculates the translation at the request level Co-authored-by: Mirek Simek --- invenio_records/admin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/invenio_records/admin.py b/invenio_records/admin.py index 78c04afc..011df8a5 100644 --- a/invenio_records/admin.py +++ b/invenio_records/admin.py @@ -15,7 +15,7 @@ from flask_admin.contrib.sqla import ModelView from invenio_admin.filters import FilterConverter from invenio_db import db -from invenio_i18n import gettext as _ +from invenio_i18n import lazy_gettext as _ from markupsafe import Markup from sqlalchemy.exc import SQLAlchemyError