From 20fbd9f4fd1e0ab0503442e2babd64890b7b94c0 Mon Sep 17 00:00:00 2001 From: Mirek Simek Date: Wed, 23 Oct 2024 21:02:40 +0200 Subject: [PATCH] fix: translation only applied on app start * the problem was that with gettext the translations for facets have been only 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_resources/services/records/config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/invenio_records_resources/services/records/config.py b/invenio_records_resources/services/records/config.py index 6b67fc9a..0b4c8665 100644 --- a/invenio_records_resources/services/records/config.py +++ b/invenio_records_resources/services/records/config.py @@ -10,7 +10,7 @@ """Record Service API.""" -from invenio_i18n import gettext as _ +from invenio_i18n import lazy_gettext as _ from invenio_indexer.api import RecordIndexer from invenio_records_permissions.policies.records import RecordPermissionPolicy from invenio_search import RecordsSearchV2