diff --git a/core/lib/Drupal/Core/Translation/TranslationChain.php b/core/lib/Drupal/Core/Translation/TranslationChain.php index a2cb3d9..4ea661a 100644 --- a/core/lib/Drupal/Core/Translation/TranslationChain.php +++ b/core/lib/Drupal/Core/Translation/TranslationChain.php @@ -64,7 +64,6 @@ public function appendTranslation(TranslationInterface $translation) { */ public function prependTranslation(TranslationInterface $translation) { array_unshift($this->translators, $translation); -debug($this->translators); return $this; } diff --git a/core/modules/locale/lib/Drupal/locale/Tests/LocaleTranslationTest.php b/core/modules/locale/lib/Drupal/locale/Tests/LocaleTranslationTest.php index fe90b29..3a8e80d 100644 --- a/core/modules/locale/lib/Drupal/locale/Tests/LocaleTranslationTest.php +++ b/core/modules/locale/lib/Drupal/locale/Tests/LocaleTranslationTest.php @@ -74,7 +74,7 @@ function testStringTranslation() { // Add string. t($name, array(), array('langcode' => $langcode)); // Reset locale cache. - drupal_container()->get('locale.translation')->reset(); + $this->container->get('locale.translation')->reset(); $this->assertRaw('"edit-languages-' . $langcode .'-weight"', t('Language code found.')); $this->assertText(t($name), t('Test language added.')); $this->drupalLogout(); @@ -153,7 +153,7 @@ function testStringTranslation() { // Refresh the locale() cache to get fresh data from t() below. We are in // the same HTTP request and therefore t() is not refreshed by saving the // translation above. - drupal_container()->get('locale.translation')->reset(); + $this->container->get('locale.translation')->reset(); // Now we should get the proper fresh translation from t(). $this->assertTrue($name != $translation_to_en && t($name, array(), array('langcode' => 'en')) == $translation_to_en, t('t() works for English.')); $this->assertTrue(t($name, array(), array('langcode' => LANGUAGE_SYSTEM)) == $name, t('t() works for LANGUAGE_SYSTEM.')); @@ -369,7 +369,7 @@ function testStringSearch() { // Add string. t($name, array(), array('langcode' => $langcode)); // Reset locale cache. - drupal_container()->get('locale.translation')->reset(); + $this->container->get('locale.translation')->reset(); $this->drupalLogout(); // Search for the name. @@ -498,7 +498,7 @@ function testUICustomizedStrings(){ ))->save(); // Reset locale cache. - drupal_container()->get('locale.translation')->reset(); + $this->container->get('locale.translation')->reset(); // Ensure non-customized translation string does appear if searching Non-customized translation. $search = array( diff --git a/core/modules/simpletest/lib/Drupal/simpletest/TestBase.php b/core/modules/simpletest/lib/Drupal/simpletest/TestBase.php index 9bc36f1..fbd9b94 100644 --- a/core/modules/simpletest/lib/Drupal/simpletest/TestBase.php +++ b/core/modules/simpletest/lib/Drupal/simpletest/TestBase.php @@ -905,7 +905,7 @@ protected function prepareEnvironment() { // Reset and create a new service container. $this->container = new ContainerBuilder(); - // @todo Remove this once this class has no instances of t() and format_plural(). + // @todo Remove this once this class has no calls to t() and format_plural() $this->container->register('locale.translation.custom', 'Drupal\Core\Translation\CustomStrings'); $this->container->register('locale.translation', 'Drupal\Core\Translation\TranslationChain') ->addArgument(new Reference('locale.translation.custom')); diff --git a/core/modules/system/lib/Drupal/system/Tests/Installer/InstallerLanguageTest.php b/core/modules/system/lib/Drupal/system/Tests/Installer/InstallerLanguageTest.php index b714410..199dcf0 100644 --- a/core/modules/system/lib/Drupal/system/Tests/Installer/InstallerLanguageTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/Installer/InstallerLanguageTest.php @@ -45,7 +45,7 @@ function testInstallerTranslationFiles() { 'hu' => array('drupal-8.0.hu.po'), 'it' => array(), ); - $file_translation = new FileTranslation(variable_get('locale_translate_file_directory')); + $file_translation = new FileTranslation($GLOBALS['conf']['locale.settings']['translation.path']); foreach ($expected_translation_files as $langcode => $files_expected) { $files_found = $file_translation->findTranslationFiles($langcode); $this->assertTrue(count($files_found) == count($files_expected), format_string('@count installer languages found.', array('@count' => count($files_expected))));