Commit 6ea395e6 authored by catch's avatar catch
Browse files

Issue #1260716 by David_Rothstein: Follow-up for improve language onboarding user experience.

parent 82e02137
......@@ -533,8 +533,8 @@ function install_tasks($install_state) {
// Determine whether translation import tasks will need to be performed.
$needs_translations = count($install_state['translations']) > 1 && !empty($install_state['parameters']['langcode']) && $install_state['parameters']['langcode'] != 'en';
// The first two installation tasks are (by default) language selection and
// profile selection.
// Start with the core installation tasks that run before handing control
// to the install profile.
$tasks = array(
'install_select_language' => array(
'display_name' => st('Choose language'),
......@@ -1229,19 +1229,6 @@ function install_select_language(&$install_state) {
return;
}
else {
// Allow profile to pre-select the language, skipping the selection.
if (isset($install_state['parameters']['profile'])) {
$info = install_profile_info($install_state['parameters']['profile']);
if (isset($info['langcode'])) {
foreach ($files as $file) {
if ($info['langcode'] == $file->langcode) {
$install_state['parameters']['langcode'] = $file->langcode;
return;
}
}
}
}
// We still don't have a langcode, so display a form for selecting one.
// Only do this in the case of interactive installations, since this is
// not a real form with submit handlers (the database isn't even set up
......@@ -1277,7 +1264,7 @@ function install_select_language_form($form, &$form_state, $files) {
$select_options[$file->langcode] = $standard_languages[$file->langcode][1];
}
else {
// If language not found in standard.inc, display it's langcode
// If the language was not found in standard.inc, display its langcode.
$select_options[$file->langcode] = $file->langcode;
}
// Build a list of languages simulated for browser detection.
......
......@@ -663,7 +663,6 @@ function drupal_rewrite_settings($settings = array()) {
*/
function drupal_verify_profile($install_state) {
$profile = $install_state['parameters']['profile'];
$langcode = $install_state['parameters']['langcode'];
include_once DRUPAL_ROOT . '/core/includes/file.inc';
include_once DRUPAL_ROOT . '/core/includes/common.inc';
......@@ -1264,13 +1263,8 @@ function install_profile_info($profile, $langcode = 'en') {
'version' => NULL,
'hidden' => FALSE,
'php' => DRUPAL_MINIMUM_PHP,
'langcode' => NULL,
'custom_language_selection' => FALSE,
);
$info = drupal_parse_info_file("profiles/$profile/$profile.info") + $defaults;
if (isset($info['langcode'])) {
$info['custom_language_selection'] = TRUE;
}
$info['dependencies'] = array_unique(array_merge(
drupal_required_modules(),
$info['dependencies'],
......
......@@ -3350,8 +3350,6 @@ function hook_html_head_alter(&$head_elements) {
* steps within the installation process.
* @param $install_state
* An array of information about the current installation state.
*
* @see install_profile_info()
*/
function hook_install_tasks_alter(&$tasks, $install_state) {
// Replace the entire site configuration form provided by Drupal core
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment