Revised the error messages and their translations both in Python and for the JavaScript.

This commit is contained in:
2020-08-06 01:47:01 +08:00
parent b45c06ac36
commit 1d79e970c4
5 changed files with 39 additions and 34 deletions

View File

@@ -49,7 +49,7 @@ class RecordForm(forms.Form):
required=False,
max_length=128,
error_messages={
"max_length": _("This summary is too long."),
"max_length": _("This summary is too long (max. 128 characters)."),
})
amount = forms.IntegerField(
min_value=1,
@@ -181,13 +181,14 @@ class TransactionForm(forms.Form):
date = forms.DateField(
required=True,
error_messages={
"required": _("Please fill in the date."),
"invalid": _("This date is not valid.")
})
notes = forms.CharField(
required=False,
max_length=128,
error_messages={
"max_length": _("This notes is too long.")
"max_length": _("These notes are too long (max. 128 characters).")
})
def __init__(self, *args, **kwargs):