potsky/laravel-localization-helpers

Track multi-line function calls

adriandmitroca opened this issue · 3 comments

Hey,

I found that this package has some serious issue when you call trans() function like this:

trans('user.welcome', [
    'name' => $user->name
]);

Situation like this is tracked like obsolete string or is not tracked at all. It works just fine when parameters are passed in the same line.

Hi,

I will check this in September but I think that default regex do not support multiline trans. You can modify this behavior in your configuration file by setting a correct regex modifier to match multi lines.

In your example, the closing ) is missing. Is this not the problem ?

Hey,

Thanks for your answer. Missing ) is just typo in example. I will try to look into this regex.

Will be fixed in the next release.