Open
Description
Currently, the TranslatableInterface implementation looks like this:
interface TranslatableInterface
{
public function trans(TranslatorInterface $translator, ?string $locale = null): string;
}
and the TranslatorInterface declaration looks like this
interface TranslatorInterface
{
public function trans(string $id, array $parameters = [], ?string $domain = null, ?string $locale = null): string;
public function getLocale(): string;
}
It is not possible to pass parameters to the translator if the object implements TranslatableInterface.
In my opinion, we should add $parameters and also $domain to the trans() method in TranslatableInterface to make these mechanisms consistent.