original_string: 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;
      }
code: 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;
      }
code_tokens: 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 ; }
docstring: 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
docstring_tokens: Normalizes the given value to the format that can be translated by a renderer .