Django

Code

Ticket #4479 (closed: fixed)

Opened 1 year ago

Last modified 1 year ago

[unicode] isValidFloat is using gettext in unicode-branch

Reported by: Jure Cuhalev <gandalf@owca.info> Assigned to: mtredinnick
Milestone: Component: Validators
Version: SVN Keywords: unicode
Cc: gandalf@owca.info Triage Stage: Accepted
Has patch: 0 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

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):
     """

Attachments

Change History

06/06/07 00:28:44 changed by mtredinnick

  • needs_better_patch changed.
  • needs_tests changed.
  • summary changed from [patch] isValidFloat is using gettext in unicode-branch to [unicode] isValidFloat is using gettext in unicode-branch.
  • owner changed from adrian to mtredinnick.
  • needs_docs changed.
  • stage changed from Unreviewed to Accepted.

Fixed title.

06/09/07 09:30:25 changed by mtredinnick

  • status changed from new to closed.
  • resolution set to fixed.

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


Add/Change #4479 ([unicode] isValidFloat is using gettext in unicode-branch)




Change Properties
Action