src/Viserio/Component/Translation/Translator.php
public function trans(string $id, array $parameters = [], string $domain = 'messages'): string
    {
        if (\preg_match('/^(.*?)(\\[.*?\\])$/', $id, $match) === 1) {
            $id = $match[1];
        }

        $trans = $this->formatter->format(
            $this->catalogue->get($id, $domain),
            $this->locale,
            $parameters
        );
        // Add filter and helper back
        if (isset($match[2])) {
            $trans = $trans . $match[2];
        }

        $trans = $this->applyFilters($trans);
        $trans = $this->applyHelpers($trans);

        $this->log($id, $domain);
        $this->collectMessage($this->locale, $domain, $id, $trans, $parameters);

        return $trans;
    }
public function trans(string $id, array $parameters = [], string $domain = 'messages'): string
    {
        if (\preg_match('/^(.*?)(\\[.*?\\])$/', $id, $match) === 1) {
            $id = $match[1];
        }

        $trans = $this->formatter->format(
            $this->catalogue->get($id, $domain),
            $this->locale,
            $parameters
        );
        // Add filter and helper back
        if (isset($match[2])) {
            $trans = $trans . $match[2];
        }

        $trans = $this->applyFilters($trans);
        $trans = $this->applyHelpers($trans);

        $this->log($id, $domain);
        $this->collectMessage($this->locale, $domain, $id, $trans, $parameters);

        return $trans;
    }
{@inheritdoc}