diff --git a/locale/en.yml b/locale/en.yml index 5a143e8..495c28d 100644 --- a/locale/en.yml +++ b/locale/en.yml @@ -49,6 +49,7 @@ flarum-suspend: # Translations in this namespace are used by suspension email notifications email: + no_reason_given: No reason was given for this suspension. suspended: subject: Your account has been suspended body: | diff --git a/views/emails/suspended.blade.php b/views/emails/suspended.blade.php index b25aa52..924733e 100644 --- a/views/emails/suspended.blade.php +++ b/views/emails/suspended.blade.php @@ -1,4 +1,4 @@ {!! $translator->trans('flarum-suspend.email.suspended.body', [ '{recipient_display_name}' => $user->display_name, -'{suspension_message}' => $blueprint->user->suspend_message, +'{suspension_message}' => $blueprint->user->suspend_message ?? $translator->trans('flarum-suspend.email.no_reason_given'), ]) !!}