You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Laravel can define translation string in lang/your_lang.json files. This makes easy for your app to support multi language.
While I'm using this feature to translate Laravel Breeze's VerifyEmail and ResetPassword email message, I noticed there is an unwanted comma included. I'm Japanese so the email message looks like this 👇 and there is the comma.
I checked Laravel's source code and found that the default mail template contains this comma outside of @lang directive.
If this is like @lang('Regards,')<br> instead of @lang('Regards'),<br> then every translation works fine and you can put any comma you want or just remove them totally based on your language preference.
But if we change this line of code, those other languages which currently relying on a translation file like Regards to Cordialement might loose the comma at the end of this sentence.
Thus this is a breaking change to consider.
If Laravel 10.x includes this fix and remarks it in upgrade document, it'll be fantastic, I guess.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Howdy, all Artisans!
Laravel can define translation string in
lang/your_lang.json
files. This makes easy for your app to support multi language.While I'm using this feature to translate Laravel Breeze's
VerifyEmail
andResetPassword
email message, I noticed there is an unwanted comma included. I'm Japanese so the email message looks like this 👇 and there is the comma.I checked Laravel's source code and found that the default mail template contains this comma outside of
@lang
directive.framework/src/Illuminate/Notifications/resources/views/email.blade.php
Line 42 in ec3958d
If this is like
@lang('Regards,')<br>
instead of@lang('Regards'),<br>
then every translation works fine and you can put any comma you want or just remove them totally based on your language preference.But if we change this line of code, those other languages which currently relying on a translation file like
Regards
toCordialement
might loose the comma at the end of this sentence.Thus this is a breaking change to consider.
If Laravel 10.x includes this fix and remarks it in upgrade document, it'll be fantastic, I guess.
What do you think?
Beta Was this translation helpful? Give feedback.
All reactions