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 4c9c60c..c0811d0 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)) { $strings = Gettext::filesToArray($install_state['parameters']['langcode'], $files);