| 1 |
<?php |
<?php |
| 2 |
// $Id: i18ntaxonomy.module,v 1.5.2.37 2009/11/03 10:46:25 jareyero Exp $ |
// $Id: i18ntaxonomy.module,v 1.5.2.38 2009/11/03 12:09:57 jareyero Exp $ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
* @file |
* @file |
| 126 |
switch ($op) { |
switch ($op) { |
| 127 |
case 'groups': |
case 'groups': |
| 128 |
return array('taxonomy' => t('Taxonomy')); |
return array('taxonomy' => t('Taxonomy')); |
| 129 |
|
case 'info': |
| 130 |
case 'refresh': |
$info['taxonomy']['refresh callback'] = 'i18ntaxonomy_locale_refresh'; |
| 131 |
if ($group == 'taxonomy') { |
return $info; |
|
return i18ntaxonomy_locale_refresh(); |
|
|
} |
|
| 132 |
} |
} |
| 133 |
} |
} |
| 134 |
|
|
| 137 |
*/ |
*/ |
| 138 |
function i18ntaxonomy_locale_refresh() { |
function i18ntaxonomy_locale_refresh() { |
| 139 |
foreach (taxonomy_get_vocabularies() as $vid => $vocabulary) { |
foreach (taxonomy_get_vocabularies() as $vid => $vocabulary) { |
| 140 |
if (i18ntaxonomy_vocabulary($vid) == I18N_TAXONOMY_LOCALIZE) { |
if (empty($vocabulary->language)) { |
| 141 |
tt("taxonomy:vocabulary:$vid:name", $vocabulary->name, NULL, TRUE); |
tt("taxonomy:vocabulary:$vid:name", $vocabulary->name, NULL, TRUE); |
| 142 |
if ($vocabulary->help) { |
if ($vocabulary->help) { |
| 143 |
tt("taxonomy:vocabulary:$vid:help", $vocabulary->help, NULL, TRUE); |
tt("taxonomy:vocabulary:$vid:help", $vocabulary->help, NULL, TRUE); |
| 144 |
} |
} |
| 145 |
|
} |
| 146 |
|
if (i18ntaxonomy_vocabulary($vid) == I18N_TAXONOMY_LOCALIZE) { |
| 147 |
foreach (taxonomy_get_tree($vid, 0) as $term) { |
foreach (taxonomy_get_tree($vid, 0) as $term) { |
| 148 |
tt("taxonomy:term:$term->tid:name", $term->name, NULL, TRUE); |
tt("taxonomy:term:$term->tid:name", $term->name, NULL, TRUE); |
| 149 |
if ($term->description) { |
if ($term->description) { |
| 152 |
} |
} |
| 153 |
} |
} |
| 154 |
} |
} |
| 155 |
|
return TRUE; // Meaning it completed with no issues |
| 156 |
} |
} |
| 157 |
|
|
| 158 |
/** |
/** |