Skip to content

Commit

Permalink
fix: translation only applied on app start
Browse files Browse the repository at this point in the history
* 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 <[email protected]>
  • Loading branch information
mesemus and mesemus committed Oct 23, 2024
1 parent ac24121 commit b7c1060
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion invenio_theme/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit b7c1060

Please sign in to comment.