Processes the parameters array for use with t().
protected function processParameters(array $parameters) {
$return = array();
foreach ($parameters as $key => $value) {
if (is_object($value)) {
// t() does not work will objects being passed as replacement strings.
}
elseif (strpos($key, '{{ ') === 0 && strrpos($key, ' }}') == strlen($key) - 3) {
// Transform it into a Drupal pattern using the format %name.
$key = '%' . substr($key, 3, strlen($key) - 6);
$return[$key] = $value;
}
else {
$return[$key] = $value;
}
}
return $return;
}