Skip to content

Commit

Permalink
Issue #2345: [UX] Installer: Allow using .po translation files from d…
Browse files Browse the repository at this point in the history
…rupal.org without having to rename them.
  • Loading branch information
klonos authored and quicksketch committed Dec 22, 2016
1 parent df5aeb0 commit 6cb84ea
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion core/includes/install.core.inc
Original file line number Diff line number Diff line change
Expand Up @@ -1300,7 +1300,9 @@ function install_find_translations() {
*/
function install_find_translation_files($langcode = NULL) {
$directory = settings_get('locale_translate_file_directory', 'files/translations');
$files = file_scan_directory($directory, '!install\.' . (!empty($langcode) ? preg_quote($langcode, '!') : '[^\.]+') . '\.po$!', array('recurse' => FALSE));
// @todo: Remove the "drupal" check in 2.x (assuming we have a localization
// server by then).
$files = file_scan_directory($directory, '!(install|drupal-\d+\.\d+)\.' . (!empty($langcode) ? preg_quote($langcode, '!') : '[^\.]+') . '\.po$!', array('recurse' => FALSE));
return $files;
}

Expand Down

1 comment on commit 6cb84ea

@backdrop-ci
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.