Opened 8 years ago

Closed 8 years ago

#4479 closed (fixed)

[unicode] isValidFloat is using gettext in unicode-branch

Reported by: Jure Cuhalev <gandalf@…> Owned by: mtredinnick
Component: Validators Version: master
Severity: Keywords: unicode
Cc: gandalf@… Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

isValidFloat in django.core validators is referencing gettext in unicode branch, here is a patch:

===================================================================
--- validators.py       (revision 5427)
+++ validators.py       (working copy)
@@ -437,7 +437,7 @@
     try:
         float(data)
     except ValueError:
-        raise ValidationError, gettext("Please enter a valid floating point number.")
+        raise ValidationError, ugettext_lazy("Please enter a valid floating point number.")
 
 class HasAllowableSize(object):
     """

Change History (2)

comment:1 Changed 8 years ago by mtredinnick

  • Needs documentation unset
  • Needs tests unset
  • Owner changed from adrian to mtredinnick
  • Patch needs improvement unset
  • Summary changed from [patch] isValidFloat is using gettext in unicode-branch to [unicode] isValidFloat is using gettext in unicode-branch
  • Triage Stage changed from Unreviewed to Accepted

Fixed title.

comment:2 Changed 8 years ago by mtredinnick

  • Resolution set to fixed
  • Status changed from new to closed

(In [5445]) unicode: Fixed #4479 -- Changed an errant gettext() call to ugettext().

Note: See TracTickets for help on using tickets.
Back to Top