Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When trans() gets an array of strings, the tool thinks it's a missing string #47

Closed
arthur-olafsson opened this issue Nov 18, 2016 · 3 comments
Milestone

Comments

@arthur-olafsson
Copy link

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.

@potsky
Copy link
Owner

potsky commented Dec 14, 2016

Hi,

only in dry-run mode? In normal mode, is your array preserved in the translation file?

@potsky
Copy link
Owner

potsky commented Mar 1, 2017

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.

@potsky potsky closed this as completed Mar 1, 2017
potsky added a commit that referenced this issue Mar 1, 2017
@arthur-olafsson
Copy link
Author

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!

@potsky potsky modified the milestone: 2.x.5 Mar 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants