Anonymous avatar Anonymous committed 20b43f4

dateutil: use translation hooks. Refs #32.

Comments (0)

Files changed (1)


             date_str = u' '.join(valuelist)
             if not date_str:
        = None
-                raise ValidationError(u'Please input a date/time value')
+                raise ValidationError(self.gettext(u'Please input a date/time value'))
             parse_kwargs = self.parse_kwargs.copy()
             if 'default' not in parse_kwargs:
        = parser.parse(date_str, **parse_kwargs)
             except ValueError:
        = None
-                raise ValidationError(u'Invalid date/time input')
+                raise ValidationError(self.gettext(u'Invalid date/time input'))
 class DateField(DateTimeField):
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.