<commit_before><?php
namespace FeTranslator\View\Helper;

use Zend\I18n\Translator\Translator;

/**
 * @category    FeTranslator
 * @package     View
 * @subpackage  Helper
 */
class Translate extends \Zend\I18n\View\Helper\AbstractTranslatorHelper
{
    /**
     * Constructor
     *
     * @param Translator $translator
     */
    public function __construct(Translator $translator)
    {
        $this->setTranslator($translator);
    }

    /**
     * Translate a message
     *
     * @param string      $message
     * @param string|null $namespace
     * @param string|null $locale
     * @return string
     */
    public function __invoke($message, $namespace = null, $locale = null)
    {
        $namespace = $namespace ?: $this->getTranslatorTextDomain();
        return $this->getTranslator()->translate($message, $namespace, $locale);
    }
}<commit_msg>Becuase zf2 changes classes and interfaces public and protected stuff in minor relases here is a hotfix<commit_after><?php
namespace FeTranslator\View\Helper;

use Zend\I18n\Translator\Translator;
use Zend\ServiceManager\ServiceLocatorAwareInterface;
use Zend\ServiceManager\ServiceLocatorInterface;

/**
 * @category    FeTranslator
 * @package     View
 * @subpackage  Helper
 */
class Translate extends \Zend\I18n\View\Helper\AbstractTranslatorHelper implements
    ServiceLocatorAwareInterface
{
    /**
     * @var ServiceLocatorInterface
     */
    protected $serviceLocator;

    /**
     * Constructor
     *
     * @param Translator $translator
     */
    public function __construct(Translator $translator)
    {
        $this->setTranslator($translator);
    }

    /**
     * Get the translator
     * @return Translator
     */
    public function getTranslator()
    {
        return $this->getServiceLocator()->getServiceLocator()->get('FeTranslator\Translator');
    }

    /**
     * Translate a message
     *
     * @param string      $message
     * @param string|null $namespace
     * @param string|null $locale
     * @return string
     */
    public function __invoke($message, $namespace = null, $locale = null)
    {
        $namespace = $namespace ?: $this->getTranslatorTextDomain();
        return $this->getTranslator()->translate($message, $namespace, $locale);
    }

    /**
     * Get the service locator
     * @return ServiceLocatorInterface
     */
    public function getServiceLocator()
    {
        return $this->serviceLocator;
    }

    /**
     * Set the service locator
     * @param  ServiceLocatorInterface $serviceLocator
     * @return Translate
     */
    public function setServiceLocator(
        ServiceLocatorInterface $serviceLocator
    ) {
        $this->serviceLocator = $serviceLocator;
        return $this;
    }
}
{'fraction_non_alphanumeric': 0.10985813022917425, 'fraction_numerical': 0.00327391778828665, 'mean_word_length': 2.751705320600273, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 16, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4321454', 'n_tokens_mistral': 819, 'n_tokens_neox': 798, 'n_words': 169}