public static function normalizeTransValue($text, $parameters = null)
    {
        if (is_string($text) && !empty($text)) {
            $text = ['label' => $text];
        }
        if (!empty($parameters) && is_array($text) && !isset($text['parameters'])) {
            $text['parameters'] = $parameters;
        }

        return $text;
    }
public static function normalizeTransValue($text, $parameters = null)
    {
        if (is_string($text) && !empty($text)) {
            $text = ['label' => $text];
        }
        if (!empty($parameters) && is_array($text) && !isset($text['parameters'])) {
            $text['parameters'] = $parameters;
        }

        return $text;
    }
public static function normalizeTransValue ( $ text , $ parameters = null ) { if ( is_string ( $ text ) && ! empty ( $ text ) ) { $ text = [ 'label' => $ text ] ; } if ( ! empty ( $ parameters ) && is_array ( $ text ) && ! isset ( $ text [ 'parameters' ] ) ) { $ text [ 'parameters' ] = $ parameters ; } return $ text ; }
Normalizes the given value to the format that can be translated by a renderer.

@param string|array $text       The text to be translated
@param array|null   $parameters The parameters

@return array
Normalizes the given value to the format that can be translated by a renderer .