summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNathaniel Catchpole2014-03-10 12:05:05 (GMT)
committerNathaniel Catchpole2014-03-10 12:05:05 (GMT)
commit6940175e6c5ffdc2f64edd758ce939ef21118c14 (patch)
treedf2161b644cce3a92e6eb7454071512b98b0fbcb
parent0fb87b2c5143aecbaa4ae57bb58e31474e80bd37 (diff)
Issue #1550866 by cosmicdreams, YesCT, sun, RobLoach: Remove obsolete drupal_language_initialize().
-rw-r--r--core/authorize.php3
-rw-r--r--core/includes/bootstrap.inc9
-rw-r--r--core/includes/common.inc4
-rw-r--r--core/includes/install.core.inc2
-rw-r--r--core/modules/language/language.install15
-rw-r--r--core/modules/language/lib/Drupal/language/Tests/LanguageDependencyInjectionTest.php3
-rw-r--r--core/modules/language/lib/Drupal/language/Tests/LanguagePathMonolingualTest.php3
-rw-r--r--core/update.php3
8 files changed, 0 insertions, 42 deletions
diff --git a/core/authorize.php b/core/authorize.php
index d812f2e..ba71c5d 100644
--- a/core/authorize.php
+++ b/core/authorize.php
@@ -71,9 +71,6 @@ $module_list['user'] = 'core/modules/user/user.module';
\Drupal::moduleHandler()->load('system');
\Drupal::moduleHandler()->load('user');
-// Initialize the language system.
-drupal_language_initialize();
-
// Initialize the maintenance theme for this administrative script.
drupal_maintenance_theme();
diff --git a/core/includes/bootstrap.inc b/core/includes/bootstrap.inc
index c0473d1..5372dc7 100644
--- a/core/includes/bootstrap.inc
+++ b/core/includes/bootstrap.inc
@@ -1940,15 +1940,6 @@ function drupal_installation_attempted() {
}
/**
- * Initializes all the defined language types and sets the default langcode.
- */
-function drupal_language_initialize() {
- $language_manager = \Drupal::languageManager();
- $language_manager->init();
- \Drupal::translation()->setDefaultLangcode($language_manager->getCurrentLanguage()->id);
-}
-
-/**
* Returns the language object for a given language type.
*
* @see \Drupal\Core\Language\LanguageManager
diff --git a/core/includes/common.inc b/core/includes/common.inc
index 2cda0fc..ecdce53 100644
--- a/core/includes/common.inc
+++ b/core/includes/common.inc
@@ -3203,10 +3203,6 @@ function _drupal_bootstrap_full($skip = FALSE) {
return;
}
- // Initialize language (which can strip path prefix) prior to initializing
- // current_path().
- drupal_language_initialize();
-
// Let all modules take action before the menu system handles the request.
// We do not want this while running update.php.
if (!defined('MAINTENANCE_MODE') || MAINTENANCE_MODE != 'update') {
diff --git a/core/includes/install.core.inc b/core/includes/install.core.inc
index 890b5a9..a0b709e 100644
--- a/core/includes/install.core.inc
+++ b/core/includes/install.core.inc
@@ -372,8 +372,6 @@ function install_begin_request(&$install_state) {
$container->get('string_translation')
->addTranslator($container->get('string_translator.file_translation'));
- // Set up $language, so t() caller functions will still work.
- drupal_language_initialize();
// Add in installation language if present.
if (isset($install_state['parameters']['langcode'])) {
\Drupal::translation()->setDefaultLangcode($install_state['parameters']['langcode']);
diff --git a/core/modules/language/language.install b/core/modules/language/language.install
deleted file mode 100644
index 27541ca..0000000
--- a/core/modules/language/language.install
+++ /dev/null
@@ -1,15 +0,0 @@
-<?php
-
-/**
- * @file
- * Install, update and uninstall functions for the language module.
- */
-
-/**
- * Implements hook_uninstall().
- */
-function language_uninstall() {
- // Re-initialize the language system so successive calls to t() and other
- // functions will not expect languages to be present.
- drupal_language_initialize();
-}
diff --git a/core/modules/language/lib/Drupal/language/Tests/LanguageDependencyInjectionTest.php b/core/modules/language/lib/Drupal/language/Tests/LanguageDependencyInjectionTest.php
index 938f515..f734210 100644
--- a/core/modules/language/lib/Drupal/language/Tests/LanguageDependencyInjectionTest.php
+++ b/core/modules/language/lib/Drupal/language/Tests/LanguageDependencyInjectionTest.php
@@ -33,9 +33,6 @@ class LanguageDependencyInjectionTest extends LanguageTestBase {
* @see \Drupal\Core\Language\Language
*/
function testDependencyInjectedNewLanguage() {
- // Initialize the language system.
- drupal_language_initialize();
-
$expected = $this->languageManager->getDefaultLanguage();
$result = $this->languageManager->getCurrentLanguage();
foreach ($expected as $property => $value) {
diff --git a/core/modules/language/lib/Drupal/language/Tests/LanguagePathMonolingualTest.php b/core/modules/language/lib/Drupal/language/Tests/LanguagePathMonolingualTest.php
index 799795e..863a41d 100644
--- a/core/modules/language/lib/Drupal/language/Tests/LanguagePathMonolingualTest.php
+++ b/core/modules/language/lib/Drupal/language/Tests/LanguagePathMonolingualTest.php
@@ -62,9 +62,6 @@ class LanguagePathMonolingualTest extends WebTestBase {
// Set language detection to URL.
$edit = array('language_interface[enabled][language-url]' => TRUE);
$this->drupalPostForm('admin/config/regional/language/detection', $edit, t('Save settings'));
-
- // Force languages to be initialized.
- drupal_language_initialize();
}
/**
diff --git a/core/update.php b/core/update.php
index c0f1139..c94b4c5 100644
--- a/core/update.php
+++ b/core/update.php
@@ -370,9 +370,6 @@ if (is_null($op) && update_access_allowed()) {
require_once __DIR__ . '/includes/install.inc';
require_once DRUPAL_ROOT . '/core/modules/system/system.install';
- // Set up $language, since the installer components require it.
- drupal_language_initialize();
-
// Set up theme system for the maintenance page.
drupal_maintenance_theme();