protected static function injectTranslatorValue(TranslatorInterface $translator, TemplateInterface $template, $field): void
    {
        $setter = 'set'.ucfirst($field);
        $getter = 'get'.ucfirst($field);
        $refTpl = new \ReflectionClass($template);

        if ($refTpl->hasMethod($getter) && $refTpl->hasMethod($setter)) {
            $val = $template->{$getter}();

            if (null !== $val) {
                $template->{$setter}($translator->trans($val, [], $template->getTranslationDomain()));
            }
        }
    }