#94192Make the DateTimeConverter error for PropertyMappings translatable
Description
If a model holding a DateTime attribute and is filled by a form, currently the error-message for falsely entered values can not be translated because its hard-coded in Extbase’s DateTimeConverter.php:169 ( Validation\Error(‘The date “%s” was not recognized (for format “%s”).’, 1307719788, [$dateAsString, $dateFormat]) )
The PropertyMapping for this attribute is configured in an initializeAction(), like:
// set input date-format for mapping the user.birthday property
$this->arguments->getArgument('user')->getPropertyMappingConfiguration()
->forProperty('birthday')->setTypeConverterOption(
DateTimeConverter::class,
DateTimeConverter::CONFIGURATION_DATE_FORMAT,
'd.m.Y'
);
Input of “test” into the birthday form field resulting in The date “test” was not recognized (for format “d.m.Y”). as non translatable, where as all other messages are in the right locale.
Reviews 1
Files 1
History 610
-
Bastian Stargazer commented and changed attached extbase-no-translation-available.png 01/06/22, 11:36
-
Mathias Schreiber changed Sprint Focus Remote Sprint 03/08/22, 12:09
-
Susanne Moog changed Sprint Focus
Remote SprintOn Location Sprint 08/05/22, 13:00 -
Oliver Hader changed Sprint Focus
On Location Sprint11/03/22, 09:04 -
Gerrit Code Review pushed patch set 1 for main to change 81933 status
NewUnder Review 11/23/23, 17:35 -
Gerrit Code Review pushed patch set 2 for main to change 81933 11/23/23, 18:19
-
Gerrit Code Review pushed patch set 3 for main to change 81933 06/24/24, 12:16
-
Gerrit Code Review pushed patch set 4 for main to change 81933 06/25/24, 11:36
-
Tim Weisenberger commented and changed status
Under ReviewResolved done0 %100 % 06/25/24, 12:10Applied in changeset commit:399bb327c649aab55aa868293959ac2d183c97c3.
-
Benni Mack changed status
ResolvedClosed 07/09/24, 12:45
push – because its such a tiny change for a next release!