1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2026-01-03 23:42:28 +03:00

Locales: More use of locale objects, Addressed failing tests

This commit is contained in:
Dan Brown
2023-09-17 16:20:21 +01:00
parent ac9a65945f
commit 8994c1b9d9
17 changed files with 92 additions and 66 deletions

View File

@@ -16,12 +16,12 @@ class UserInviteNotification extends MailNotification
public function toMail(User $notifiable): MailMessage
{
$appName = ['appName' => setting('app-name')];
$language = $notifiable->getLanguage();
$locale = $notifiable->getLocale();
return $this->newMailMessage($language)
->subject(trans('auth.user_invite_email_subject', $appName, $language))
->greeting(trans('auth.user_invite_email_greeting', $appName, $language))
->line(trans('auth.user_invite_email_text', [], $language))
->action(trans('auth.user_invite_email_action', [], $language), url('/register/invite/' . $this->token));
return $this->newMailMessage($locale)
->subject($locale->trans('auth.user_invite_email_subject', $appName))
->greeting($locale->trans('auth.user_invite_email_greeting', $appName))
->line($locale->trans('auth.user_invite_email_text'))
->action($locale->trans('auth.user_invite_email_action'), url('/register/invite/' . $this->token));
}
}