From b081b6f404f5231f5e8ebabb40cc92eaaaaa4c85 Mon Sep 17 00:00:00 2001 From: Gregory Netsas Date: Sat, 10 Aug 2019 08:29:36 +0300 Subject: [PATCH] Issue#3975: [UX] Installer: Revamp the language selection page https://github.com/backdrop/backdrop-issues/issues/3975 --- core/includes/install.core.inc | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/core/includes/install.core.inc b/core/includes/install.core.inc index 8192ccec61c..539bbd6b757 100644 --- a/core/includes/install.core.inc +++ b/core/includes/install.core.inc @@ -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 translation server.'); + $steps[] = st('Place the downloaded .po files into the following directory:
@dir
', array('@dir' => $directory)); + $steps[] = st('Reload this page. 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 Backdrop user guide page.'); + + $markup = st('Follow these steps to enable other languages for the Backdrop installer:'); + $markup = '

' . $markup . '

'; + $markup .= theme('item_list', array('items' => $steps, 'type' => 'ol')); + $markup .= '

' . $more_info . '

'; + + $form['languages_help'] = array( + '#type' => 'fieldset', + '#title' => st('Install in another language'), + '#collapsible' => TRUE, + '#collapsed' => TRUE, + ); + $form['languages_help']['help'] = array( '#type' => 'help', - '#markup' => '' . st('Learn how to install Backdrop in other languages') . '', + '#markup' => $markup, ); } + $form['actions'] = array('#type' => 'actions'); $form['actions']['submit'] = array( '#type' => 'submit', '#value' => st('Save and continue'), ); + return $form; }