diff --git a/core/includes/install.core.inc b/core/includes/install.core.inc index 369e868afa8563ffa88388c2dfd158e8f593a276..45c7e5133af7a229108321bc3c461616cd53926d 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 f0c329b268a3cf5a3eda84a1a324c8ec4205ef11..f1184a7d520a46dc7a5c14110cc13a9be2709aec 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 similarity index 100% rename from core/modules/simpletest/files/translations/install.de.po rename to 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 similarity index 100% rename from core/modules/simpletest/files/translations/install.hu.po rename to 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 18d349cd7a34a14fec122adf81c598c0d6fb819a..18636b5de4bdbef62e4c2cd564bb5ca24be898c8 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 @@ function testInstallerTranslationFiles() { // 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(), );