X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/88bfac93513a532bdbd0311a84a62ab854e473cc..8c1a28de26419e8e863f1c088917f19d63b2235e:/src/club/forms.py?ds=sidebyside diff --git a/src/club/forms.py b/src/club/forms.py index d0568c023..ed18e2240 100644 --- a/src/club/forms.py +++ b/src/club/forms.py @@ -3,6 +3,7 @@ # from decimal import Decimal from django import forms +from django.utils.translation import ugettext as _ from newsletter.forms import NewsletterForm from . import models from .payu.forms import CardTokenForm @@ -21,7 +22,11 @@ class ScheduleForm(forms.ModelForm, NewsletterForm): value = self.cleaned_data['amount'] club = models.Club.objects.first() if club and value < club.min_amount: - raise forms.ValidationError('Minimalna kwota to %d zł.' % club.min_amount) + raise forms.ValidationError( + _('Minimal amount is %(amount)d PLN.') % { + 'amount': club.min_amount + } + ) return value def save(self, *args, **kwargs):