src/View/EditMask.php
private function translateLabel($transString, $parameters = [])
    {
        $translator = $this->translator;
        if ($transString !== ($label =
                $translator->translate($transString, $this->definition->getName(), $parameters))) {
            return $label;
        }

        if ($transString !== ($label = $translator->translate('MSC.'.$transString, $parameters))
        ) {
            return $label;
        }

        // Fallback, just return the key as is it.
        return $transString;
    }
private function translateLabel($transString, $parameters = [])
    {
        $translator = $this->translator;
        if ($transString !== ($label =
                $translator->translate($transString, $this->definition->getName(), $parameters))) {
            return $label;
        }

        if ($transString !== ($label = $translator->translate('MSC.'.$transString, $parameters))
        ) {
            return $label;
        }

        // Fallback, just return the key as is it.
        return $transString;
    }
Get a translated label from the translator.

The fallback is as follows:
1. Try to translate via the data definition name as translation section.
2. Try to translate with the prefix 'MSC.'.
3. Return the input value as nothing worked out.

@param string $transString The non translated label for the button.

@param array  $parameters  The parameters to pass to the translator.

@return string