From f3bcc1bf4efbd5a04a667e1bc193ad858d9e0c31 Mon Sep 17 00:00:00 2001 From: Vinicius Rodrigues Pereira Date: Fri, 15 Mar 2024 11:50:35 -0300 Subject: [PATCH] Changed placeholder from % to @ for email subject --- .../src/Plugin/EmailBuilder/ActivitySendEmailBuilder.php | 4 ++-- .../src/Form/SocialEventManagersAddEnrolleeForm.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/custom/activity_send/modules/activity_send_email/src/Plugin/EmailBuilder/ActivitySendEmailBuilder.php b/modules/custom/activity_send/modules/activity_send_email/src/Plugin/EmailBuilder/ActivitySendEmailBuilder.php index b270b36b8bb..69b3ba71594 100644 --- a/modules/custom/activity_send/modules/activity_send_email/src/Plugin/EmailBuilder/ActivitySendEmailBuilder.php +++ b/modules/custom/activity_send/modules/activity_send_email/src/Plugin/EmailBuilder/ActivitySendEmailBuilder.php @@ -70,8 +70,8 @@ public function preRender(EmailInterface $email): void { } else { $site_name = $this->configFactory->get('system.site')->get('name'); - $email->setSubject($this->t('Notification from %site_name', [ - '%site_name' => $site_name, + $email->setSubject($this->t('Notification from @site_name', [ + '@site_name' => $site_name, ], [ 'langcode' => $email->getLangcode(), ])); diff --git a/modules/social_features/social_event/modules/social_event_managers/src/Form/SocialEventManagersAddEnrolleeForm.php b/modules/social_features/social_event/modules/social_event_managers/src/Form/SocialEventManagersAddEnrolleeForm.php index 1ccac0f8de0..b13bb64259f 100644 --- a/modules/social_features/social_event/modules/social_event_managers/src/Form/SocialEventManagersAddEnrolleeForm.php +++ b/modules/social_features/social_event/modules/social_event_managers/src/Form/SocialEventManagersAddEnrolleeForm.php @@ -221,7 +221,7 @@ public function buildForm(array $form, FormStateInterface $form_state) { ]; $variables = [ - '%site_name' => \Drupal::config('system.site')->get('name'), + '@site_name' => \Drupal::config('system.site')->get('name'), ]; // Load event invite configuration. @@ -281,7 +281,7 @@ public function buildForm(array $form, FormStateInterface $form_state) { '#theme' => 'invite_email_preview', '#title' => $this->t('Message'), '#logo' => $logo, - '#subject' => $this->t('Notification from %site_name', $variables), + '#subject' => $this->t('Notification from @site_name', $variables), '#body' => $body, '#helper' => $this->token->replace($invite_config->get('invite_helper'), $params), ];