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

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

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

revision 1.6.2.12, Sat Aug 29 21:08:24 2009 UTC revision 1.6.2.13, Tue Nov 3 17:53:24 2009 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: i18nprofile.module,v 1.6.2.11 2009/08/04 16:01:18 neochief Exp $  // $Id: i18nprofile.module,v 1.6.2.12 2009/08/29 21:08:24 hass Exp $
3    
4  /**  /**
5   * @file   * @file
# Line 33  function i18nprofile_locale($op = 'group Line 33  function i18nprofile_locale($op = 'group
33    switch ($op) {    switch ($op) {
34      case 'groups':      case 'groups':
35        return array('profile' => t('Profile'));        return array('profile' => t('Profile'));
36        case 'info':
37      case 'refresh':        $info['profile']['refresh callback'] = 'i18nprofile_locale_refresh';
38        if ($group == 'profile') {        return $info;
         return i18nprofile_locale_refresh();  
       }  
39    }    }
40  }  }
41    
# Line 56  function i18nprofile_locale_refresh() { Line 54  function i18nprofile_locale_refresh() {
54        $categories[$field->category] = 1;        $categories[$field->category] = 1;
55      }      }
56    }    }
57      return TRUE; // Meaning it completed with no issues
58  }  }
59    
60  /**  /**
# Line 191  function i18nprofile_form_translate_fiel Line 190  function i18nprofile_form_translate_fiel
190    if (!empty($form[$field]['#title'])) {    if (!empty($form[$field]['#title'])) {
191      $form[$field]['#title'] = tt("profile:field:$field:title", $form[$field]['#title']);      $form[$field]['#title'] = tt("profile:field:$field:title", $form[$field]['#title']);
192    }    }
193      elseif (!empty($form[$field]['#value'])) {
194        // Special treating for checboxes.
195        $field_type = db_result(db_query("SELECT type FROM {profile_fields} WHERE name = '%s'", $field));
196        if ($field_type == 'checkbox') {
197          $form[$field]['#value'] = tt("profile:field:$field:title", $form[$field]['#value']);
198        }
199      }
200    
201    if (!empty($form[$field]['#description'])) {    if (!empty($form[$field]['#description'])) {
202      $form[$field]['#description'] = tt("profile:field:$field:description", $form[$field]['#description']);      $form[$field]['#description'] = tt("profile:field:$field:description", $form[$field]['#description']);
203    }    }

Legend:
Removed from v.1.6.2.12  
changed lines
  Added in v.1.6.2.13

  ViewVC Help
Powered by ViewVC 1.1.2