gettext fix
authorRadek Czajka <radoslaw.czajka@nowoczesnapolska.org.pl>
Wed, 21 Mar 2012 09:45:18 +0000 (10:45 +0100)
committerRadek Czajka <radoslaw.czajka@nowoczesnapolska.org.pl>
Wed, 21 Mar 2012 09:45:18 +0000 (10:45 +0100)
apps/catalogue/forms.py
apps/suggest/forms.py

index 75d9ab9..9115b2d 100644 (file)
@@ -35,7 +35,7 @@ class DownloadFormatsForm(forms.Form):
             widget=forms.CheckboxSelectMultiple)
 
     def __init__(self, *args, **kwargs):
-         super(DownloadFormatsForm, self).__init__(*args, **kwargs)
+        super(DownloadFormatsForm, self).__init__(*args, **kwargs)
 
 
 PDF_PAGE_SIZES = (
index a81579b..1a55543 100644 (file)
@@ -42,14 +42,15 @@ Kontakt: %(contact)s
             }, fail_silently=True)
 
         if email_re.match(contact):
-            send_mail(u'[WolneLektury] ' + _(u'Thank you for your suggestion.'),
-                    _(u"""\
+            send_mail(u'[WolneLektury] ' +
+                    ugettext(u'Thank you for your suggestion.'),
+                    ugettext(u"""\
 Thank you for your comment on WolneLektury.pl.
 The suggestion has been referred to the project coordinator.""") +
 u"""
 
 -- 
-""" + _(u'''Message sent automatically. Please do not reply.'''),
+""" + ugettext(u'''Message sent automatically. Please do not reply.'''),
                     'no-reply@wolnelektury.pl', [contact], fail_silently=True)
 
 
@@ -60,7 +61,7 @@ class PublishingSuggestForm(forms.Form):
 
     def clean(self, *args, **kwargs):
         if not self.cleaned_data['books'] and not self.cleaned_data['audiobooks']:
-            msg = _(u"One of these fields is required.")
+            msg = ugettext(u"One of these fields is required.")
             self._errors["books"] = self.error_class([msg])
             self._errors["audiobooks"] = self.error_class([msg])
         return super(PublishingSuggestForm, self).clean(*args, **kwargs)