protected function getTranslatedMail($template, $type)
    {
        $mail = $this->loader->load($template, $type);

        return TranslationUtil::translateMail($mail, $this->getLocale(), $this->translator);
    }