Glebsky / laravel-lang-generator

Searches for multilingual phrases in Laravel project and automatically generates language files for you.
16 stars 5 forks source link

Added Append parameter and updated REGEX to support parameters in translation. #6

Closed MarcSollie closed 5 months ago

MarcSollie commented 10 months ago

Added the --append parameter, only usable with the JSON type. This causes newfound translations to be put at the end of the JSON file, instead of just where it was found. It can be useful for automatisation purposes.

Also updated the regex in use to support parameters in translation strings, like the laravel docs example: echo __('messages.welcome', ['name' => 'dayle']);

MarcSollie commented 10 months ago

I also fixed the styleci errors, so it can also be made a new release if needed.

MarcSollie commented 5 months ago

Great, thanks!