--- sites/all/modules/ubercart-new/uc_catalog/uc_catalog.module 2010-09-09 04:18:23.000000000 +0200 +++ sites/all/modules/ubercart/uc_catalog/uc_catalog.module 2011-01-30 10:07:29.630744955 +0100 @@ -225,7 +225,11 @@ } $terms = taxonomy_node_get_terms_by_vocabulary($node, variable_get('uc_catalog_vid', 0)); if (count($terms)) { - $crumbs[] = l(variable_get('uc_catalog_name', t('Catalog')), variable_get('uc_catalog_url', 'catalog')); + $catalog_name = variable_get('uc_catalog_name', 'Catalog'); + $catalog_id = variable_get('uc_catalog_vid', '1'); + $translated_name = tt("taxonomy:vocabulary:$catalog_id:name", $catalog_name, NULL, FALSE); + $crumbs[] = l($translated_name, variable_get('uc_catalog_url', 'catalog')); + $used_tids = array(); foreach ($terms as $term) { if (!isset($parents[$term->tid])) { @@ -233,6 +237,11 @@ } //drupal_set_message('
'. print_r($parents[$term->tid], TRUE) .''); foreach (array_reverse($parents[$term->tid]) as $parent) { + $parent->name = tt("taxonomy:term:$parent->tid:name", $parent->name, NULL, FALSE); + if ($parent->description){ + $parent->description = tt("taxonomy:term:$parent->tid:description", $parent->description, NULL, FALSE); + } + if (!in_array($parent->tid, $used_tids)) { $crumbs[] = l($parent->name, uc_catalog_path($parent)); $used_tids[] = $parent->tid; @@ -431,6 +440,10 @@ // Now, create a structured menu, separate from Drupal's menu. $content = theme('uc_catalog_block', $menu_tree); + $catalog_name = variable_get('uc_catalog_name', 'Catalog'); + $catalog_id = variable_get('uc_catalog_vid', '1'); + $subject = tt("taxonomy:vocabulary:$catalog_id:name", $catalog_name, NULL, FALSE); + $subject = variable_get('uc_catalog_name', t('Catalog')); if (variable_get('uc_catalog_block_title', FALSE)) { $subject = l($subject, 'catalog'); @@ -805,7 +818,10 @@ $breadcrumbs[] = l(t('Home'), ''); } if ($tid != 0) { - $breadcrumbs[] = l(variable_get('uc_catalog_name', t('Catalog')), 'catalog'); + $catalog_name = variable_get('uc_catalog_name', 'Catalog'); + $catalog_id = variable_get('uc_catalog_vid', '1'); + $translated_name = tt("taxonomy:vocabulary:$catalog_id:name", $catalog_name, NULL, FALSE); + $breadcrumbs[] = l($translated_name, variable_get('uc_catalog_url', 'catalog')); } } $parents = taxonomy_get_parents_all($tid); @@ -853,6 +869,13 @@ static $breadcrumb; static $types; + if ($branch->tid) { + $branch->name = tt("taxonomy:term:$branch->tid:name", $branch->name, NULL, TRUE); + if ($branch->description) { + $branch->description = tt("taxonomy:term:$branch->tid:description", $branch->description, NULL, FALSE); + } + } + if (empty($types)) { $types = uc_product_types(); }