summaryrefslogtreecommitdiff
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
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.
-rw-r--r--INSTALL.txt24
-rw-r--r--includes/install.core.inc39
-rw-r--r--profiles/minimal/translations/README.txt4
-rw-r--r--profiles/standard/translations/README.txt4
-rw-r--r--themes/seven/style.css4
5 files changed, 53 insertions, 22 deletions
diff --git a/INSTALL.txt b/INSTALL.txt
index 45f414735..ba7e54ef0 100644
--- a/INSTALL.txt
+++ b/INSTALL.txt
@@ -72,12 +72,24 @@ INSTALLATION
mv drupal-x.x/* drupal-x.x/.htaccess /var/www/html
- If you would like to have the default English interface translated to a
- different language, we have good news. You can install and use Drupal in
- other languages from the start. Check whether a released package of the
- language desired is available for this Drupal version at
- http://drupal.org/project/translations and download the package. Extract
- the contents to the same directory where you extracted Drupal into.
+ By default, Drupal is installed in English, and further languages may be
+ installed later. Follow these steps to translate Drupal into your language
+ during installation:
+
+ - Download a translation file for this Drupal version from the translation
+ server:
+ http://localize.drupal.org/download
+
+ - Rename the downloaded file to your language's ISO code (e.g., de.po or
+ fr.po) and place it into the directory /translations right below
+ the installation profile's directory that you want to use for your
+ installation (usually "standard"):
+
+ /profiles/standard/translations/
+
+ - Reload the language selection page after adding translations.
+
+ For detailed instructions, visit http://drupal.org/localize.
2. IF NECESSARY, CREATE THE CONFIGURATION FILE AND GRANT WRITE PERMISSIONS
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>',
);
diff --git a/profiles/minimal/translations/README.txt b/profiles/minimal/translations/README.txt
new file mode 100644
index 000000000..72d1e6065
--- /dev/null
+++ b/profiles/minimal/translations/README.txt
@@ -0,0 +1,4 @@
+// $Id$
+
+This directory should be used to place downloaded translations
+for installing Drupal core.
diff --git a/profiles/standard/translations/README.txt b/profiles/standard/translations/README.txt
new file mode 100644
index 000000000..72d1e6065
--- /dev/null
+++ b/profiles/standard/translations/README.txt
@@ -0,0 +1,4 @@
+// $Id$
+
+This directory should be used to place downloaded translations
+for installing Drupal core.
diff --git a/themes/seven/style.css b/themes/seven/style.css
index b53ac7781..5469eeeef 100644
--- a/themes/seven/style.css
+++ b/themes/seven/style.css
@@ -139,6 +139,10 @@ pre,
kbd {
font-size: 1.231em;
}
+pre {
+ margin: 0.5em 0;
+ white-space: pre-wrap;
+}
/**
* Skip link.