diff --git a/core/modules/language/lib/Drupal/language/LanguageConfigContext.php b/core/lib/Drupal/Core/Config/Context/LanguageConfigContext.php similarity index 90% rename from core/modules/language/lib/Drupal/language/LanguageConfigContext.php rename to core/lib/Drupal/Core/Config/Context/LanguageConfigContext.php index 58b83a6..2c9acaa 100644 --- a/core/modules/language/lib/Drupal/language/LanguageConfigContext.php +++ b/core/lib/Drupal/Core/Config/Context/LanguageConfigContext.php @@ -2,10 +2,10 @@ /** * @file - * Contains \Drupal\language\LanguageConfigContext. + * Contains \Drupal\Core\Config\Context\LanguageConfigContext. */ -namespace Drupal\language; +namespace Drupal\Core\Config\Context; use Drupal\Core\Config\Context\ConfigContext; use Drupal\Core\Language\Language; diff --git a/core/lib/Drupal/Core/Datetime/Date.php b/core/lib/Drupal/Core/Datetime/Date.php index 67d6519..8f5831a 100644 --- a/core/lib/Drupal/Core/Datetime/Date.php +++ b/core/lib/Drupal/Core/Datetime/Date.php @@ -144,10 +144,8 @@ protected function dateFormat($format, $langcode = NULL) { if (!isset($this->dateFormats[$format][$langcode])) { // Enter a language specific context for the language if some language is // given, so the right date format is loaded. - $needs_language_context = $needs_language_context && - \Drupal::moduleHandler()->moduleExists('language'); if ($needs_language_context) { - $language_context = config_context_enter('Drupal\language\LanguageConfigContext'); + $language_context = config_context_enter('Drupal\Core\Config\Context\LanguageConfigContext'); $language_context->setLanguage(new Language(array('id' => $langcode))); } $this->dateFormats[$format][$langcode] = $this->dateFormatStorage->load($format); diff --git a/core/modules/config/lib/Drupal/config/Tests/ConfigLocaleOverride.php b/core/modules/config/lib/Drupal/config/Tests/ConfigLocaleOverride.php index f3f3ea6..24edb76 100644 --- a/core/modules/config/lib/Drupal/config/Tests/ConfigLocaleOverride.php +++ b/core/modules/config/lib/Drupal/config/Tests/ConfigLocaleOverride.php @@ -170,7 +170,7 @@ function testConfigLocaleLanguageOverride() { ))); $language = language_load('fr'); - $language_config_context = config_context_enter('Drupal\language\LanguageConfigContext'); + $language_config_context = config_context_enter('Drupal\Core\Config\Context\LanguageConfigContext'); $language_config_context->setLanguage($language); $config = \Drupal::config('config_test.system'); $this->assertIdentical($config->get('foo'), 'fr bar'); @@ -196,7 +196,7 @@ function testConfigLocaleLanguageOverride() { // Enter an english context on top of the german context. $language = language_load('en'); // Create a new language config context to stack on top of the existing one. - $en_language_config_context = config_context_enter('Drupal\language\LanguageConfigContext'); + $en_language_config_context = config_context_enter('Drupal\Core\Config\Context\LanguageConfigContext'); $en_language_config_context->setLanguage($language); $config = \Drupal::config('config_test.system'); $this->assertIdentical($config->get('foo'), 'en bar');