From c86f0f7ee9aff9db57a157b9dca488bf8e242d9c Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Sun, 15 Jul 2007 10:11:44 +0000 Subject: - Patch #156315 by merlinofchaos: usability improvement: remove the wall of text in the installer. --- install.php | 49 ++++++++++++++++++++++--------------------------- 1 file changed, 22 insertions(+), 27 deletions(-) (limited to 'install.php') diff --git a/install.php b/install.php index 28748d2e3..3b8ff56ca 100644 --- a/install.php +++ b/install.php @@ -511,15 +511,20 @@ function install_select_locale($profilename) { if (count($locales) == 1) { if ($profilename == 'default') { drupal_maintenance_theme(); - install_task_list('profile-select'); - drupal_set_title(st('Localization of the Drupal installer')); - $output = '

'. st('With the addition of an appropriate language pack, this installer is capable of proceeding in another language of your choice. To install and use Drupal in a language other than English:') . '

'; - $output .= '

' . st('Alternatively, to install and use Drupal in English, or to defer the selection of an alternative language until after installation, select the first link below.') .'

'; - $output .= '

' . st('How should the installation continue?') .'

'; - $output .= ''; + install_task_list('locale-select'); + drupal_set_title(st('Choose language')); + if (!empty($_GET['localize'])) { + $output = '

'. st('With the addition of an appropriate language pack, this installer is capable of proceeding in another language of your choice. To install and use Drupal in a language other than English:') . '

'; + $output .= '

' . st('Alternatively, to install and use Drupal in English, or to defer the selection of an alternative language until after installation, select the first link below.') .'

'; + $output .= '

' . st('How should the installation continue?') .'

'; + $output .= ''; + } + else { + $output .= ''; + } print theme('install_page', $output); exit; } @@ -537,7 +542,7 @@ function install_select_locale($profilename) { drupal_maintenance_theme(); install_task_list('locale-select'); - drupal_set_title(st('Choose your preferred language')); + drupal_set_title(st('Choose language')); print theme('install_page', drupal_get_form('install_select_locale_form', $locales)); exit; } @@ -785,16 +790,6 @@ function install_task_list($active = NULL) { $profile = isset($_GET['profile']) && isset($profiles[$_GET['profile']]) ? $_GET['profile'] : '.'; $locales = install_find_locales($profile); - // Keep the profile selection task if we have more profiles or only the - // default profile is available and with only the built-in language, in - // which case we use this screen to present information about translations. - if (count($profiles) == 1) { - $first_profile = array_shift($profiles); - if ($first_profile->name != 'default' || count($locales) > 1) { - unset($tasks['profile-select']); - } - } - // Add tasks defined by the profile. if ($profile) { $function = $profile .'_profile_task_list'; @@ -806,18 +801,18 @@ function install_task_list($active = NULL) { } } + // If necessary, add translation import to the task list. + if (count($locales) > 1 && !empty($_GET['locale']) && $_GET['locale'] != 'en') { + $tasks += array( + 'locale-batch' => st('Import translations'), + ); + } + // Add finished step as the last task. $tasks += array( - 'locale-batch' => st('Import translations'), 'finished' => st('Finished') ); - // Remove locale related tasks if the install profile does not use them. - if (count($locales) == 1) { - unset($tasks['locale-select']); - unset($tasks['locale-batch']); - } - // Let the theming function know that 'finished' and 'done' // include everything, so every step is completed. if (in_array($active, array('finished', 'done'))) { -- cgit v1.2.3