summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwebchick2012-08-18 17:45:05 +0200
committerwebchick2012-08-18 17:45:05 +0200
commitea5de2e379d77f29d5021776f53d42963064221b (patch)
treec741d050e5f79dbed37d738e252d1e0a70041caf
parent428226c9325096f929356af8323ea541ac23e5ee (diff)
Issue #1392208 by Gábor Hojtsy, penyaskito, David_Rothstein: Fixed Impossible to install Drupal in a non-English language when following the provided instructions.
-rw-r--r--core/includes/install.core.inc2
-rw-r--r--core/includes/install.inc6
-rw-r--r--core/modules/simpletest/files/translations/drupal-8.0.de.po (renamed from core/modules/simpletest/files/translations/install.de.po)0
-rw-r--r--core/modules/simpletest/files/translations/drupal-8.0.hu.po (renamed from core/modules/simpletest/files/translations/install.hu.po)0
-rw-r--r--core/modules/system/lib/Drupal/system/Tests/Common/InstallerLanguageTest.php6
5 files changed, 7 insertions, 7 deletions
diff --git a/core/includes/install.core.inc b/core/includes/install.core.inc
index 369e868..45c7e51 100644
--- a/core/includes/install.core.inc
+++ b/core/includes/install.core.inc
@@ -1211,7 +1211,7 @@ function install_find_translations() {
*/
function install_find_translation_files($langcode = NULL) {
$directory = variable_get('locale_translate_file_directory', conf_path() . '/files/translations');
- $files = file_scan_directory($directory, '!install\.' . (!empty($langcode) ? preg_quote($langcode, '!') : '[^\.]+') . '\.po$!', array('recurse' => FALSE));
+ $files = file_scan_directory($directory, '!drupal-\d+\.\d+\.' . (!empty($langcode) ? preg_quote($langcode, '!') : '[^\.]+') . '\.po$!', array('recurse' => FALSE));
return $files;
}
diff --git a/core/includes/install.inc b/core/includes/install.inc
index f0c329b..f1184a7 100644
--- a/core/includes/install.inc
+++ b/core/includes/install.inc
@@ -694,10 +694,10 @@ function st($string, array $args = array(), array $options = array()) {
if (!isset($strings)) {
$strings = array();
if (isset($install_state['parameters']['langcode'])) {
- // If the given langcode was selected, there should be at least one .po file
- // with its name ending in install.{$install_state['parameters']['langcode']}.po
+ // If the given langcode was selected, there should be at least one .po
+ // file with its name in the pattern drupal-$version.$langcode.po.
// This might or might not be the entire filename. It is also possible
- // that multiple files end with the same extension, even if unlikely.
+ // that multiple files end with the same suffix, even if unlikely.
$files = install_find_translation_files($install_state['parameters']['langcode']);
if (!empty($files)) {
// Register locale classes with the classloader. Locale module is not
diff --git a/core/modules/simpletest/files/translations/install.de.po b/core/modules/simpletest/files/translations/drupal-8.0.de.po
index e69de29..e69de29 100644
--- a/core/modules/simpletest/files/translations/install.de.po
+++ b/core/modules/simpletest/files/translations/drupal-8.0.de.po
diff --git a/core/modules/simpletest/files/translations/install.hu.po b/core/modules/simpletest/files/translations/drupal-8.0.hu.po
index e69de29..e69de29 100644
--- a/core/modules/simpletest/files/translations/install.hu.po
+++ b/core/modules/simpletest/files/translations/drupal-8.0.hu.po
diff --git a/core/modules/system/lib/Drupal/system/Tests/Common/InstallerLanguageTest.php b/core/modules/system/lib/Drupal/system/Tests/Common/InstallerLanguageTest.php
index 18d349c..18636b5 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Common/InstallerLanguageTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Common/InstallerLanguageTest.php
@@ -36,9 +36,9 @@ class InstallerLanguageTest extends WebTestBase {
// Different translation files would be found depending on which language
// we are looking for.
$expected_translation_files = array(
- NULL => array('install.hu.po', 'install.de.po'),
- 'de' => array('install.de.po'),
- 'hu' => array('install.hu.po'),
+ NULL => array('drupal-8.0.hu.po', 'drupal-8.0.de.po'),
+ 'de' => array('drupal-8.0.de.po'),
+ 'hu' => array('drupal-8.0.hu.po'),
'it' => array(),
);