Skip to content

Commit

Permalink
Issue#3975: [UX] Installer: Revamp the language selection page
Browse files Browse the repository at this point in the history
  • Loading branch information
klonos committed Aug 10, 2019
1 parent ed6bcc8 commit b081b6f
Showing 1 changed file with 24 additions and 2 deletions.
26 changes: 24 additions & 2 deletions core/includes/install.core.inc
Expand Up @@ -1438,16 +1438,38 @@ function install_select_language_form($form, &$form_state, $files) {
);

if (count($files) == 1) {
$form['help'] = array(
$directory = settings_get('locale_translate_file_directory', conf_path() . '/files/translations');

$steps = array();
$steps[] = st('Download translation files from the <a href="https://localize.backdropcms.org/translate/languages" target="_blank">translation server</a>.');
$steps[] = st('Place the downloaded <code>.po</code> files into the following directory: <pre>@dir</pre>', array('@dir' => $directory));
$steps[] = st('<a href="@reload_link">Reload this page</a>. The languages added in the previous step should now have become available in the select menu above.', array('@reload_link' => check_url(backdrop_current_script_url())));

$more_info = st('For more information on installing Backdrop in different languages, visit the <a href="https://backdropcms.org/installing-in-other-languages" target="_blank">Backdrop user guide page</a>.');

$markup = st('Follow these steps to enable other languages for the Backdrop installer:');
$markup = '<p>' . $markup . '</p>';
$markup .= theme('item_list', array('items' => $steps, 'type' => 'ol'));
$markup .= '<p>' . $more_info . '</p>';

$form['languages_help'] = array(
'#type' => 'fieldset',
'#title' => st('Install in another language'),
'#collapsible' => TRUE,
'#collapsed' => TRUE,
);
$form['languages_help']['help'] = array(
'#type' => 'help',
'#markup' => '<a href="' . check_url(backdrop_current_script_url(array('translate' => 'true'))) . '">' . st('Learn how to install Backdrop in other languages') . '</a>',
'#markup' => $markup,
);
}

$form['actions'] = array('#type' => 'actions');
$form['actions']['submit'] = array(
'#type' => 'submit',
'#value' => st('Save and continue'),
);

return $form;
}

Expand Down

0 comments on commit b081b6f

Please sign in to comment.