From 233da2829b70bba074ddcd22001e922434d3e849 Mon Sep 17 00:00:00 2001 From: BlackEagle Date: Mon, 16 Nov 2015 17:19:55 +0100 Subject: [PATCH] Make email subject translatable When the email templates are being processed the template subject is not translatable because the translation happens within the filters via 'trans'. We must add the translated subject before the processor since there the variables used in the subject will be replaced and thus no longer be generic for translation. Signed-off-by: BlackEagle --- app/code/Magento/Email/Model/Template.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Email/Model/Template.php b/app/code/Magento/Email/Model/Template.php index aa7ec0302f419..f688cc5717465 100644 --- a/app/code/Magento/Email/Model/Template.php +++ b/app/code/Magento/Email/Model/Template.php @@ -244,7 +244,7 @@ public function getProcessedTemplateSubject(array $variables) $this->applyDesignConfig(); $storeId = $this->getDesignConfig()->getStore(); try { - $processedResult = $processor->setStoreId($storeId)->filter($this->getTemplateSubject()); + $processedResult = $processor->setStoreId($storeId)->filter(__($this->getTemplateSubject())); } catch (\Exception $e) { $this->cancelDesignConfig(); throw new \Magento\Framework\Exception\MailException(__($e->getMessage()), $e);