Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
6ea395e6
Commit
6ea395e6
authored
Jan 04, 2012
by
Nathaniel Catchpole
Browse files
Issue
#1260716
by David_Rothstein: Follow-up for improve language onboarding user experience.
parent
82e02137
Changes
3
Hide whitespace changes
Inline
Side-by-side
core/includes/install.core.inc
View file @
6ea395e6
...
...
@@ -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.
...
...
core/includes/install.inc
View file @
6ea395e6
...
...
@@ -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'
],
...
...
core/modules/system/system.api.php
View file @
6ea395e6
...
...
@@ -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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment