src/Controller/UpdateController.php
private function createFlashTranslateMessage(string $message)
    {
        $translator = $this->get('translator');
        $isTranlateKey = $message !== $translated = $translator->trans($message, [], 'flashes');

        if ($isTranlateKey) {
            return $translated;
        }

        return ucwords(trim(preg_replace('/phpmob|\.|_/', ' ', $message)));
    }
private function createFlashTranslateMessage(string $message)
    {
        $translator = $this->get('translator');
        $isTranlateKey = $message !== $translated = $translator->trans($message, [], 'flashes');

        if ($isTranlateKey) {
            return $translated;
        }

        return ucwords(trim(preg_replace('/phpmob|\.|_/', ' ', $message)));
    }
@param string $message

@return string