Its great that taxonomy:all terms field is translated in this latest dev. But i see that if i have summary in arguments that all the terms are still in default language. Hope this is fixed soon? :-)

Comments

Marko B’s picture

This way it works. I made preprocess in template.php


function fusion_core_preprocess_views_view_summary_unformatted(&$vars) {
  $view     = $vars['view'];
  $argument = $view->argument[$view->build_info['summary_level']];
  $vars['classes'] = array();

  $url_options = array();

  if (!empty($view->exposed_raw_input)) {
    $url_options['query'] = $view->exposed_raw_input;
  }

  $count = 0;
  foreach ($vars['rows'] as $id => $row) {
    // only false on first time:
    if ($count++) {
      $vars['rows'][$id]->separator = filter_xss_admin($vars['options']['separator']);
    }
    $vars['rows'][$id]->link = $argument->summary_name($row);

	
	if ($vars['rows'][$id]->term_node_tid){
		$vars['rows'][$id]->link = tt('taxonomy:term:'.  $argument->summary_argument($row) .':name', $argument->summary_name($row));
	}
	else{
		$vars['rows'][$id]->link = $argument->summary_name($row);	
	}


    $args = $view->args;
    $args[$argument->position] = $argument->summary_argument($row);
	dpm($args);	
    $vars['rows'][$id]->url = url($view->get_url($args), $url_options);
    $vars['rows'][$id]->count = intval($row->{$argument->count_alias});
    if ($vars['rows'][$id]->url == base_path() . $_GET['q'] || $vars['rows'][$id]->url == base_path() . drupal_get_path_alias($_GET['q'])) {
      $vars['classes'][$id] = 'active';
    }
  }
}

 $vars['rows'][$id]->link = $argument->summary_name($row);
<code>
is replaced by code down, there is IF  in it because we use TT only if this is taxonomy term, if not then we use normal output.

if ($vars['rows'][$id]->term_node_tid){
$vars['rows'][$id]->link = tt('taxonomy:term:'. $argument->summary_argument($row) .':name', $argument->summary_name($row));
}
else{
$vars['rows'][$id]->link = $argument->summary_name($row);
}