diff --git a/core/modules/locale/lib/Drupal/locale/Tests/LocaleFileImportStatus.php b/core/modules/locale/lib/Drupal/locale/Tests/LocaleFileImportStatus.php index e3aa84b..ab42a33 100644 --- a/core/modules/locale/lib/Drupal/locale/Tests/LocaleFileImportStatus.php +++ b/core/modules/locale/lib/Drupal/locale/Tests/LocaleFileImportStatus.php @@ -79,7 +79,6 @@ class LocaleFileImportStatus extends WebTestBase { * A file object of type stdClass. */ function mockImportedPoFile($langcode, $timestamp_difference = 0) { - $dir = variable_set('locale_translate_file_directory', drupal_get_path('module', 'locale') . '/tests'); $testfile_uri = 'translations://test.' . $langcode . '.po'; $file = locale_translate_file_create($testfile_uri); @@ -191,7 +190,6 @@ class LocaleFileImportStatus extends WebTestBase { function testDeleteLanguage() { $dir = conf_path() . '/files/translations'; file_prepare_directory($dir, FILE_CREATE_DIRECTORY); - variable_set('locale_translate_file_directory', $dir); $langcode = 'de'; $this->addLanguage($langcode); $file_uri = 'translations://po_' . $this->randomName() . '.' . $langcode . '.po'; diff --git a/core/modules/locale/lib/Drupal/locale/TranslationsStream.php b/core/modules/locale/lib/Drupal/locale/TranslationsStream.php index 975c184..c542170 100644 --- a/core/modules/locale/lib/Drupal/locale/TranslationsStream.php +++ b/core/modules/locale/lib/Drupal/locale/TranslationsStream.php @@ -19,7 +19,7 @@ class TranslationsStream extends LocalStream { /** * Implements Drupal\Core\StreamWrapper\LocalStream::getDirectoryPath() */ - public function getDirectoryPath() { + function getDirectoryPath() { return variable_get('locale_translate_file_directory', conf_path() . '/files/translations'); } diff --git a/core/modules/locale/locale.bulk.inc b/core/modules/locale/locale.bulk.inc index 04aba47..ed2443e 100644 --- a/core/modules/locale/locale.bulk.inc +++ b/core/modules/locale/locale.bulk.inc @@ -471,7 +471,7 @@ function locale_translate_batch_finished($success, $results) { function locale_translate_file_create($filepath) { $file = new stdClass(); $file->filename = drupal_basename($filepath); - $file->uri = 'translations://' . $file->filename; + $file->uri = drupal_realpath($filepath); $file->timestamp = filemtime($file->uri); return $file; }