diff options
author | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-10-06 10:55:27 +0000 |
---|---|---|
committer | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-10-06 10:55:27 +0000 |
commit | a907805911bc678c6d3f5e0fb71c7189866b5e06 (patch) | |
tree | ceb0feb2cf00fb2289bad0e884f941ab429c64d9 /install | |
parent | d52ced80bcd6281b3bd22b5ee83edb818c2d72e2 (diff) | |
download | elgg-a907805911bc678c6d3f5e0fb71c7189866b5e06.tar.gz elgg-a907805911bc678c6d3f5e0fb71c7189866b5e06.tar.bz2 |
Pulled installation language strings out of core language file into installer
git-svn-id: http://code.elgg.org/elgg/trunk@7019 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'install')
-rw-r--r-- | install/ElggInstaller.php | 26 | ||||
-rw-r--r-- | install/languages/en.php | 122 |
2 files changed, 138 insertions, 10 deletions
diff --git a/install/ElggInstaller.php b/install/ElggInstaller.php index cf1a75258..a73dfc96c 100644 --- a/install/ElggInstaller.php +++ b/install/ElggInstaller.php @@ -42,6 +42,8 @@ class ElggInstaller { set_error_handler('__elgg_php_error_handler'); set_exception_handler('__elgg_php_exception_handler'); + + register_translations(dirname(__FILE__) . '/languages/', TRUE); } /** @@ -55,7 +57,8 @@ class ElggInstaller { $this->runModRewriteTest(); if (!in_array($step, $this->getSteps())) { - throw new InstallationException("$step is an unknown installation step."); + $msg = sprintf(elgg_echo('InstallationException:UnknownStep'), $step); + throw new InstallationException($msg); } $this->setInstallStatus(); @@ -452,7 +455,8 @@ class ElggInstaller { } if (!include_once("{$CONFIG->path}engine/lib/database.php")) { - throw new InstallationException("Could not load database.php"); + $msg = sprintf(elgg_echo('InstallationException:MissingLibrary'), 'database.php'); + throw new InstallationException($msg); } // check that the config table has been created @@ -604,7 +608,8 @@ class ElggInstaller { foreach ($lib_files as $file) { $path = $lib_dir . $file; if (!include_once($path)) { - throw new InstallationException("Could not load {$file}"); + $msg = sprintf(elgg_echo('InstallationException:MissingLibrary'), $file); + throw new InstallationException($msg); } } @@ -655,7 +660,8 @@ class ElggInstaller { global $CONFIG; if (!include_once("{$CONFIG->path}engine/settings.php")) { - throw new InstallationException("Elgg could not load the settings file. It does not exist or there is a permissions issue."); + $msg = elgg_echo('InstallationException:CannotLoadSettings'); + throw new InstallationException($msg); } } @@ -972,7 +978,7 @@ class ElggInstaller { foreach ($formVars as $field => $info) { if ($info['required'] == TRUE && !$submissionVars[$field]) { - $name = elgg_echo("installation:database:label:$field"); + $name = elgg_echo("install:database:label:$field"); register_error("$name is required"); return FALSE; } @@ -1112,7 +1118,7 @@ class ElggInstaller { foreach ($formVars as $field => $info) { if ($info['required'] == TRUE && !$submissionVars[$field]) { - $name = elgg_echo("installation:settings:label:$field"); + $name = elgg_echo("install:settings:label:$field"); register_error("$name is required"); return FALSE; } @@ -1225,19 +1231,19 @@ class ElggInstaller { foreach ($formVars as $field => $info) { if ($info['required'] == TRUE && !$submissionVars[$field]) { - $name = elgg_echo("installation:admin:label:$field"); + $name = elgg_echo("install:admin:label:$field"); register_error("$name is required"); return FALSE; } } if ($submissionVars['password1'] !== $submissionVars['password2']) { - register_error(elgg_echo('installation:admin:password:mismatch')); + register_error(elgg_echo('install:admin:password:mismatch')); return FALSE; } if (trim($submissionVars['password1']) == "") { - register_error(elgg_echo('installation:admin:password:empty')); + register_error(elgg_echo('install:admin:password:empty')); return FALSE; } @@ -1261,7 +1267,7 @@ class ElggInstaller { ); if (!$guid) { - register_error(elgg_echo('installation:admin:cannot_create')); + register_error(elgg_echo('install:admin:cannot_create')); return FALSE; } diff --git a/install/languages/en.php b/install/languages/en.php new file mode 100644 index 000000000..aadb89f0d --- /dev/null +++ b/install/languages/en.php @@ -0,0 +1,122 @@ +<?php +/** + * Installer English Language + * + * @package ElggLanguage + * @subpackage Installer + */ + +$english = array( + 'install:title' => 'Elgg Install', + 'install:welcome' => 'Welcome', + 'install:requirements' => 'Requirements check', + 'install:database' => 'Database installation', + 'install:settings' => 'Configure site', + 'install:admin' => 'Create admin account', + 'install:complete' => 'Finished', + + 'install:welcome:instructions' => "Installing Elgg has 6 simple steps and reading this welcome is the first one! + +If you haven't already, read through the installation instructions included with Elgg (or click the instructions link at the bottom of the page). + +If you are ready to proceed, click the Next button.", + 'install:requirements:instructions:success' => "Your server passed the requirement checks.", + 'install:requirements:instructions:failure' => "Your server failed the requirements check. After you have fixed the below issues, refresh this page.", + 'install:requirements:instructions:warning' => "Your server passed the requirements check, but there is at least one warning. We recommend that you check the install troubleshooting page for more details.", + + 'install:require:php' => 'PHP', + 'install:require:htaccess' => 'Web server', + 'install:require:engine' => 'Settings file', + 'install:require:database' => 'Database', + + 'install:check:root' => 'Your web server does not have permission to create an .htaccess file in the root directory of Elgg. You have two choices: + + 1. Change the permissions on the root directory + + 2. Copy the file htaccess_dist to .htaccess', + + 'install:check:php:version' => 'Elgg requires PHP %s or above. This server is using version %s.', + 'install:check:php:extension' => 'Elgg requires the PHP extension %s.', + 'install:check:php:extension:recommend' => 'It is recommended that the PHP extension %s is installed.', + 'install:check:php:open_basedir' => 'The open_basedir PHP directive may prevent Elgg from saving files to its data directory.', + 'install:check:php:safe_mode' => 'Running PHP in safe mode is not recommened and may cause problems with Elgg.', + + 'install:check:htaccess_exists' => 'There is an .htaccess file in the root directory of Elgg. Please remove it.', + 'install:check:htaccess_fail' => 'Unable to create an .htaccess file in the root directory of Elgg. You will need to copy htaccess_dist to .htaccess', + 'install:check:rewrite:success' => 'The test of the rewrite rules was successful.', + 'install:check:rewrite:fail' => 'The URL rewrite test failed.', + 'install:check:rewrite:unknown' => 'The result rewrite test could not be determined. Continue at your own risk.', + + 'install:check:enginedir' => 'Your web server does not have permission to create the settings.php file in the engine directory. You have two choices: + + 1. Change the permissions on the engine directory + + 2. Copy the file settings.example.php to settings.php and follow the instructions in it for setting your database parameters.', + + 'install:check:php:success' => "Your server's PHP satisfies all of Elgg's requirements.", + 'install:check:database' => 'The database requirements are checked when Elgg loads its database.', + + 'install:database:instructions' => "If you haven't already created a database for Elgg, do that now. Then fill in the values below to initialize the Elgg database.", + 'install:database:error' => 'There was an error creating the Elgg database and installation cannot continue. Review the message above and correct any problems. If you need more help, visit the Install Troubleshooting link below, or post to the Elgg community forums.', + + 'install:database:label:dbuser' => 'Database Username', + 'install:database:label:dbpassword' => 'Database Password', + 'install:database:label:dbname' => 'Database Name', + 'install:database:label:dbhost' => 'Database Host', + 'install:database:label:dbprefix' => 'Database Table Prefix', + + 'install:database:help:dbuser' => 'User that has full priviledges to the MySQL database that you created for Elgg', + 'install:database:help:dbpassword' => 'Password for the above database user account', + 'install:database:help:dbname' => 'Name of the Elgg database', + 'install:database:help:dbhost' => 'Hostname of the MySQL server (usually localhost)', + 'install:database:help:dbprefix' => "The prefix given to all of Elgg's tables (usually elgg_)", + + 'install:dbuser' => '', + + 'install:settings:instructions' => "We need some information about the site as we configure Elgg. If you haven't created a data directory for Elgg, please do so before completing this step.", + + 'install:settings:label:sitename' => 'Site Name', + 'install:settings:label:siteemail' => 'Site Email Address', + 'install:settings:label:wwwroot' => 'Site URL', + 'install:settings:label:path' => 'Elgg Install Directory', + 'install:settings:label:dataroot' => 'Data Directory', + 'install:settings:label:language' => 'Site Language', + 'install:settings:label:siteaccess' => 'Default Site Access', + + 'install:settings:help:sitename' => 'The name of your new Elgg site', + 'install:settings:help:siteemail' => 'Email address used by Elgg for communication with users', + 'install:settings:help:wwwroot' => 'The address of the site (Elgg usually guesses this correctly)', + 'install:settings:help:path' => 'The directory where you put the Elgg code (Elgg usually guesses this correctly)', + 'install:settings:help:dataroot' => 'The directory that you created for Elgg to save files (the permissions on this directory are checked when you click Next)', + 'install:settings:help:language' => 'The default language for the site', + 'install:settings:help:siteaccess' => 'The default access level for new user created content', + + 'install:admin:instructions' => "It is now time to create an administrator's account.", + + 'install:admin:label:displayname' => 'Display Name', + 'install:admin:label:email' => 'Email Address', + 'install:admin:label:username' => 'Username', + 'install:admin:label:password1' => 'Password', + 'install:admin:label:password2' => 'Password Again', + + 'install:admin:help:displayname' => 'The name that is displayed on the site for this account', + 'install:admin:help:email' => '', + 'install:admin:help:username' => 'Account username used for logging in', + 'install:admin:help:password1' => 'Account password must be at least x characters long', + 'install:admin:help:password2' => 'Retype password to confirm', + + 'install:admin:password:mismatch' => 'Password must match.', + 'install:admin:password:empty' => 'Password cannot be empty.', + 'install:admin:cannot_create' => 'Unable to create an admin account.', + + 'install:complete:instructions' => 'Your Elgg site is now ready to be used. Click the button below to be taken to your site.', + + + 'InstallationException:UnknownStep' => '%s is an unknown installation step.', + 'InstallationException:MissingLibrary' => 'Could not load %s', + 'InstallationException:CannotLoadSettings' => 'Elgg could not load the settings file. It does not exist or there is a file permissions issue.', + + +); + +add_translation("en", $english); |