Changeset 1876 in ExiteCMS


Ignore:
Timestamp:
10/19/08 16:49:42 (3 years ago)
Author:
hverton
Message:

updated the translation module to work with the new default_locale setting

Location:
modules/ExiteCMS/translations/php-files/modules/translations
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • modules/ExiteCMS/translations/php-files/modules/translations/admin.php

    r1835 r1876  
    265265        $data = dbarray($result); 
    266266        // check if we're not deleting the CMS default language 
    267         if ($data['locale_code'] == "en") { 
     267        if ($data['locale_code'] == $settings['default_locale']) { 
    268268            $message = sprintf($locale['910'], $data['locale_name']); 
    269269        } else { 
     
    354354    } 
    355355    $data['can_edit'] = true; 
    356     $data['can_delete'] = ($data['locale_code'] != "en"); 
     356    $data['can_delete'] = ($data['locale_code'] != $settings['default_locale']); 
    357357    $variables['localelist'][]  = $data; 
    358358} 
  • modules/ExiteCMS/translations/php-files/modules/translations/langpack.template

    r1869 r1876  
    146146 
    147147        // check the last update of the locale 
    148         $variables['last_update'] = isset($settings['LanguagePack.'.LP_LANGUAGE]) ? $settings['LanguagePack.'.LP_LANGUAGE] : dbfunction("MAX(locales_datestamp)", "locales", "locales_code = '".LP_LOCALE."' AND locales_name NOT LIKE 'modules%'"); 
     148        $variables['last_update'] = isset($settings['LanguagePack.'.LP_LANGUAGE]) ? $settings['LanguagePack.'.LP_LANGUAGE] : min(LP_DATE - 1, dbfunction("MAX(locales_datestamp)", "locales", "locales_code = '".LP_LOCALE."' AND locales_name NOT LIKE 'modules%'")); 
    149149         
    150150        // check if this language pack has been installed 
    151151        $variables['can_install'] = dbcount("(*)", "locale", "locale_code = '".LP_LOCALE."'") == 0; 
    152         $variables['can_remove'] = LP_LOCALE != "en" && $variables['can_install'] == false; 
     152        $variables['can_remove'] = LP_LOCALE != $settings['default_locale'] && $variables['can_install'] == false; 
    153153        $variables['can_upgrade'] = $variables['can_install'] == false && $variables['last_update'] < LP_DATE; 
    154154     
Note: See TracChangeset for help on using the changeset viewer.