/[drupal]/contributions/modules/i18n/i18ntaxonomy/i18ntaxonomy.module
ViewVC logotype

Diff of /contributions/modules/i18n/i18ntaxonomy/i18ntaxonomy.module

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.5.2.38, Tue Nov 3 12:09:57 2009 UTC revision 1.5.2.39, Tue Nov 3 17:53:24 2009 UTC
# Line 1  Line 1 
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
# Line 126  function i18ntaxonomy_locale($op = 'grou Line 126  function i18ntaxonomy_locale($op = 'grou
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    
# Line 139  function i18ntaxonomy_locale($op = 'grou Line 137  function i18ntaxonomy_locale($op = 'grou
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) {
# Line 152  function i18ntaxonomy_locale_refresh() { Line 152  function i18ntaxonomy_locale_refresh() {
152        }        }
153      }      }
154    }    }
155      return TRUE; // Meaning it completed with no issues
156  }  }
157    
158  /**  /**

Legend:
Removed from v.1.5.2.38  
changed lines
  Added in v.1.5.2.39

  ViewVC Help
Powered by ViewVC 1.1.2