summaryrefslogtreecommitdiff
path: root/includes/install.core.inc
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2010-09-22 01:49:17 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2010-09-22 01:49:17 +0000
commit18a68728d07e2e8da14d84a923eb21b0f8f58cfa (patch)
tree8496e06bbd4fab39da7a1f2d34e64503e9195ad7 /includes/install.core.inc
parent936344ea5549a724fa504dec9df98fbc49f2dc01 (diff)
downloadbrdo-18a68728d07e2e8da14d84a923eb21b0f8f58cfa.tar.gz
brdo-18a68728d07e2e8da14d84a923eb21b0f8f58cfa.tar.bz2
#882164 by aschiwi, Gábor Hojtsy, David_Rothstein, reglogge, et al: Fix the 'install from another language' instructions so that they actually work.
Diffstat (limited to 'includes/install.core.inc')
-rw-r--r--includes/install.core.inc39
1 files changed, 23 insertions, 16 deletions
diff --git a/includes/install.core.inc b/includes/install.core.inc
index 906a48e43..dedd09deb 100644
--- a/includes/install.core.inc
+++ b/includes/install.core.inc
@@ -1198,21 +1198,28 @@ function install_select_locale(&$install_state) {
}
if (empty($install_state['parameters']['locale'])) {
- // If only the built-in (English) language is available, and we are using
- // the default profile and performing an interactive installation, inform
- // the user that the installer can be localized. Otherwise we assume the
- // user knows what he is doing.
+ // If only the built-in (English) language is available, and we are
+ // performing an interactive installation, inform the user that the
+ // installer can be localized. Otherwise we assume the user knows what he
+ // is doing.
if (count($locales) == 1) {
- if ($profilename == 'standard' && $install_state['interactive']) {
+ if ($install_state['interactive']) {
drupal_set_title(st('Choose language'));
if (!empty($install_state['parameters']['localize'])) {
- $output = '<p>' . st('With the addition of an appropriate translation package, this installer is capable of proceeding in another language of your choice. To install and use Drupal in a language other than English:') . '</p>';
- $output .= '<ul><li>' . st('Determine if <a href="@translations" target="_blank">a translation of this Drupal version</a> is available in your language of choice. A translation is provided via a translation package; each translation package enables the display of a specific version of Drupal in a specific language. Not all languages are available for every version of Drupal.', array('@translations' => 'http://drupal.org/project/translations')) . '</li>';
- $output .= '<li>' . st('If an alternative translation package of your choice is available, download and extract its contents to your Drupal root directory.') . '</li>';
- $output .= '<li>' . st('Return to choose language using the second link below and select your desired language from the displayed list. Reloading the page allows the list to automatically adjust to the presence of new translation packages.') . '</li>';
- $output .= '</ul><p>' . 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.') . '</p>';
- $output .= '<p>' . st('How should the installation continue?') . '</p>';
- $output .= '<ul><li><a href="install.php?profile=' . $profilename . '&amp;locale=en">' . st('Continue installation in English') . '</a></li><li><a href="install.php?profile=' . $profilename . '">' . st('Return to choose a language') . '</a></li></ul>';
+ $output = '<p>Follow these steps to translate Drupal into your language:</p>';
+ $output .= '<ol>';
+ $output .= '<li>Download a translation from the <a href="http://localize.drupal.org/download" target="_blank">translation server</a>.</li>';
+ $output .= '<li>Rename the downloaded file to your language\'s <a href="http://www.gnu.org/software/gettext/manual/html_chapter/gettext_16.html#Language-Codes" target="_blank">ISO code</a> (e.g., <code>de.po</code> or <code>fr.po</code>) and place it into the following directory:
+<pre>
+/profiles/' . $profilename . '/translations/
+</pre></li>';
+ $output .= '</ol>';
+ $output .= '<p>For more information on installing Drupal in different languages, visit the <a href="http://drupal.org/localize" target="_blank">drupal.org handbook page</a>.</p>';
+ $output .= '<p>How should the installation continue?</p>';
+ $output .= '<ul>';
+ $output .= '<li><a href="install.php?profile=' . $profilename . '">Reload the language selection page after adding translations</a></li>';
+ $output .= '<li><a href="install.php?profile=' . $profilename . '&amp;locale=en">Continue installation in English</a></li>';
+ $output .= '</ul>';
}
else {
include_once DRUPAL_ROOT . '/includes/form.inc';
@@ -1221,8 +1228,8 @@ function install_select_locale(&$install_state) {
}
return $output;
}
- // One language, but not the default profile or not an interactive
- // installation. Assume the user knows what he is doing.
+ // One language, but not an interactive installation. Assume the user
+ // knows what he is doing.
$locale = current($locales);
$install_state['parameters']['locale'] = $locale->name;
return;
@@ -1263,7 +1270,7 @@ function install_select_locale(&$install_state) {
/**
* Form API array definition for language selection.
*/
-function install_select_locale_form($form, &$form_state, $locales, $profilename = 'standard') {
+function install_select_locale_form($form, &$form_state, $locales, $profilename) {
include_once DRUPAL_ROOT . '/includes/iso.inc';
$languages = _locale_get_predefined_list();
foreach ($locales as $locale) {
@@ -1280,7 +1287,7 @@ function install_select_locale_form($form, &$form_state, $locales, $profilename
'#parents' => array('locale')
);
}
- if ($profilename == 'standard') {
+ if (count($locales) == 1) {
$form['help'] = array(
'#markup' => '<p><a href="install.php?profile=' . $profilename . '&amp;localize=true">' . st('Learn how to install Drupal in other languages') . '</a></p>',
);