Skip to content
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
@bkilinc

Description

@bkilinc

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());
}

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions