When trans() gets an array of strings, the tool thinks it's a missing string
arthur-olafsson opened this issue · 3 comments
First, thanks for an awesome tool! It's made my life a lot easier.
I ran into a minor issue. Assume there's a translation file called things.php
:
'foo' => [
'bar' => 'bar',
'baz' => 'baz',
]
Then, somewhere, there's a call to trans('things.foo')
and uses the resulting array. When I run the artisan command in dry-run mode, it thinks that things.foo
is a missing string.
Hi,
only in dry-run mode? In normal mode, is your array preserved in the translation file?
Ok, it does the same when not running in dry-mode. I will check if the key already exists even if the value is not a string. Will be fixed in the next release.
You, sir, are a gentleman and a scholar. Sorry I missed your reply back in November! Thanks a bunch for looking into this and coming up with a fix!