More specific localisations

This commit is contained in:
Ingo Schommer 2017-04-26 13:48:48 +12:00
parent 507add8566
commit d2132e85db
2 changed files with 12 additions and 8 deletions

View File

@ -57,6 +57,10 @@ en:
VALIDDATEFORMAT2: 'Please enter a valid date format ({format})'
VALIDDATEMAXDATE: 'Your date has to be older or matching the maximum allowed date ({date})'
VALIDDATEMINDATE: 'Your date has to be newer or matching the minimum allowed date ({date})'
DatetimeField:
VALIDDATETIMEFORMAT: 'Please enter a valid date and time format ({format})'
VALIDDATEMAXDATETIME: 'Your date has to be older or matching the maximum allowed date and time ({datetime})'
VALIDDATEMINDATETIME: 'Your date has to be newer or matching the minimum allowed date and time ({datetime})'
Director:
INVALID_REQUEST: 'Invalid request'
DropdownField:

View File

@ -558,8 +558,8 @@ class DatetimeField extends TextField
$validator->validationError(
$this->name,
_t(
'DateField.VALIDDATEFORMAT2',
"Please enter a valid date format ({format})",
'DatetimeField.VALIDDATETIMEFORMAT',
"Please enter a valid date and time format ({format})",
['format' => $this->getDatetimeFormat()]
)
);
@ -574,9 +574,9 @@ class DatetimeField extends TextField
$validator->validationError(
$this->name,
_t(
'DateField.VALIDDATEMINDATE',
"Your date has to be newer or matching the minimum allowed date ({date})",
['date' => $this->iso8601ToLocalised($min)]
'DatetimeField.VALIDDATETIMEMINDATE',
"Your date has to be newer or matching the minimum allowed date and time ({datetime})",
['datetime' => $this->iso8601ToLocalised($min)]
)
);
return false;
@ -591,9 +591,9 @@ class DatetimeField extends TextField
$validator->validationError(
$this->name,
_t(
'DateField.VALIDDATEMAXDATE',
"Your date has to be older or matching the maximum allowed date ({date})",
['date' => $this->iso8601ToLocalised($max)]
'DatetimeField.VALIDDATEMAXDATETIME',
"Your date has to be older or matching the maximum allowed date and time ({datetime})",
['datetime' => $this->iso8601ToLocalised($max)]
)
);
return false;