This repository was archived by the owner on Jan 31, 2020. It is now read-only.
AbstractValidator does not use messageKey when translating messages #260
Open
Description
I would like to translate validation messages using messageKeys
as message strings may change. But translateMessage
in AbstractValidator
does not use $messageKey
parameter for translating, even if it is defined as method parameter. It uses message string to translate.
protected function translateMessage($messageKey, $message)
{
$translator = $this->getTranslator();
if (! $translator) {
return $message;
}
return $translator->translate($message, $this->getTranslatorTextDomain());
}