/[drupal]/contributions/modules/live_translation/live_translation.module
ViewVC logotype

Diff of /contributions/modules/live_translation/live_translation.module

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

revision 1.6, Sun Jun 7 03:11:21 2009 UTC revision 1.7, Sun Jun 7 03:33:33 2009 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: live_translation.module,v 1.5 2009/04/24 06:27:14 brmassa Exp $  // $Id: live_translation.module,v 1.6 2009/06/07 03:11:21 brmassa Exp $
3  /**  /**
4   * @author Bruno Massa   * @author Bruno Massa
5   * @file   * @file
# Line 61  function live_translation_perm() { Line 61  function live_translation_perm() {
61  }  }
62    
63  /**  /**
  * Implementation of hook_requirements().  
  */  
 function live_translation_requirements($phase) {  
   if ($phase == 'runtime') {  
     module_load_include('inc', 'live_translation');  
     $requirements['live_translation']['title']        = t('Translation updates');  
     switch (_live_translation_status(TRUE)) {  
       case LIVE_TRANSLATION_STATUS_OUTDATE:  
         $requirements['live_translation']['value']        = t('New translations available');  
         $requirements['live_translation']['severity']     = REQUIREMENT_ERROR;  
         $requirements['live_translation']['description']  = t('There are new strings translated on the translation servers. Go to !translation_status_page.', array('!translation_status_page' => l('translation status page', 'admin/reports/live-translation')));  
         break;  
       case LIVE_TRANSLATION_STATUS_UNKNOWN:  
         $requirements['live_translation']['value']        = t('No update data available');  
         $requirements['live_translation']['severity']     = REQUIREMENT_WARNING;  
         $requirements['live_translation']['description']  = t('There is a long time you do not check the translation status with the server. Configure cron or !check_it_now.', array('!check_it_now' => l('check it now', 'admin/reports/live-translation/update')));  
         break;  
       default:  
         $requirements['live_translation']['value']        = t('Up to date');  
     }  
     return $requirements;  
   }  
 }  
   
 /**  
64   * Implementation of hook_theme().   * Implementation of hook_theme().
65   */   */
66  function live_translation_theme() {  function live_translation_theme() {

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7

  ViewVC Help
Powered by ViewVC 1.1.2