Closed
Description
Symfony version(s) affected
5.4.2
Description
Using Symfony\Component\Translation\t
function and using named domain
argument "translation:extract" and "debug:translations" use incorrect domain (default one messages
is used).
How to reproduce
class DAMFileNameTemplate extends Constraint
{
public function getMessage()
{
return t('error.dam_file_name_template_evaluation', domain: 'validators');
}
}
Calling debug:translation
reports incorrect domain:
Workaround:
class DAMFileNameTemplate extends Constraint
{
public function getMessage()
{
return t('error.dam_file_name_template_evaluation', [], 'validators');
}
}
Calling debug:translation
reports correctly:
Possible Solution
No response
Additional Context
No response