mirror of
https://gitea.mueller.network/extern/django-helpdesk.git
synced 2024-11-26 09:53:12 +01:00
forms.py : To get the translations for the fields' labels, use ugettext_lazy() instead for ugettext().
ugettext() loads the translations at the same time the module is loaded (--> always in english). ugettext_lazy() loads them when they are needed (--> when the user makes a query --> we known the language the user wants based on the header of their HTTP request) Signed-off-by: Jerome Flesch <jflesch@gmail.com>
This commit is contained in:
parent
0ad110ec7f
commit
74668f30d5
@ -15,7 +15,7 @@ from django import forms
|
|||||||
from django.forms import extras
|
from django.forms import extras
|
||||||
from django.core.files.storage import default_storage
|
from django.core.files.storage import default_storage
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
from django.utils.translation import ugettext as _
|
from django.utils.translation import ugettext_lazy as _
|
||||||
try:
|
try:
|
||||||
from django.contrib.auth import get_user_model
|
from django.contrib.auth import get_user_model
|
||||||
User = get_user_model()
|
User = get_user_model()
|
||||||
|
Loading…
Reference in New Issue
Block a user