You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However following throws an exception on php phing translations-dump command
t('my %adjective% string', ['%adjective%' => 'awesome'], locale: $locale);
// Can only extract the message ID or message domain from a scalar, concatenated string or "\Shopsys\FrameworkBundle\Component\Translation\Translator" class constant, but got "PhpParser\Node\Expr\Variable".// third parameter is not actually a translation domain, but named argument (fourth)
t('my %adjective% string', ['%adjective%' => 'awesome'], null, $locale);
// Can only extract the message ID or message domain from a scalar, concatenated string or "\Shopsys\FrameworkBundle\Component\Translation\Translator" class constant, but got "PhpParser\Node\Expr\ConstFetch".// null is not accepted even though it's the default value. Maybe domain should not be nullable and Translator::DEFAULT_DOMAIN should be the default value
Maybe it would be nice to check following (I suspect it will not extract into proper translation domain file)
Describe the bug
It is possible to pass locale and translation domain to the
t
function.The method header is like
Following calls works fine
However following throws an exception on
php phing translations-dump
commandMaybe it would be nice to check following (I suspect it will not extract into proper translation domain file)
Expected behavior
No error is raised 🙂
The text was updated successfully, but these errors were encountered: