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

Catch also translation strings with parameters #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ManuDoni
Copy link

@ManuDoni ManuDoni commented Oct 5, 2022

  • Catch also translation strings with parameters
  • Fix: catch also white spaces or line breaks outside the translation string

I changed the regex to catch translation string with parameters like this: __('Hello :user_name', ['user_name' => $user->name]) and even this weird one:

__(
    'Hello :user_name'
    , // I deliberately put this comma here
    ['user_name' => $user->name]
)

* Catch also translation strings with parameters
* Fix: catch also white spaces or line breaks outside the translation string

I changed the regex to catch translation string with parameters like this: `__('Hello :user_name', ['user_name' => $user->name])` and even this weird one:
```
__(
    'Hello :user_name'
    , // I deliberately put this comma here
    ['user_name' => $user->name]
)
```
@ManuDoni
Copy link
Author

ManuDoni commented Oct 5, 2022

I can also confirm that this package works for laravel 9

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

Successfully merging this pull request may close these issues.

1 participant