mirror of
https://github.com/eitchtee/WYGIWYH.git
synced 2026-06-08 23:52:51 +02:00
locale: add lazy translations to missing ValidationErrors
This commit is contained in:
@@ -18,7 +18,7 @@ class MonthYearModelField(models.DateField):
|
||||
# Set the day to 1
|
||||
return date.replace(day=1).date()
|
||||
except ValueError:
|
||||
raise ValidationError("Invalid date format. Use YYYY-MM.")
|
||||
raise ValidationError(_("Invalid date format. Use YYYY-MM."))
|
||||
|
||||
def formfield(self, **kwargs):
|
||||
kwargs["widget"] = MonthYearWidget
|
||||
|
||||
Reference in New Issue
Block a user