Changeset 1877 in ExiteCMS


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

updated the translation module to work with the new default_locale setting

Location:
trunk
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/administration/tools/language_pack_English.php

    r1875 r1877  
    37463746if (!defined('LP_COUNTRIES')) define('LP_COUNTRIES', "us|gb|ca|au|nz|in|za|ir|mt|hk|pr"); 
    37473747if (!defined('LP_VERSION')) define('LP_VERSION', "7.20"); 
    3748 if (!defined('LP_DATE')) define('LP_DATE', "1224413129"); 
     3748if (!defined('LP_DATE')) define('LP_DATE', "1224427994"); 
    37493749$lp_date = LP_DATE; 
    37503750 
     
    38493849        // check if this language pack has been installed 
    38503850        $variables['can_install'] = dbcount("(*)", "locale", "locale_code = '".LP_LOCALE."'") == 0; 
    3851         $variables['can_remove'] = LP_LOCALE != "en" && $variables['can_install'] == false; 
     3851        $variables['can_remove'] = LP_LOCALE != $settings['default_locale'] && $variables['can_install'] == false; 
    38523852        $variables['can_upgrade'] = $variables['can_install'] == false && $variables['last_update'] < LP_DATE; 
    38533853     
  • trunk/administration/tools/language_pack_Nederlands.php

    r1875 r1877  
    37463746if (!defined('LP_COUNTRIES')) define('LP_COUNTRIES', "nl|be|sr|aw|an"); 
    37473747if (!defined('LP_VERSION')) define('LP_VERSION', "7.20"); 
    3748 if (!defined('LP_DATE')) define('LP_DATE', "1224413132"); 
     3748if (!defined('LP_DATE')) define('LP_DATE', "1224427997"); 
    37493749$lp_date = LP_DATE; 
    37503750 
     
    38493849        // check if this language pack has been installed 
    38503850        $variables['can_install'] = dbcount("(*)", "locale", "locale_code = '".LP_LOCALE."'") == 0; 
    3851         $variables['can_remove'] = LP_LOCALE != "en" && $variables['can_install'] == false; 
     3851        $variables['can_remove'] = LP_LOCALE != $settings['default_locale'] && $variables['can_install'] == false; 
    38523852        $variables['can_upgrade'] = $variables['can_install'] == false && $variables['last_update'] < LP_DATE; 
    38533853     
  • trunk/administration/tools/templates/admin.tools.languagepack.tpl

    r1871 r1877  
    6161                </td> 
    6262            </tr> 
     63            {if $last_update} 
    6364            <tr> 
    6465                <td class='tbl' width='50%' align='right'> 
     
    6970                </td> 
    7071            </tr> 
     72            {/if} 
    7173            {if $smarty.const.LP_VERSION != $settings.version} 
    7274            <tr> 
  • trunk/files/locales/en.main.global.php

    r1871 r1877  
    33// locale       : English 
    44// locale name  : main.global 
    5 // generated on : Sun Oct 19 2008, 11:35:26 CEST 
     5// generated on : Sun Oct 19 2008, 16:53:05 CEST 
    66// translators  : ExiteCMS team,WanWizard 
    77// ---------------------------------------------------------- 
  • trunk/files/locales/en.main.setup.php

    r1871 r1877  
    33// locale       : English 
    44// locale name  : main.setup 
    5 // generated on : Sun Oct 19 2008, 11:35:14 CEST 
     5// generated on : Sun Oct 19 2008, 16:53:14 CEST 
    66// translators  : ExiteCMS team,WanWizard 
    77// ---------------------------------------------------------- 
  • trunk/files/locales/nl.main.global.php

    r1871 r1877  
    33// locale       : English 
    44// locale name  : main.global 
    5 // generated on : Sun Oct 19 2008, 11:35:17 CEST 
     5// generated on : Sun Oct 19 2008, 16:53:17 CEST 
    66// translators  : ExiteCMS team,WanWizard 
    77// ---------------------------------------------------------- 
  • trunk/files/locales/nl.main.setup.php

    r1871 r1877  
    33// locale       : English 
    44// locale name  : main.setup 
    5 // generated on : Sun Oct 19 2008, 11:35:17 CEST 
     5// generated on : Sun Oct 19 2008, 16:53:17 CEST 
    66// translators  : ExiteCMS team,WanWizard 
    77// ---------------------------------------------------------- 
  • trunk/setup.php

    r1875 r1877  
    392392            $result = dbquery("UPDATE ".$db_prefix."configuration SET cfg_value = '".$username."' WHERE cfg_name = ''siteusername"); 
    393393            $result = dbquery("UPDATE ".$db_prefix."configuration SET cfg_value = '".$localeset."' WHERE cfg_name = 'locale'"); 
    394             $result = dbquery("UPDATE ".$db_prefix."configuration SET cfg_value = '".LP_CHARSET."' WHERE cfg_name = 'default_locale'"); 
     394            $result = dbquery("UPDATE ".$db_prefix."configuration SET cfg_value = '".LP_LOCALE."' WHERE cfg_name = 'default_locale'"); 
    395395  
    396396            // create the admin rights field for the webmaster, based on all admin modules available 
     
    403403            // add the webmaster to the users table 
    404404            $commands = array(); 
    405             $commands[] = array('type' => 'db', 'value' => "INSERT INTO ##PREFIX##users (user_name, user_password, user_webmaster, user_email, user_hide_email, user_location, user_birthdate, user_aim, user_icq, user_msn, user_yahoo, user_web, user_forum_fullscreen, user_theme, user_locale, user_offset, user_avatar, user_sig, user_posts, user_joined, user_lastvisit, user_ip, user_rights, user_groups, user_level, user_status) VALUES ('$username', '$password', '1', '$email', '1', '', '0000-00-00', '', '', '', '', '', '0', 'Default', '".LP_CHARSET."', '0', '', '', '0', '".time()."', '0', '0.0.0.0', '".$adminrights."', '', '103', '0')"); 
     405            $commands[] = array('type' => 'db', 'value' => "INSERT INTO ##PREFIX##users (user_name, user_password, user_webmaster, user_email, user_hide_email, user_location, user_birthdate, user_aim, user_icq, user_msn, user_yahoo, user_web, user_forum_fullscreen, user_theme, user_locale, user_offset, user_avatar, user_sig, user_posts, user_joined, user_lastvisit, user_ip, user_rights, user_groups, user_level, user_status) VALUES ('$username', '$password', '1', '$email', '1', '', '0000-00-00', '', '', '', '', '', '0', 'Default', '".LP_LOCALE."', '0', '', '', '0', '".time()."', '0', '0.0.0.0', '".$adminrights."', '', '103', '0')"); 
    406406            $result = dbcommands($commands, $db_prefix); 
    407407     
Note: See TracChangeset for help on using the changeset viewer.