Reputation: 881
I have the following code in my forms.py:
def field_validate(self, request):
try:
id_exists(request, self["user"].data)
except:
self.add_error('user', ugettext_lazy("id is not available"))
the problem is when my 'user' filed is not validated in my field_validate function, the error is displayed in English, however other texts in my whole project are translating. using ugettext_lazy nor ugettext solved the problem.
Is there anything I am missing?
tnx
Upvotes: 1
Views: 347
Reputation: 881
The whole problem was because in django.po file, above the translation there was a #fuzzy that prevented the option to be translated!
Upvotes: 2