-
-
Notifications
You must be signed in to change notification settings - Fork 495
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
[4.x] Replace __()
with Statamic\trans()
#9525
[4.x] Replace __()
with Statamic\trans()
#9525
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is very thorough, thank you.
But man is it ugly. 😆
Can we just add use
statements to the blade files so we can keep __
everywhere?
Like this:
@php use function Statamic\trans as __; @endphp |
Agreed, it's certainly not pretty. Although, I've just tried your suggestion in importing the I haven't committed those changes, since they didn't help. However, if you want to give it a test, here are the changes as a |
That patch (applied onto |
Oh, maybe I was doing something wrong then. I was going to the form show page. |
Yep, I still get there error. Turns out you need to add the import to |
This reverts commit 2cc5d4d.
…he-same-name # Conflicts: # resources/views/utilities/partials/email-l6.blade.php # resources/views/utilities/partials/email-l7.blade.php
Ah, that fixes it! Pushed it up. |
This pull request replaces the
__()
helper with theStatamic\trans()
helper, which should prevent issues when language files exist with the same name, eg:forms
oremail
.Fixes #7672.