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
This commit is contained in:
Graham Eames 2006-06-14 21:04:04 +00:00
parent fc5e04b669
commit 1409df5205
4 changed files with 17 additions and 5 deletions

View file

@ -102,7 +102,7 @@ include($phpbb_root_path . 'includes/auth.' . $phpEx);
include($phpbb_root_path . 'includes/session.'.$phpEx); include($phpbb_root_path . 'includes/session.'.$phpEx);
include($phpbb_root_path . 'includes/template.'.$phpEx); include($phpbb_root_path . 'includes/template.'.$phpEx);
include($phpbb_root_path . 'includes/acm/acm_file.'.$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); include($phpbb_root_path . 'includes/functions_admin.'.$phpEx);
// Try and load an appropriate language if required // Try and load an appropriate language if required

View file

@ -1034,6 +1034,10 @@ class install_install extends module
SET config_value = '" . $db->sql_escape($cookie_domain) . "' SET config_value = '" . $db->sql_escape($cookie_domain) . "'
WHERE config_name = '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 'UPDATE ' . $table_prefix . "config
SET config_value = '" . $db->sql_escape($email_enable) . "' SET config_value = '" . $db->sql_escape($email_enable) . "'
WHERE config_name = 'email_enable'", WHERE config_name = 'email_enable'",
@ -1083,7 +1087,7 @@ class install_install extends module
WHERE config_name = 'newest_username'", WHERE config_name = 'newest_username'",
'UPDATE ' . $table_prefix . "users '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'", WHERE username = 'Admin'",
'UPDATE ' . $table_prefix . "moderator_cache 'UPDATE ' . $table_prefix . "moderator_cache
@ -1341,7 +1345,7 @@ class install_install extends module
*/ */
function add_bots($mode, $sub) function add_bots($mode, $sub)
{ {
global $db, $phpbb_root_path, $phpEx; global $db, $lang, $phpbb_root_path, $phpEx;
// Obtain any submitted data // Obtain any submitted data
foreach ($this->request_vars as $var) foreach ($this->request_vars as $var)
@ -1379,7 +1383,7 @@ class install_install extends module
'user_email' => '', 'user_email' => '',
'user_lang' => $language, 'user_lang' => $language,
'user_style' => 1, 'user_style' => 1,
'user_dateformat' => 'D M d, Y g:i a', 'user_dateformat' => $lang['default_dateformat'],
); );
$user_id = user_add($user_row); $user_id = user_add($user_row);
@ -1387,7 +1391,7 @@ class install_install extends module
if (!$user_id) if (!$user_id)
{ {
// If we can't insert this user then continue to the next one to avoid inconsistant data // 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; continue;
} }

View file

@ -712,6 +712,10 @@ $lang = array_merge($lang, array(
'F j, Y, g:i a' => 'January 10, 2005, 5:57 pm' '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
)); ));
?> ?>

View file

@ -85,6 +85,7 @@ $lang = array_merge($lang, array(
'DEFAULT_PREFIX_IS' => 'The default table prefix for %1$s is <strong>%2$s</strong>', 'DEFAULT_PREFIX_IS' => 'The default table prefix for %1$s is <strong>%2$s</strong>',
'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.', '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', 'DIRECTORIES_AND_FILES' => 'Directory and file setup',
'DISABLE_KEYS' => 'Disabling keys',
'DLL_FIREBIRD' => 'Firebird 1.5+', 'DLL_FIREBIRD' => 'Firebird 1.5+',
'DLL_FTP' => 'Remote FTP support [ Installation ]', 'DLL_FTP' => 'Remote FTP support [ Installation ]',
'DLL_MBSTRING' => 'Multi-byte character support', 'DLL_MBSTRING' => 'Multi-byte character support',
@ -103,6 +104,8 @@ $lang = array_merge($lang, array(
'DL_DOWNLOAD' => 'Download', 'DL_DOWNLOAD' => 'Download',
'DONE' => 'Done', 'DONE' => 'Done',
'ENABLE_KEYS' => 'Re-enabling keys. This can take a while',
'FILES_OPTIONAL' => 'Optional Files and Directories', 'FILES_OPTIONAL' => 'Optional Files and Directories',
'FILES_OPTIONAL_EXPLAIN' => '<strong>Optional</strong> - 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_OPTIONAL_EXPLAIN' => '<strong>Optional</strong> - 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', '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_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_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.', '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:<br />&#187;<b>%s</b>', 'MAKE_FOLDER_WRITABLE' => 'Please make sure that this folder exists and is writable by the webserver then try again:<br />&#187;<b>%s</b>',
'MAKE_FOLDERS_WRITABLE' => 'Please make sure that these folders exist and are writable by the webserver then try again:<br />&#187;<b>%s</b>', 'MAKE_FOLDERS_WRITABLE' => 'Please make sure that these folders exist and are writable by the webserver then try again:<br />&#187;<b>%s</b>',