inveniosoftware / invenio-accounts

Invenio module for managing user accounts.
https://invenio-accounts.readthedocs.io
MIT License
6 stars 69 forks source link

fix: translation only applied on app start #494

Open mesemus opened 1 month ago

mesemus commented 1 month ago

Description

This pull request fixes premature evaluation of i18n strings inside static fields. gettext call, that causes the evaluation to be performed at boot time, was replaced with gettext_lazy that is performed at request time. This fixes admin actions and validation error not being translated when language is changed.

Checklist

Ticks in all boxes and 🟢 on all GitHub actions status checks are required to merge:

Frontend

Reminder

By using GitHub, you have already agreed to the GitHub’s Terms of Service including that:

  1. You license your contribution under the same terms as the current repository’s license.
  2. You agree that you have the right to license your contribution under the current repository’s license.