From 1409df5205a40843f22f646270ce58c4142e79b2 Mon Sep 17 00:00:00 2001 From: Graham Eames Date: Wed, 14 Jun 2006 21:04:04 +0000 Subject: [PATCH] Improved i18n of default date format on new installs + misc bug fixes git-svn-id: file:///svn/phpbb/trunk@6066 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/install/index.php | 2 +- phpBB/install/install_install.php | 12 ++++++++---- phpBB/language/en/common.php | 4 ++++ phpBB/language/en/install.php | 4 ++++ 4 files changed, 17 insertions(+), 5 deletions(-) diff --git a/phpBB/install/index.php b/phpBB/install/index.php index c6aa392f0f..a71d6c9da5 100755 --- a/phpBB/install/index.php +++ b/phpBB/install/index.php @@ -102,7 +102,7 @@ include($phpbb_root_path . 'includes/auth.' . $phpEx); include($phpbb_root_path . 'includes/session.'.$phpEx); include($phpbb_root_path . 'includes/template.'.$phpEx); include($phpbb_root_path . 'includes/acm/acm_file.'.$phpEx); -include($phpbb_root_path . 'includes/acm/acm_main.'.$phpEx); +include($phpbb_root_path . 'includes/cache.'.$phpEx); include($phpbb_root_path . 'includes/functions_admin.'.$phpEx); // Try and load an appropriate language if required diff --git a/phpBB/install/install_install.php b/phpBB/install/install_install.php index 6572efbf70..486e89b233 100755 --- a/phpBB/install/install_install.php +++ b/phpBB/install/install_install.php @@ -1034,6 +1034,10 @@ class install_install extends module SET config_value = '" . $db->sql_escape($cookie_domain) . "' WHERE config_name = 'cookie_domain'", + 'UPDATE ' . $table_prefix . "config + SET config_value = '" . $db->sql_escape($lang['default_dateformat']) . "' + WHERE config_name = 'default_dateformat'", + 'UPDATE ' . $table_prefix . "config SET config_value = '" . $db->sql_escape($email_enable) . "' WHERE config_name = 'email_enable'", @@ -1083,7 +1087,7 @@ class install_install extends module WHERE config_name = 'newest_username'", 'UPDATE ' . $table_prefix . "users - SET username = '" . $db->sql_escape($admin_name) . "', user_password='" . $db->sql_escape(md5($admin_pass1)) . "', user_lang = '" . $db->sql_escape($language) . "', user_email='" . $db->sql_escape($board_email1) . "' + SET username = '" . $db->sql_escape($admin_name) . "', user_password='" . $db->sql_escape(md5($admin_pass1)) . "', user_lang = '" . $db->sql_escape($language) . "', user_email='" . $db->sql_escape($board_email1) . "', user_dateformat='" . $db->sql_escape($lang['default_dateformat']) . "' WHERE username = 'Admin'", 'UPDATE ' . $table_prefix . "moderator_cache @@ -1341,7 +1345,7 @@ class install_install extends module */ function add_bots($mode, $sub) { - global $db, $phpbb_root_path, $phpEx; + global $db, $lang, $phpbb_root_path, $phpEx; // Obtain any submitted data foreach ($this->request_vars as $var) @@ -1379,7 +1383,7 @@ class install_install extends module 'user_email' => '', 'user_lang' => $language, 'user_style' => 1, - 'user_dateformat' => 'D M d, Y g:i a', + 'user_dateformat' => $lang['default_dateformat'], ); $user_id = user_add($user_row); @@ -1387,7 +1391,7 @@ class install_install extends module if (!$user_id) { // If we can't insert this user then continue to the next one to avoid inconsistant data - $this->p_master->db_error('Unable to insert bot into users table', $sql, __LINE__, __FILE__, true); + $this->p_master->db_error('Unable to insert bot into users table', $db->sql_error_sql, __LINE__, __FILE__, true); continue; } diff --git a/phpBB/language/en/common.php b/phpBB/language/en/common.php index 7f2f46f1b5..6b39a74aa0 100644 --- a/phpBB/language/en/common.php +++ b/phpBB/language/en/common.php @@ -712,6 +712,10 @@ $lang = array_merge($lang, array( 'F j, Y, g:i a' => 'January 10, 2005, 5:57 pm' ), + // The default dateformat which will be used on new installs in this language + // Translators should change this if a the usual date format is different + 'default_dateformat' => 'D M d, Y g:i a', // Mon Jan 10, 2005 5:57 pm + )); ?> \ No newline at end of file diff --git a/phpBB/language/en/install.php b/phpBB/language/en/install.php index 1304938b72..f23fc1824b 100755 --- a/phpBB/language/en/install.php +++ b/phpBB/language/en/install.php @@ -85,6 +85,7 @@ $lang = array_merge($lang, array( 'DEFAULT_PREFIX_IS' => 'The default table prefix for %1$s is %2$s', 'DEV_NO_TEST_FILE' => 'No value has been specified for the test_file variable in the convertor. If you are a user of this convertor, you should not be seeing this error, please report this message to the convertor author. If you are a convertor author, you must specify the name of a file which exists in the source forum to allow the path to it to be verified.', 'DIRECTORIES_AND_FILES' => 'Directory and file setup', + 'DISABLE_KEYS' => 'Disabling keys', 'DLL_FIREBIRD' => 'Firebird 1.5+', 'DLL_FTP' => 'Remote FTP support [ Installation ]', 'DLL_MBSTRING' => 'Multi-byte character support', @@ -103,6 +104,8 @@ $lang = array_merge($lang, array( 'DL_DOWNLOAD' => 'Download', 'DONE' => 'Done', + 'ENABLE_KEYS' => 'Re-enabling keys. This can take a while', + 'FILES_OPTIONAL' => 'Optional Files and Directories', 'FILES_OPTIONAL_EXPLAIN' => 'Optional - These files, directories or permissions are not required. The installation routines will attempt to use various techniques to complete if they do not exist or cannot be written to. However, the presence of these files, directories or permissions will speed installation.', 'FILES_REQUIRED' => 'Files and Directories', @@ -158,6 +161,7 @@ $lang = array_merge($lang, array( 'INST_ERR_PASSWORD_TOO_LONG' => 'The password you entered is too long. The maximum length is 30 characters.', 'INST_ERR_PASSWORD_TOO_SHORT' => 'The password you entered is too short. The minimum length is 6 characters.', 'INST_ERR_PREFIX' => 'Tables with the specified prefix already exist, please choose an alternative.', + 'INVALID_PRIMARY_KEY' => 'Invalid primary key : %s', 'MAKE_FOLDER_WRITABLE' => 'Please make sure that this folder exists and is writable by the webserver then try again:
»%s', 'MAKE_FOLDERS_WRITABLE' => 'Please make sure that these folders exist and are writable by the webserver then try again:
»%s',