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 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 <[email protected]>
  • Loading branch information
mesemus and mesemus committed Oct 23, 2024
1 parent 3574203 commit c8e6e3a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion invenio_records/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit c8e6e3a

Please sign in to comment.