From b7c1060f78356d2999add81deec8dc3f88b5e1fe Mon Sep 17 00:00:00 2001 From: Mirek Simek Date: Wed, 23 Oct 2024 22:07:23 +0200 Subject: [PATCH] fix: translation only applied on app start * the problem was that with gettext the translations for Invenio string 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_theme/config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/invenio_theme/config.py b/invenio_theme/config.py index 77b27d0..d0e473a 100644 --- a/invenio_theme/config.py +++ b/invenio_theme/config.py @@ -9,7 +9,7 @@ """Configuration for Invenio-Theme.""" -from invenio_i18n import gettext as _ +from invenio_i18n import lazy_gettext as _ BASE_TEMPLATE = "invenio_theme/page.html" """Base template for user facing pages.