public function setLabels()
    {
        $template = $this->getTemplate();
        try {
            $labels = $template->getLabelMarkerNames();
        } catch (Exception $exception) {
            $labels = [];
        }

        foreach ($labels as $label) {
            $template->setMarker($label, $this->translate($label));
        }
    }