potsky / laravel-localization-helpers

🎌 Artisan commands to generate and update lang files automatically
GNU General Public License v3.0
187 stars 38 forks source link

Track multi-line function calls #33

Closed adriandmitroca closed 7 years ago

adriandmitroca commented 8 years ago

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.

potsky commented 8 years ago

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 ?

adriandmitroca commented 8 years ago

Hey,

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

potsky commented 7 years ago

Will be fixed in the next release.