From ecfbc27f34be0ca62010cbb49ae01d8a1cf4b5b9 Mon Sep 17 00:00:00 2001
From: Nathaniel Catchpole <catch@35733.no-reply.drupal.org>
Date: Mon, 17 Jun 2013 14:35:07 +0100
Subject: [PATCH] Issue #1838310 by ParisLiakos, Jose Reyero: Remove st(),
 get_t() and  for good.

---
 core/includes/bootstrap.inc                   |  39 --
 core/includes/form.inc                        |  35 +-
 core/includes/install.core.inc                | 266 ++++++----
 core/includes/install.inc                     |  47 +-
 core/includes/theme.maintenance.inc           |   5 +-
 core/includes/unicode.inc                     |  21 +-
 .../Component/Gettext/PoStreamReader.php      |  31 +-
 .../Database/Driver/mysql/Install/Tasks.php   |   6 +-
 .../Database/Driver/pgsql/Install/Tasks.php   |  13 +-
 .../Database/Driver/sqlite/Install/Tasks.php  |  11 +-
 .../Drupal/Core/Database/Install/Tasks.php    |  38 +-
 .../lib/Drupal/Core/Locale/CountryManager.php | 502 +++++++++---------
 .../Translator/FileTranslation.php            |   3 -
 core/modules/aggregator/aggregator.install    |   7 +-
 .../Drupal/locale/Tests/LocaleInstallTest.php |  47 --
 core/modules/locale/locale.batch.inc          |  23 +-
 core/modules/locale/locale.bulk.inc           |  12 +-
 core/modules/locale/locale.compare.inc        |   5 +-
 core/modules/locale/locale.fetch.inc          |  10 +-
 .../shortcut/Tests/ShortcutTestBase.php       |   4 +-
 core/modules/simpletest/simpletest.install    |  27 +-
 core/modules/system/system.api.php            |  26 +-
 core/modules/system/system.install            | 144 +++--
 .../requirements1_test.install                |   6 +-
 core/modules/user/user.install                |   4 +-
 core/profiles/standard/standard.install       |  14 +-
 core/scripts/update-iso-3166.sh               |  12 +-
 27 files changed, 603 insertions(+), 755 deletions(-)
 delete mode 100644 core/modules/locale/lib/Drupal/locale/Tests/LocaleInstallTest.php

diff --git a/core/includes/bootstrap.inc b/core/includes/bootstrap.inc
index 43415e7a305d..f75bd00a0cd6 100644
--- a/core/includes/bootstrap.inc
+++ b/core/includes/bootstrap.inc
@@ -1361,11 +1361,6 @@ function bootstrap_hooks() {
  * Translators can then rearrange the string as necessary for the language
  * (e.g., in Spanish, it might be "blog de @name").
  *
- * @section sec_alt_funcs_install Use During Installation Phase
- * During the Drupal installation phase, some resources used by t() wil not be
- * available to code that needs localization. See st() and get_t() for
- * alternatives.
- *
  * @param $string
  *   A string containing the English string to translate.
  * @param $args
@@ -1382,8 +1377,6 @@ function bootstrap_hooks() {
  * @return
  *   The translated string.
  *
- * @see st()
- * @see get_t()
  * @see format_string()
  * @ingroup sanitization
  */
@@ -2392,38 +2385,6 @@ function drupal_installation_attempted() {
   return isset($GLOBALS['install_state']) && empty($GLOBALS['install_state']['installation_finished']);
 }
 
-/**
- * Returns the name of the proper localization function.
- *
- * get_t() exists to support localization for code that might run during
- * the installation phase, when some elements of the system might not have
- * loaded.
- *
- * This would include implementations of hook_install(), which could run
- * during the Drupal installation phase, and might also be run during
- * non-installation time, such as while installing the module from the the
- * module administration page.
- *
- * Example usage:
- * @code
- *   $t = get_t();
- *   $translated = $t('translate this');
- * @endcode
- *
- * Use t() if your code will never run during the Drupal installation phase.
- * Use st() if your code will only run during installation and never any other
- * time. Use get_t() if your code could run in either circumstance.
- *
- * @todo Remove this in favor of t().
- *
- * @see t()
- * @see st()
- * @ingroup sanitization
- */
-function get_t() {
-  return 't';
-}
-
 /**
  * Initializes all the defined language types and sets the default langcode.
  */
diff --git a/core/includes/form.inc b/core/includes/form.inc
index 90d47fb15689..a10a8d278110 100644
--- a/core/includes/form.inc
+++ b/core/includes/form.inc
@@ -1348,9 +1348,6 @@ function drupal_redirect_form($form_state) {
  *   theming, and hook_form_alter functions.
  */
 function _form_validate(&$elements, &$form_state, $form_id = NULL) {
-  // Also used in the installer, pre-database setup.
-  $t = get_t();
-
   // Recurse through all children.
   foreach (element_children($elements) as $key) {
     if (isset($elements[$key]) && $elements[$key]) {
@@ -1364,7 +1361,7 @@ function _form_validate(&$elements, &$form_state, $form_id = NULL) {
     if (isset($elements['#needs_validation'])) {
       // Verify that the value is not longer than #maxlength.
       if (isset($elements['#maxlength']) && drupal_strlen($elements['#value']) > $elements['#maxlength']) {
-        form_error($elements, $t('!name cannot be longer than %max characters but is currently %length characters long.', array('!name' => empty($elements['#title']) ? $elements['#parents'][0] : $elements['#title'], '%max' => $elements['#maxlength'], '%length' => drupal_strlen($elements['#value']))));
+        form_error($elements, t('!name cannot be longer than %max characters but is currently %length characters long.', array('!name' => empty($elements['#title']) ? $elements['#parents'][0] : $elements['#title'], '%max' => $elements['#maxlength'], '%length' => drupal_strlen($elements['#value']))));
       }
 
       if (isset($elements['#options']) && isset($elements['#value'])) {
@@ -1378,7 +1375,7 @@ function _form_validate(&$elements, &$form_state, $form_id = NULL) {
           $value = in_array($elements['#type'], array('checkboxes', 'tableselect')) ? array_keys($elements['#value']) : $elements['#value'];
           foreach ($value as $v) {
             if (!isset($options[$v])) {
-              form_error($elements, $t('An illegal choice has been detected. Please contact the site administrator.'));
+              form_error($elements, t('An illegal choice has been detected. Please contact the site administrator.'));
               watchdog('form', 'Illegal choice %choice in !name element.', array('%choice' => $v, '!name' => empty($elements['#title']) ? $elements['#parents'][0] : $elements['#title']), WATCHDOG_ERROR);
             }
           }
@@ -1397,7 +1394,7 @@ function _form_validate(&$elements, &$form_state, $form_id = NULL) {
           form_set_value($elements, NULL, $form_state);
         }
         elseif (!isset($options[$elements['#value']])) {
-          form_error($elements, $t('An illegal choice has been detected. Please contact the site administrator.'));
+          form_error($elements, t('An illegal choice has been detected. Please contact the site administrator.'));
           watchdog('form', 'Illegal choice %choice in %name element.', array('%choice' => $elements['#value'], '%name' => empty($elements['#title']) ? $elements['#parents'][0] : $elements['#title']), WATCHDOG_ERROR);
         }
       }
@@ -1480,7 +1477,7 @@ function _form_validate(&$elements, &$form_state, $form_id = NULL) {
       // constructors are encouraged to set #title anyway, and then set
       // #title_display to 'invisible'. This improves accessibility.
       elseif (isset($elements['#title'])) {
-        form_error($elements, $t('!name field is required.', array('!name' => $elements['#title'])));
+        form_error($elements, t('!name field is required.', array('!name' => $elements['#title'])));
       }
       else {
         form_error($elements);
@@ -3177,13 +3174,12 @@ function theme_checkboxes($variables) {
  * This is used as a pre render function for checkboxes and radios.
  */
 function form_pre_render_conditional_form_element($element) {
-  $t = get_t();
   // Set the element's title attribute to show #title as a tooltip, if needed.
   if (isset($element['#title']) && $element['#title_display'] == 'attribute') {
     $element['#attributes']['title'] = $element['#title'];
     if (!empty($element['#required'])) {
       // Append an indication that this field is required.
-      $element['#attributes']['title'] .= ' (' . $t('Required') . ')';
+      $element['#attributes']['title'] .= ' (' . t('Required') . ')';
     }
   }
 
@@ -4759,11 +4755,9 @@ function theme_form_element($variables) {
  * @ingroup themeable
  */
 function theme_form_required_marker($variables) {
-  // This is also used in the installer, pre-database setup.
-  $t = get_t();
   $attributes = array(
     'class' => 'form-required',
-    'title' => $t('This field is required.'),
+    'title' => t('This field is required.'),
   );
   return '<abbr' . new Attribute($attributes) . '>*</abbr>';
 }
@@ -4793,8 +4787,6 @@ function theme_form_required_marker($variables) {
  */
 function theme_form_element_label($variables) {
   $element = $variables['element'];
-  // This is also used in the installer, pre-database setup.
-  $t = get_t();
 
   // If title and required marker are both empty, output no label.
   if ((!isset($element['#title']) || $element['#title'] === '') && empty($element['#required'])) {
@@ -4820,7 +4812,7 @@ function theme_form_element_label($variables) {
     $attributes['for'] = $element['#id'];
   }
 
-  return '<label' . new Attribute($attributes) . '>' . $t('!title!required', array('!title' => $title, '!required' => $required)) . '</label>';
+  return '<label' . new Attribute($attributes) . '>' . t('!title!required', array('!title' => $title, '!required' => $required)) . '</label>';
 }
 
 /**
@@ -5029,8 +5021,6 @@ function batch_set($batch_definition) {
     }
 
     // Base and default properties for the batch set.
-    // Use get_t() to allow batches during installation.
-    $t = get_t();
     $init = array(
       'sandbox' => array(),
       'results' => array(),
@@ -5039,10 +5029,10 @@ function batch_set($batch_definition) {
       'elapsed' => 0,
     );
     $defaults = array(
-      'title' => $t('Processing'),
-      'init_message' => $t('Initializing.'),
-      'progress_message' => $t('Completed @current of @total.'),
-      'error_message' => $t('An error has occurred.'),
+      'title' => t('Processing'),
+      'init_message' => t('Initializing.'),
+      'progress_message' => t('Completed @current of @total.'),
+      'error_message' => t('An error has occurred.'),
       'css' => array(),
     );
     $batch_set = $init + $batch_definition + $defaults;
@@ -5132,8 +5122,7 @@ function batch_process($redirect = NULL, $url = 'batch', $redirect_callback = 'd
     if ($batch['progressive']) {
       // Now that we have a batch id, we can generate the redirection link in
       // the generic error message.
-      $t = get_t();
-      $batch['error_message'] = $t('Please continue to <a href="@error_url">the error page</a>', array('@error_url' => url($url, array('query' => array('id' => $batch['id'], 'op' => 'finished')))));
+      $batch['error_message'] = t('Please continue to <a href="@error_url">the error page</a>', array('@error_url' => url($url, array('query' => array('id' => $batch['id'], 'op' => 'finished')))));
 
       // Clear the way for the drupal_goto() redirection to the batch processing
       // page, by saving and unsetting the 'destination', if there is any.
diff --git a/core/includes/install.core.inc b/core/includes/install.core.inc
index f798392ac581..80166eec3c14 100644
--- a/core/includes/install.core.inc
+++ b/core/includes/install.core.inc
@@ -316,6 +316,15 @@ function install_begin_request(&$install_state) {
 
   // Determine whether the configuration system is ready to operate.
   $install_state['config_verified'] = install_verify_config_directory(CONFIG_ACTIVE_DIRECTORY) && install_verify_config_directory(CONFIG_STAGING_DIRECTORY);
+
+  // Create a minimal container for t() to work.
+  // This container will be overriden but it needed for the very early
+  // installation process when database tasks run.
+  $container = new ContainerBuilder();
+  // Register the translation services.
+  install_register_translation_service($container);
+  Drupal::setContainer($container);
+
   // Check existing settings.php.
   $install_state['database_verified'] = install_verify_database_settings();
   $install_state['settings_verified'] = $install_state['config_verified'] && $install_state['database_verified'];
@@ -347,10 +356,13 @@ function install_begin_request(&$install_state) {
   if ($install_state['settings_verified']) {
     $kernel = new DrupalKernel('install', FALSE, drupal_classloader(), FALSE);
     $kernel->boot();
+    $container = $kernel->getContainer();
+    // Add the file translation service to the container.
+    $container->set('string_translator.file_translation', install_file_translation_service());
+    $container->get('string_translation')->addTranslator($container->get('string_translator.file_translation'));
     // Set the request in the kernel to the new created Request above
     // so it is available to the rest of the installation process.
-    $kernel->getContainer()
-      ->set('request', $request);
+    $container->set('request', $request);
   }
   else {
     // @todo Move into a proper Drupal\Core\DependencyInjection\InstallContainerBuilder.
@@ -374,9 +386,7 @@ function install_begin_request(&$install_state) {
     $container->register('language_manager', 'Drupal\Core\Language\LanguageManager');
 
     // Register the translation services.
-    $container->register('string_translator.custom_strings', 'Drupal\Core\StringTranslation\Translator\CustomStrings')
-      ->addTag('string_translator');
-    $container->register('string_translation', 'Drupal\Core\StringTranslation\TranslationManager');
+    install_register_translation_service($container);
 
     foreach (array('bootstrap', 'config', 'cache', 'menu', 'page', 'path') as $bin) {
       $container
@@ -425,8 +435,6 @@ function install_begin_request(&$install_state) {
 
   // Set up $language, so t() caller functions will still work.
   drupal_language_initialize();
-  // Append file translation to the translation chain.
-  Drupal::translation()->addTranslator(install_file_translation_service());
   // Add in installation language if present.
   if (isset($install_state['parameters']['langcode'])) {
     Drupal::translation()->setDefaultLangcode($install_state['parameters']['langcode']);
@@ -718,14 +726,14 @@ function install_tasks($install_state) {
   // to the installation profile.
   $tasks = array(
     'install_select_language' => array(
-      'display_name' => st('Choose language'),
+      'display_name' => t('Choose language'),
       'run' => INSTALL_TASK_RUN_IF_REACHED,
     ),
     'install_download_translation' => array(
       'run' => $needs_download ? INSTALL_TASK_RUN_IF_REACHED : INSTALL_TASK_SKIP,
     ),
     'install_select_profile' => array(
-      'display_name' => st('Choose profile'),
+      'display_name' => t('Choose profile'),
       'display' => count($install_state['profiles']) != 1,
       'run' => INSTALL_TASK_RUN_IF_REACHED,
     ),
@@ -733,10 +741,10 @@ function install_tasks($install_state) {
       'run' => INSTALL_TASK_RUN_IF_REACHED,
     ),
     'install_verify_requirements' => array(
-      'display_name' => st('Verify requirements'),
+      'display_name' => t('Verify requirements'),
     ),
     'install_settings_form' => array(
-      'display_name' => st('Set up database'),
+      'display_name' => t('Set up database'),
       'type' => 'form',
       // Even though the form only allows the user to enter database settings,
       // we still need to display it if settings.php is invalid in any way,
@@ -749,17 +757,17 @@ function install_tasks($install_state) {
       'run' => INSTALL_TASK_RUN_IF_REACHED,
     ),
     'install_profile_modules' => array(
-      'display_name' => count($install_state['profiles']) == 1 ? st('Install site') : st('Installation profile'),
+      'display_name' => count($install_state['profiles']) == 1 ? t('Install site') : t('Installation profile'),
       'type' => 'batch',
     ),
     'install_import_translations' => array(
-      'display_name' => st('Set up translations'),
+      'display_name' => t('Set up translations'),
       'display' => $needs_translations,
       'type' => 'batch',
       'run' => $needs_translations ? INSTALL_TASK_RUN_IF_NOT_COMPLETED : INSTALL_TASK_SKIP,
     ),
     'install_configure_form' => array(
-      'display_name' => st('Configure site'),
+      'display_name' => t('Configure site'),
       'type' => 'form',
     ),
   );
@@ -785,19 +793,19 @@ function install_tasks($install_state) {
   // Finish by adding the remaining core tasks.
   $tasks += array(
     'install_import_translations_remaining' => array(
-      'display_name' => st('Finish translations'),
+      'display_name' => t('Finish translations'),
       'display' => $needs_translations,
       'type' => 'batch',
       'run' => $needs_translations ? INSTALL_TASK_RUN_IF_NOT_COMPLETED : INSTALL_TASK_SKIP,
     ),
     'install_update_configuration_translations' => array(
-      'display_name' => st('Translate configuration'),
+      'display_name' => t('Translate configuration'),
       'display' => $needs_translations,
       'type' => 'batch',
       'run' => $needs_translations ? INSTALL_TASK_RUN_IF_NOT_COMPLETED : INSTALL_TASK_SKIP,
     ),
     'install_finished' => array(
-      'display_name' => st('Finished'),
+      'display_name' => t('Finished'),
     ),
   );
 
@@ -1041,21 +1049,21 @@ function install_settings_form($form, &$form_state, &$install_state) {
   $settings_file = $conf_path . '/settings.php';
   $database = isset($databases['default']['default']) ? $databases['default']['default'] : array();
 
-  drupal_set_title(st('Database configuration'));
+  drupal_set_title(t('Database configuration'));
 
   $drivers = drupal_get_database_types();
   $drivers_keys = array_keys($drivers);
 
   $form['driver'] = array(
     '#type' => 'radios',
-    '#title' => st('Database type'),
+    '#title' => t('Database type'),
     '#required' => TRUE,
     '#default_value' => !empty($database['driver']) ? $database['driver'] : current($drivers_keys),
-    '#description' => st('The type of database your @drupal data will be stored in.', array('@drupal' => drupal_install_profile_distribution_name())),
+    '#description' => t('The type of database your @drupal data will be stored in.', array('@drupal' => drupal_install_profile_distribution_name())),
   );
   if (count($drivers) == 1) {
     $form['driver']['#disabled'] = TRUE;
-    $form['driver']['#description'] .= ' ' . st('Your PHP configuration only supports a single database type, so it has been automatically selected.');
+    $form['driver']['#description'] .= ' ' . t('Your PHP configuration only supports a single database type, so it has been automatically selected.');
   }
 
   // Add driver specific configuration options.
@@ -1063,7 +1071,7 @@ function install_settings_form($form, &$form_state, &$install_state) {
     $form['driver']['#options'][$key] = $driver->name();
 
     $form['settings'][$key] = $driver->getFormOptions($database);
-    $form['settings'][$key]['#prefix'] = '<h2 class="js-hide">' . st('@driver_name settings', array('@driver_name' => $driver->name())) . '</h2>';
+    $form['settings'][$key]['#prefix'] = '<h2 class="js-hide">' . t('@driver_name settings', array('@driver_name' => $driver->name())) . '</h2>';
     $form['settings'][$key]['#type'] = 'container';
     $form['settings'][$key]['#tree'] = TRUE;
     $form['settings'][$key]['advanced_options']['#parents'] = array($key);
@@ -1077,7 +1085,7 @@ function install_settings_form($form, &$form_state, &$install_state) {
   $form['actions'] = array('#type' => 'actions');
   $form['actions']['save'] = array(
     '#type' => 'submit',
-    '#value' => st('Save and continue'),
+    '#value' => t('Save and continue'),
     '#limit_validation_errors' => array(
       array('driver'),
       array(isset($form_state['input']['driver']) ? $form_state['input']['driver'] : current($drivers_keys)),
@@ -1137,7 +1145,7 @@ function install_database_errors($database, $settings_file) {
   $database_types = drupal_get_database_types();
   $driver = $database['driver'];
   if (!isset($database_types[$driver])) {
-    $errors['driver'] = st("In your %settings_file file you have configured @drupal to use a %driver server, however your PHP installation currently does not support this database type.", array('%settings_file' => $settings_file, '@drupal' => drupal_install_profile_distribution_name(), '%driver' => $driver));
+    $errors['driver'] = t("In your %settings_file file you have configured @drupal to use a %driver server, however your PHP installation currently does not support this database type.", array('%settings_file' => $settings_file, '@drupal' => drupal_install_profile_distribution_name(), '%driver' => $driver));
   }
   else {
     // Run driver specific validation
@@ -1246,7 +1254,7 @@ function install_select_profile(&$install_state) {
       // URL.
       if ($install_state['interactive']) {
         include_once __DIR__ . '/form.inc';
-        drupal_set_title(st('Select an installation profile'));
+        drupal_set_title(t('Select an installation profile'));
         $form = drupal_get_form('install_select_profile_form', $install_state);
         return drupal_render($form);
       }
@@ -1354,22 +1362,22 @@ function install_select_profile_form($form, &$form_state, $install_state) {
   }
 
   // The profile name and description are extracted for translation from the
-  // .info file, so we can use st() on them even though they are dynamic data
+  // .info file, so we can use t() on them even though they are dynamic data
   // at this point.
   $form['profile'] = array(
     '#type' => 'radios',
-    '#title' => st('Select an installation profile'),
+    '#title' => t('Select an installation profile'),
     '#title_display' => 'invisible',
-    '#options' => array_map('st', $names),
+    '#options' => array_map('t', $names),
     '#default_value' => 'standard',
   );
   foreach (array_keys($names) as $profile) {
-    $form['profile'][$profile]['#description'] = isset($profiles[$profile]['description']) ? st($profiles[$profile]['description']) : '';
+    $form['profile'][$profile]['#description'] = isset($profiles[$profile]['description']) ? t($profiles[$profile]['description']) : '';
   }
   $form['actions'] = array('#type' => 'actions');
   $form['actions']['submit'] =  array(
     '#type' => 'submit',
-    '#value' => st('Save and continue'),
+    '#value' => t('Save and continue'),
   );
   return $form;
 }
@@ -1385,7 +1393,7 @@ function install_select_profile_form($form, &$form_state, $install_state) {
  */
 function install_find_translations() {
   $translations = array();
-  $files = install_file_translation_service()->findTranslationFiles();
+  $files = Drupal::service('string_translator.file_translation')->findTranslationFiles();
   // English does not need a translation file.
   array_unshift($files, (object) array('name' => 'en'));
   foreach ($files as $uri => $file) {
@@ -1408,19 +1416,43 @@ function install_find_translations() {
  */
 function install_file_translation_service() {
   static $translation;
-
   if (!isset($translation)) {
-    if (isset($GLOBALS['conf']['locale.settings']['translation.path'])) {
-      $directory = $GLOBALS['conf']['locale.settings']['translation.path'];
-    }
-    else {
-      $directory = conf_path() . '/files/translations';
-    }
-    $translation = new FileTranslation($directory);
+    $translation = new FileTranslation(install_translations_directory());
   }
   return $translation;
 }
 
+/**
+ * Finds the translations directory for the installation.
+ *
+ * @return string
+ *   The path to the installation directory.
+ */
+function install_translations_directory() {
+  if (isset($GLOBALS['conf']['locale.settings']['translation.path'])) {
+    $directory = $GLOBALS['conf']['locale.settings']['translation.path'];
+  }
+  else {
+    $directory = conf_path() . '/files/translations';
+  }
+  return $directory;
+}
+
+/**
+ * Build a file translation service for installation.
+ *
+ * @param \Symfony\Component\DependencyInjection\ContainerBuilder $container
+ *   The container to append translation related services.
+ */
+function install_register_translation_service(ContainerBuilder $container) {
+  $container->register('string_translator.file_translation', 'Drupal\Core\StringTranslation\Translator\FileTranslation')
+    ->addArgument(install_translations_directory())
+    ->addTag('string_translator');
+  $container->register('string_translator.custom_strings', 'Drupal\Core\StringTranslation\Translator\CustomStrings')
+    ->addTag('string_translator');
+  $container->register('string_translation', 'Drupal\Core\StringTranslation\TranslationManager');
+}
+
 /**
  * Selects which language to use during installation.
  *
@@ -1462,7 +1494,7 @@ function install_select_language(&$install_state) {
     // translation files were found the form shows a select list of the
     // corresponding languages to choose from.
     if ($install_state['interactive']) {
-      drupal_set_title(st('Choose language'));
+      drupal_set_title(t('Choose language'));
       include_once __DIR__ . '/form.inc';
       $elements = drupal_get_form('install_select_language_form', count($files) > 1 ? $files : array());
       return drupal_render($elements);
@@ -1525,7 +1557,7 @@ function install_select_language_form($form, &$form_state, $files = array()) {
   $browser_langcode = language_from_browser($browser_options);
   $form['langcode'] = array(
     '#type' => 'select',
-    '#title' => st('Choose language'),
+    '#title' => t('Choose language'),
     '#title_display' => 'invisible',
     '#options' => $select_options,
     // Use the browser detected language as default or English if nothing found.
@@ -1541,7 +1573,7 @@ function install_select_language_form($form, &$form_state, $files = array()) {
   $form['actions'] = array('#type' => 'actions');
   $form['actions']['submit'] =  array(
     '#type' => 'submit',
-    '#value' => st('Save and continue'),
+    '#value' => t('Save and continue'),
   );
   return $form;
 }
@@ -1666,7 +1698,7 @@ function install_get_localization_release() {
  */
 function install_no_profile_error() {
   drupal_set_title(st('No profiles available'));
-  return st('We were unable to find any installation profiles. Installation profiles tell us what modules to enable and what schema to install in the database. A profile is necessary to continue with the installation process.');
+  return t('We were unable to find any installation profiles. Installation profiles tell us what modules to enable and what schema to install in the database. A profile is necessary to continue with the installation process.');
 }
 
 /**
@@ -1676,7 +1708,7 @@ function install_already_done_error() {
   global $base_url;
 
   drupal_set_title(st('Drupal already installed'));
-  return st('<ul><li>To start over, you must empty your existing database, delete your active configuration, and copy <em>default.settings.php</em> over <em>settings.php</em>.</li><li>To install to a different database, edit the appropriate <em>settings.php</em> file in the <em>sites</em> folder.</li><li>To locate your active configuration, view the appropriate <em>settings.php</em> file in the <em>sites</em> folder.</em></li></li><li>To upgrade an existing installation, proceed to the <a href="@base-url/core/update.php">update script</a>.</li><li>View your <a href="@base-url">existing site</a>.</li></ul>', array('@base-url' => $base_url));
+  return t('<ul><li>To start over, you must empty your existing database, delete your active configuration, and copy <em>default.settings.php</em> over <em>settings.php</em>.</li><li>To install to a different database, edit the appropriate <em>settings.php</em> file in the <em>sites</em> folder.</li><li>To locate your active configuration, view the appropriate <em>settings.php</em> file in the <em>sites</em> folder.</em></li></li><li>To upgrade an existing installation, proceed to the <a href="@base-url/core/update.php">update script</a>.</li><li>View your <a href="@base-url">existing site</a>.</li></ul>', array('@base-url' => $base_url));
 }
 
 /**
@@ -1755,8 +1787,8 @@ function install_profile_modules(&$install_state) {
   }
   $batch = array(
     'operations' => $operations,
-    'title' => st('Installing @drupal', array('@drupal' => drupal_install_profile_distribution_name())),
-    'error_message' => st('The installation has encountered an error.'),
+    'title' => t('Installing @drupal', array('@drupal' => drupal_install_profile_distribution_name())),
+    'error_message' => t('The installation has encountered an error.'),
     'finished' => '_install_profile_modules_finished',
   );
   return $batch;
@@ -1841,7 +1873,7 @@ function _install_prepare_import() {
  * @ingroup forms
  */
 function install_configure_form($form, &$form_state, &$install_state) {
-  drupal_set_title(st('Configure site'));
+  drupal_set_title(t('Configure site'));
 
   // Warn about settings.php permissions risk
   $settings_dir = conf_path();
@@ -1854,7 +1886,7 @@ function install_configure_form($form, &$form_state, &$install_state) {
   // distract from the message that the Drupal installation has completed
   // successfully.)
   if (empty($_POST) && (!drupal_verify_install_file(DRUPAL_ROOT . '/' . $settings_file, FILE_EXIST|FILE_READABLE|FILE_NOT_WRITABLE) || !drupal_verify_install_file(DRUPAL_ROOT . '/' . $settings_dir, FILE_NOT_WRITABLE, 'dir'))) {
-    drupal_set_message(st('All necessary changes to %dir and %file have been made, so you should remove write permissions to them now in order to avoid security risks. If you are unsure how to do so, consult the <a href="@handbook_url">online handbook</a>.', array('%dir' => $settings_dir, '%file' => $settings_file, '@handbook_url' => 'http://drupal.org/server-permissions')), 'warning');
+    drupal_set_message(t('All necessary changes to %dir and %file have been made, so you should remove write permissions to them now in order to avoid security risks. If you are unsure how to do so, consult the <a href="@handbook_url">online handbook</a>.', array('%dir' => $settings_dir, '%file' => $settings_file, '@handbook_url' => 'http://drupal.org/server-permissions')), 'warning');
   }
 
   drupal_add_library('system', 'drupal.system');
@@ -1943,10 +1975,10 @@ function install_finished(&$install_state) {
   // registered by the installation profile are registered correctly.
   drupal_flush_all_caches();
 
-  drupal_set_title(st('@drupal installation complete', array('@drupal' => drupal_install_profile_distribution_name())), PASS_THROUGH);
+  drupal_set_title(t('@drupal installation complete', array('@drupal' => drupal_install_profile_distribution_name())), PASS_THROUGH);
 
   $messages = drupal_set_message();
-  $output = '<p>' . st('Congratulations, you installed @drupal!', array('@drupal' => drupal_install_profile_distribution_name())) . '</p>';
+  $output = '<p>' . t('Congratulations, you installed @drupal!', array('@drupal' => drupal_install_profile_distribution_name())) . '</p>';
   // Ensure the URL that is generated for the home page does not have 'install.php'
   // in it.
   $request = Request::createFromGlobals();
@@ -1954,7 +1986,7 @@ function install_finished(&$install_state) {
   $generator->setBasePath(str_replace('/core', '', $request->getBasePath()) . '/');
   $generator->setScriptPath('');
   $url = $generator->generateFromPath('');
-  $output .= '<p>' . (isset($messages['error']) ? st('Review the messages above before visiting <a href="@url">your new site</a>.', array('@url' => $url)) : st('<a href="@url">Visit your new site</a>.', array('@url' => $url))) . '</p>';
+  $output .= '<p>' . (isset($messages['error']) ? t('Review the messages above before visiting <a href="@url">your new site</a>.', array('@url' => $url)) : t('<a href="@url">Visit your new site</a>.', array('@url' => $url))) . '</p>';
 
   // Run cron to populate update status tables (if available) so that users
   // will be warned if they've installed an out of date Drupal version.
@@ -1979,7 +2011,7 @@ function _install_module_batch($module, $module_name, &$context) {
   // steps.
   module_enable(array($module), FALSE);
   $context['results'][] = $module;
-  $context['message'] = st('Installed %module module.', array('%module' => $module_name));
+  $context['message'] = t('Installed %module module.', array('%module' => $module_name));
 }
 
 /**
@@ -2048,39 +2080,39 @@ function install_check_translations($install_state) {
   // If the translations directory does not exists, throw an error.
   if (!$translations_directory_exists) {
     $requirements['translations directory exists'] = array(
-      'title'       => st('Translations directory'),
-      'value'       => st('The translations directory does not exist.'),
+      'title'       => t('Translations directory'),
+      'value'       => t('The translations directory does not exist.'),
       'severity'    => REQUIREMENT_ERROR,
-      'description' => st('The installer requires that you create a translations directory as part of the installation process. Create the directory %translations_directory . More details about installing Drupal are available in <a href="@install_txt">INSTALL.txt</a>.', array('%translations_directory' => $translations_directory, '@install_txt' => base_path() . 'core/INSTALL.txt')),
+      'description' => t('The installer requires that you create a translations directory as part of the installation process. Create the directory %translations_directory . More details about installing Drupal are available in <a href="@install_txt">INSTALL.txt</a>.', array('%translations_directory' => $translations_directory, '@install_txt' => base_path() . 'core/INSTALL.txt')),
     );
   }
   else {
     $requirements['translations directory exists'] = array(
-      'title'       => st('Translations directory'),
-      'value'       => st('The diretory %translations_directory exists.', array('%translations_directory' => $translations_directory)),
+      'title'       => t('Translations directory'),
+      'value'       => t('The diretory %translations_directory exists.', array('%translations_directory' => $translations_directory)),
     );
     // If the translations directory is not readable, throw an error.
     if (!$readable) {
       $requirements['translations directory readable'] = array(
-        'title'       => st('Translations directory'),
-        'value'       => st('The translations directory is not readable.'),
+        'title'       => t('Translations directory'),
+        'value'       => t('The translations directory is not readable.'),
         'severity'    => REQUIREMENT_ERROR,
-        'description' => st('The installer requires read permissions to %translations_directory at all times. If you are unsure how to grant file permissions, consult the <a href="@handbook_url">online handbook</a>.', array('%translations_directory' => $translations_directory, '@handbook_url' => 'http://drupal.org/server-permissions')),
+        'description' => t('The installer requires read permissions to %translations_directory at all times. If you are unsure how to grant file permissions, consult the <a href="@handbook_url">online handbook</a>.', array('%translations_directory' => $translations_directory, '@handbook_url' => 'http://drupal.org/server-permissions')),
       );
     }
     // If translations directory is not writable, throw an error.
     if (!$writable) {
       $requirements['translations directory writable'] = array(
-        'title'       => st('Translations directory'),
-        'value'       => st('The translations directory is not writable.'),
+        'title'       => t('Translations directory'),
+        'value'       => t('The translations directory is not writable.'),
         'severity'    => REQUIREMENT_ERROR,
-        'description' => st('The installer requires write permissions to %translations_directory during the installation process. If you are unsure how to grant file permissions, consult the <a href="@handbook_url">online handbook</a>.', array('%translations_directory' => $translations_directory, '@handbook_url' => 'http://drupal.org/server-permissions')),
+        'description' => t('The installer requires write permissions to %translations_directory during the installation process. If you are unsure how to grant file permissions, consult the <a href="@handbook_url">online handbook</a>.', array('%translations_directory' => $translations_directory, '@handbook_url' => 'http://drupal.org/server-permissions')),
       );
     }
     else {
       $requirements['translations directory writable'] = array(
-        'title'       => st('Translations directory'),
-        'value'       => st('The translations directory is writable.'),
+        'title'       => t('Translations directory'),
+        'value'       => t('The translations directory is writable.'),
       );
     }
   }
@@ -2088,31 +2120,31 @@ function install_check_translations($install_state) {
   // If the translations server can not be contacted, throw an error.
   if (!$online) {
     $requirements['online'] = array(
-      'title'       => st('Internet'),
-      'value'       => st('The translation server is offline.'),
+      'title'       => t('Internet'),
+      'value'       => t('The translation server is offline.'),
       'severity'    => REQUIREMENT_ERROR,
-      'description' => st('The installer requires to contact the translation server to download a translation file. Check your internet connection and verify that your website can reach the translation server at <a href="!server_url">!server_url</a>.', array('!server_url' => $server_url)),
+      'description' => t('The installer requires to contact the translation server to download a translation file. Check your internet connection and verify that your website can reach the translation server at <a href="!server_url">!server_url</a>.', array('!server_url' => $server_url)),
     );
   }
   else {
     $requirements['online'] = array(
-      'title'       => st('Internet'),
-      'value'       => st('The translation server is online.'),
+      'title'       => t('Internet'),
+      'value'       => t('The translation server is online.'),
     );
     // If translation file is not found at the translation server, throw an
     // error.
     if (!$translation_available) {
       $requirements['translation available'] = array(
-        'title'       => st('Translation'),
-        'value'       => st('The %language translation is not available.', array('%language' => $language)),
+        'title'       => t('Translation'),
+        'value'       => t('The %language translation is not available.', array('%language' => $language)),
         'severity'    => REQUIREMENT_ERROR,
-        'description' => st('The %language translation file is not available at the translation server. <a href="!url">Choose a different language</a> or select English and translate your website later.', array('%language' => $language, '!url' => check_url($_SERVER['SCRIPT_NAME']))),
+        'description' => t('The %language translation file is not available at the translation server. <a href="!url">Choose a different language</a> or select English and translate your website later.', array('%language' => $language, '!url' => check_url($_SERVER['SCRIPT_NAME']))),
       );
     }
     else {
       $requirements['translation available'] = array(
-        'title'       => st('Translation'),
-        'value'       => st('The %language translation is available.', array('%language' => $language)),
+        'title'       => t('Translation'),
+        'value'       => t('The %language translation is available.', array('%language' => $language)),
       );
     }
   }
@@ -2122,10 +2154,10 @@ function install_check_translations($install_state) {
 
     if (!$translation_downloaded) {
       $requirements['translation downloaded'] = array(
-        'title'       => st('Translation'),
-        'value'       => st('The %language translation could not be downloaded.', array('%language' => $language)),
+        'title'       => t('Translation'),
+        'value'       => t('The %language translation could not be downloaded.', array('%language' => $language)),
         'severity'    => REQUIREMENT_ERROR,
-        'description' => st('The %language translation file could not be downloaded. <a href="!url">Choose a different language</a> or select English and translate your website later.', array('%language' => $language, '!url' => check_url($_SERVER['SCRIPT_NAME']))),
+        'description' => t('The %language translation file could not be downloaded. <a href="!url">Choose a different language</a> or select English and translate your website later.', array('%language' => $language, '!url' => check_url($_SERVER['SCRIPT_NAME']))),
       );
     }
   }
@@ -2167,10 +2199,10 @@ function install_check_requirements($install_state) {
     // error.
     if (!drupal_verify_install_file($default_settings_file, FILE_EXIST|FILE_READABLE)) {
       $requirements['default settings file exists'] = array(
-        'title'       => st('Default settings file'),
-        'value'       => st('The default settings file does not exist.'),
+        'title'       => t('Default settings file'),
+        'value'       => t('The default settings file does not exist.'),
         'severity'    => REQUIREMENT_ERROR,
-        'description' => st('The @drupal installer requires that the %default-file file not be modified in any way from the original download.', array('@drupal' => drupal_install_profile_distribution_name(), '%default-file' => $default_settings_file)),
+        'description' => t('The @drupal installer requires that the %default-file file not be modified in any way from the original download.', array('@drupal' => drupal_install_profile_distribution_name(), '%default-file' => $default_settings_file)),
       );
     }
     // Otherwise, if settings.php does not exist yet, we can try to copy
@@ -2222,47 +2254,47 @@ function install_check_requirements($install_state) {
     // If settings.php does not exist, throw an error.
     if (!$exists) {
       $requirements['settings file exists'] = array(
-        'title'       => st('Settings file'),
-        'value'       => st('The settings file does not exist.'),
+        'title'       => t('Settings file'),
+        'value'       => t('The settings file does not exist.'),
         'severity'    => REQUIREMENT_ERROR,
-        'description' => st('The @drupal installer requires that you create a settings file as part of the installation process. Copy the %default_file file to %file. More details about installing Drupal are available in <a href="@install_txt">INSTALL.txt</a>.', array('@drupal' => drupal_install_profile_distribution_name(), '%file' => $file, '%default_file' => $default_settings_file, '@install_txt' => base_path() . 'core/INSTALL.txt')),
+        'description' => t('The @drupal installer requires that you create a settings file as part of the installation process. Copy the %default_file file to %file. More details about installing Drupal are available in <a href="@install_txt">INSTALL.txt</a>.', array('@drupal' => drupal_install_profile_distribution_name(), '%file' => $file, '%default_file' => $default_settings_file, '@install_txt' => base_path() . 'core/INSTALL.txt')),
       );
     }
     else {
       $requirements['settings file exists'] = array(
-        'title'       => st('Settings file'),
-        'value'       => st('The %file file exists.', array('%file' => $file)),
+        'title'       => t('Settings file'),
+        'value'       => t('The %file file exists.', array('%file' => $file)),
       );
       // If settings.php is not readable, throw an error.
       if (!$readable) {
         $requirements['settings file readable'] = array(
-          'title'       => st('Settings file'),
-          'value'       => st('The settings file is not readable.'),
+          'title'       => t('Settings file'),
+          'value'       => t('The settings file is not readable.'),
           'severity'    => REQUIREMENT_ERROR,
-          'description' => st('@drupal requires read permissions to %file at all times. If you are unsure how to grant file permissions, consult the <a href="@handbook_url">online handbook</a>.', array('@drupal' => drupal_install_profile_distribution_name(), '%file' => $file, '@handbook_url' => 'http://drupal.org/server-permissions')),
+          'description' => t('@drupal requires read permissions to %file at all times. If you are unsure how to grant file permissions, consult the <a href="@handbook_url">online handbook</a>.', array('@drupal' => drupal_install_profile_distribution_name(), '%file' => $file, '@handbook_url' => 'http://drupal.org/server-permissions')),
         );
       }
       // If settings.php is not writable, throw an error.
       if (!$writable) {
         $requirements['settings file writable'] = array(
-          'title'       => st('Settings file'),
-          'value'       => st('The settings file is not writable.'),
+          'title'       => t('Settings file'),
+          'value'       => t('The settings file is not writable.'),
           'severity'    => REQUIREMENT_ERROR,
-          'description' => st('The @drupal installer requires write permissions to %file during the installation process. If you are unsure how to grant file permissions, consult the <a href="@handbook_url">online handbook</a>.', array('@drupal' => drupal_install_profile_distribution_name(), '%file' => $file, '@handbook_url' => 'http://drupal.org/server-permissions')),
+          'description' => t('The @drupal installer requires write permissions to %file during the installation process. If you are unsure how to grant file permissions, consult the <a href="@handbook_url">online handbook</a>.', array('@drupal' => drupal_install_profile_distribution_name(), '%file' => $file, '@handbook_url' => 'http://drupal.org/server-permissions')),
         );
       }
       else {
         $requirements['settings file'] = array(
-          'title'       => st('Settings file'),
-          'value'       => st('The settings file is writable.'),
+          'title'       => t('Settings file'),
+          'value'       => t('The settings file is writable.'),
         );
       }
       if (!empty($settings_file_ownership_error)) {
         $requirements['settings file ownership'] = array(
-          'title'       => st('Settings file'),
-          'value'       => st('The settings file is owned by the web server.'),
+          'title'       => t('Settings file'),
+          'value'       => t('The settings file is owned by the web server.'),
           'severity'    => REQUIREMENT_ERROR,
-          'description' => st('The @drupal installer failed to create a settings file with proper file ownership. Log on to your web server, remove the existing %file file, and create a new one by copying the %default_file file to %file. More details about installing Drupal are available in <a href="@install_txt">INSTALL.txt</a>. If you have problems with the file permissions on your server, consult the <a href="@handbook_url">online handbook</a>.', array('@drupal' => drupal_install_profile_distribution_name(), '%file' => $file, '%default_file' => $default_settings_file, '@install_txt' => base_path() . 'core/INSTALL.txt', '@handbook_url' => 'http://drupal.org/server-permissions')),
+          'description' => t('The @drupal installer failed to create a settings file with proper file ownership. Log on to your web server, remove the existing %file file, and create a new one by copying the %default_file file to %file. More details about installing Drupal are available in <a href="@install_txt">INSTALL.txt</a>. If you have problems with the file permissions on your server, consult the <a href="@handbook_url">online handbook</a>.', array('@drupal' => drupal_install_profile_distribution_name(), '%file' => $file, '%default_file' => $default_settings_file, '@install_txt' => base_path() . 'core/INSTALL.txt', '@handbook_url' => 'http://drupal.org/server-permissions')),
         );
       }
     }
@@ -2297,9 +2329,9 @@ function install_display_requirements($install_state, $requirements) {
   // and indicating a desire to continue anyway. See drupal_requirements_url().
   if ($severity == REQUIREMENT_ERROR || ($severity == REQUIREMENT_WARNING && empty($install_state['parameters']['continue']))) {
     if ($install_state['interactive']) {
-      drupal_set_title(st('Requirements problem'));
+      drupal_set_title(t('Requirements problem'));
       $status_report = theme('status_report', array('requirements' => $requirements));
-      $status_report .= st('Check the messages and <a href="!url">try again</a>.', array('!url' => check_url(drupal_requirements_url($severity))));
+      $status_report .= t('Check the messages and <a href="!url">try again</a>.', array('!url' => check_url(drupal_requirements_url($severity))));
       return $status_report;
     }
     else {
@@ -2334,32 +2366,32 @@ function install_display_requirements($install_state, $requirements) {
 function _install_configure_form($form, &$form_state, &$install_state) {
   $form['site_information'] = array(
     '#type' => 'details',
-    '#title' => st('Site information'),
+    '#title' => t('Site information'),
   );
   $form['site_information']['site_name'] = array(
     '#type' => 'textfield',
-    '#title' => st('Site name'),
+    '#title' => t('Site name'),
     '#required' => TRUE,
     '#weight' => -20,
   );
   $form['site_information']['site_mail'] = array(
     '#type' => 'email',
-    '#title' => st('Site e-mail address'),
+    '#title' => t('Site e-mail address'),
     '#default_value' => ini_get('sendmail_from'),
-    '#description' => st("Automated e-mails, such as registration information, will be sent from this address. Use an address ending in your site's domain to help prevent these e-mails from being flagged as spam."),
+    '#description' => t("Automated e-mails, such as registration information, will be sent from this address. Use an address ending in your site's domain to help prevent these e-mails from being flagged as spam."),
     '#required' => TRUE,
     '#weight' => -15,
   );
   $form['admin_account'] = array(
     '#type' => 'details',
-    '#title' => st('Site maintenance account'),
+    '#title' => t('Site maintenance account'),
   );
 
   $form['admin_account']['account']['#tree'] = TRUE;
   $form['admin_account']['account']['name'] = array('#type' => 'textfield',
-    '#title' => st('Username'),
+    '#title' => t('Username'),
     '#maxlength' => USERNAME_MAX_LENGTH,
-    '#description' => st('Spaces are allowed; punctuation is not allowed except for periods, hyphens, and underscores.'),
+    '#description' => t('Spaces are allowed; punctuation is not allowed except for periods, hyphens, and underscores.'),
     '#required' => TRUE,
     '#weight' => -10,
     '#attributes' => array('class' => array('username')),
@@ -2367,7 +2399,7 @@ function _install_configure_form($form, &$form_state, &$install_state) {
 
   $form['admin_account']['account']['mail'] = array(
     '#type' => 'email',
-    '#title' => st('E-mail address'),
+    '#title' => t('E-mail address'),
     '#required' => TRUE,
     '#weight' => -5,
   );
@@ -2380,42 +2412,42 @@ function _install_configure_form($form, &$form_state, &$install_state) {
 
   $form['server_settings'] = array(
     '#type' => 'details',
-    '#title' => st('Server settings'),
+    '#title' => t('Server settings'),
   );
 
   $countries = Drupal::service('country_manager')->getList();
   $form['server_settings']['site_default_country'] = array(
     '#type' => 'select',
-    '#title' => st('Default country'),
+    '#title' => t('Default country'),
     '#empty_value' => '',
     '#default_value' => config('system.date')->get('country.default'),
     '#options' => $countries,
-    '#description' => st('Select the default country for the site.'),
+    '#description' => t('Select the default country for the site.'),
     '#weight' => 0,
   );
 
   $form['server_settings']['date_default_timezone'] = array(
     '#type' => 'select',
-    '#title' => st('Default time zone'),
+    '#title' => t('Default time zone'),
     '#default_value' => date_default_timezone_get(),
     '#options' => system_time_zones(),
-    '#description' => st('By default, dates in this site will be displayed in the chosen time zone.'),
+    '#description' => t('By default, dates in this site will be displayed in the chosen time zone.'),
     '#weight' => 5,
     '#attributes' => array('class' => array('timezone-detect')),
   );
 
   $form['update_notifications'] = array(
     '#type' => 'details',
-    '#title' => st('Update notifications'),
+    '#title' => t('Update notifications'),
   );
   $form['update_notifications']['update_status_module'] = array(
     '#type' => 'checkboxes',
     '#options' => array(
-      1 => st('Check for updates automatically'),
-      2 => st('Receive e-mail notifications'),
+      1 => t('Check for updates automatically'),
+      2 => t('Receive e-mail notifications'),
     ),
     '#default_value' => array(1, 2),
-    '#description' => st('The system will notify you when updates and important security releases are available for installed components. Anonymous information about your site is sent to <a href="@drupal">Drupal.org</a>.', array('@drupal' => 'http://drupal.org')),
+    '#description' => t('The system will notify you when updates and important security releases are available for installed components. Anonymous information about your site is sent to <a href="@drupal">Drupal.org</a>.', array('@drupal' => 'http://drupal.org')),
     '#weight' => 15,
   );
   $form['update_notifications']['update_status_module'][2] = array(
@@ -2429,7 +2461,7 @@ function _install_configure_form($form, &$form_state, &$install_state) {
   $form['actions'] = array('#type' => 'actions');
   $form['actions']['submit'] = array(
     '#type' => 'submit',
-    '#value' => st('Save and continue'),
+    '#value' => t('Save and continue'),
     '#weight' => 15,
   );
 
diff --git a/core/includes/install.inc b/core/includes/install.inc
index 503b3da05c82..41dc7e7de61e 100644
--- a/core/includes/install.inc
+++ b/core/includes/install.inc
@@ -9,8 +9,6 @@
 use Drupal\Component\Utility\Crypt;
 use Drupal\Core\Database\Database;
 use Drupal\Core\DrupalKernel;
-use Drupal\Core\StringTranslation\TranslationManager;
-use Drupal\Core\StringTranslation\Translator\CustomStrings;
 
 /**
  * Requirement severity -- Informational message only.
@@ -600,10 +598,10 @@ function drupal_verify_profile($install_state) {
       $modules[] = '<span class="admin-missing">' . drupal_ucfirst($module) . '</span>';
     }
     $requirements['required_modules'] = array(
-      'title'       => st('Required modules'),
-      'value'       => st('Required modules not found.'),
+      'title'       => t('Required modules'),
+      'value'       => t('Required modules not found.'),
       'severity'    => REQUIREMENT_ERROR,
-      'description' => st('The following modules are required but were not found. Move them into the appropriate modules subdirectory, such as <em>/modules</em>. Missing modules: !modules', array('!modules' => implode(', ', $modules))),
+      'description' => t('The following modules are required but were not found. Move them into the appropriate modules subdirectory, such as <em>/modules</em>. Missing modules: !modules', array('!modules' => implode(', ', $modules))),
     );
   }
   return $requirements;
@@ -930,45 +928,6 @@ function drupal_requirements_url($severity) {
   return drupal_current_script_url($query);
 }
 
-/**
- * Translates a string when some systems are not available.
- *
- * Used during the install process, when database, theme, and localization
- * system is possibly not yet available.
- *
- * Use t() if your code will never run during the Drupal installation phase.
- * Use st() if your code will only run during installation and never any other
- * time. Use get_t() if your code could run in either circumstance.
- *
- * @see t()
- * @see get_t()
- * @ingroup sanitization
- */
-function st($string, array $args = array(), array $options = array()) {
-  global $install_state;
-  static $install_translation;
-
-  // This may be invoked before the container has been initialized.
-  $container = Drupal::getContainer();
-  if ($container && $container->has('translation')) {
-    // Since the container is properly initialized, we can use standard translation.
-    return t($string, $args, $options);
-  }
-  elseif (drupal_installation_attempted() && isset($install_state['parameters']['langcode'])) {
-    // The translation service is not there yet, use a temporary one.
-    if (!isset($install_translation)) {
-      $install_translation = new TranslationManager();
-      foreach (array(new CustomStrings(), install_file_translation_service()) as $translator) {
-        $install_translation->addTranslator($translator);
-      }
-      $install_translation->setDefaultLangcode($install_state['parameters']['langcode']);
-    }
-    return $install_translation->translate($string, $args, $options);
-  }
-  // Just return an untraslated string.
-  return format_string($string, $args);
-}
-
 /**
  * Checks an installation profile's requirements.
  *
diff --git a/core/includes/theme.maintenance.inc b/core/includes/theme.maintenance.inc
index b9a513c8fce4..6a07c71e8de8 100644
--- a/core/includes/theme.maintenance.inc
+++ b/core/includes/theme.maintenance.inc
@@ -119,7 +119,6 @@ function _theme_load_offline_registry($theme, $base_theme = NULL, $theme_engine
  * @ingroup themeable
  */
 function theme_task_list($variables) {
-  $t = get_t();
   $items = $variables['items'];
   $active = $variables['active'];
 
@@ -130,12 +129,12 @@ function theme_task_list($variables) {
   foreach ($items as $k => $item) {
     if ($active == $k) {
       $class = 'active';
-      $status = '(' . $t('active') . ')';
+      $status = '(' . t('active') . ')';
       $done = FALSE;
     }
     else {
       $class = $done ? 'done' : '';
-      $status = $done ? '(' . $t('done') . ')' : '';
+      $status = $done ? '(' . t('done') . ')' : '';
     }
     $output .= '<li';
     $output .= ($class ? ' class="' . $class . '"' : '') . '>';
diff --git a/core/includes/unicode.inc b/core/includes/unicode.inc
index 1b9bcf15006c..9540d424293f 100644
--- a/core/includes/unicode.inc
+++ b/core/includes/unicode.inc
@@ -12,13 +12,10 @@
  * Returns Unicode library status and errors.
  */
 function unicode_requirements() {
-  // Ensure translations don't break during installation.
-  $t = get_t();
-
   $libraries = array(
-    Unicode::STATUS_SINGLEBYTE => $t('Standard PHP'),
-    Unicode::STATUS_MULTIBYTE => $t('PHP Mbstring Extension'),
-    Unicode::STATUS_ERROR => $t('Error'),
+    Unicode::STATUS_SINGLEBYTE => t('Standard PHP'),
+    Unicode::STATUS_MULTIBYTE => t('PHP Mbstring Extension'),
+    Unicode::STATUS_ERROR => t('Error'),
   );
   $severities = array(
     Unicode::STATUS_SINGLEBYTE => REQUIREMENT_WARNING,
@@ -29,30 +26,30 @@ function unicode_requirements() {
   $library = Unicode::getStatus();
 
   $requirements['unicode'] = array(
-    'title' => $t('Unicode library'),
+    'title' => t('Unicode library'),
     'value' => $libraries[$library],
     'severity' => $severities[$library],
   );
   $t_args = array('@url' => 'http://www.php.net/mbstring');
   switch ($failed_check) {
     case 'mb_strlen':
-      $requirements['unicode']['description'] = $t('Operations on Unicode strings are emulated on a best-effort basis. Install the <a href="@url">PHP mbstring extension</a> for improved Unicode support.', $t_args);
+      $requirements['unicode']['description'] = t('Operations on Unicode strings are emulated on a best-effort basis. Install the <a href="@url">PHP mbstring extension</a> for improved Unicode support.', $t_args);
       break;
 
     case 'mbstring.func_overload':
-      $requirements['unicode']['description'] = $t('Multibyte string function overloading in PHP is active and must be disabled. Check the php.ini <em>mbstring.func_overload</em> setting. Please refer to the <a href="@url">PHP mbstring documentation</a> for more information.', $t_args);
+      $requirements['unicode']['description'] = t('Multibyte string function overloading in PHP is active and must be disabled. Check the php.ini <em>mbstring.func_overload</em> setting. Please refer to the <a href="@url">PHP mbstring documentation</a> for more information.', $t_args);
       break;
 
     case 'mbstring.encoding_translation':
-      $requirements['unicode']['description'] = $t('Multibyte string input conversion in PHP is active and must be disabled. Check the php.ini <em>mbstring.encoding_translation</em> setting. Please refer to the <a href="@url">PHP mbstring documentation</a> for more information.', $t_args);
+      $requirements['unicode']['description'] = t('Multibyte string input conversion in PHP is active and must be disabled. Check the php.ini <em>mbstring.encoding_translation</em> setting. Please refer to the <a href="@url">PHP mbstring documentation</a> for more information.', $t_args);
       break;
 
     case 'mbstring.http_input':
-      $requirements['unicode']['description'] = $t('Multibyte string input conversion in PHP is active and must be disabled. Check the php.ini <em>mbstring.http_input</em> setting. Please refer to the <a href="@url">PHP mbstring documentation</a> for more information.', $t_args);
+      $requirements['unicode']['description'] = t('Multibyte string input conversion in PHP is active and must be disabled. Check the php.ini <em>mbstring.http_input</em> setting. Please refer to the <a href="@url">PHP mbstring documentation</a> for more information.', $t_args);
       break;
 
     case 'mbstring.http_output':
-      $requirements['unicode']['description'] = $t('Multibyte string output conversion in PHP is active and must be disabled. Check the php.ini <em>mbstring.http_output</em> setting. Please refer to the <a href="@url">PHP mbstring documentation</a> for more information.', $t_args);
+      $requirements['unicode']['description'] = t('Multibyte string output conversion in PHP is active and must be disabled. Check the php.ini <em>mbstring.http_output</em> setting. Please refer to the <a href="@url">PHP mbstring documentation</a> for more information.', $t_args);
       break;
   }
 
diff --git a/core/lib/Drupal/Component/Gettext/PoStreamReader.php b/core/lib/Drupal/Component/Gettext/PoStreamReader.php
index f611fbab0eb3..e3ac4b82ecd7 100644
--- a/core/lib/Drupal/Component/Gettext/PoStreamReader.php
+++ b/core/lib/Drupal/Component/Gettext/PoStreamReader.php
@@ -280,7 +280,6 @@ private function readLine() {
         '%uri' => $this->getURI(),
         '%line' => $this->_line_number,
       );
-      $t = get_t();
 
       // Trim away the linefeed. \\n might appear at the end of the string if
       // another line continuing the same string follows. We can remove that.
@@ -306,7 +305,7 @@ private function readLine() {
         }
         else {
           // A comment following any other context is a syntax error.
-          $this->_errors[] = $t('The translation stream %uri contains an error: "msgstr" was expected but not found on line %line.', $log_vars);
+          $this->_errors[] = t('The translation stream %uri contains an error: "msgstr" was expected but not found on line %line.', $log_vars);
           return FALSE;
         }
         return;
@@ -316,7 +315,7 @@ private function readLine() {
 
         if ($this->_context != 'MSGID') {
           // A plural form can only be added to an msgid directly.
-          $this->_errors[] = $t('The translation stream %uri contains an error: "msgid_plural" was expected but not found on line %line.', $log_vars);
+          $this->_errors[] = t('The translation stream %uri contains an error: "msgid_plural" was expected but not found on line %line.', $log_vars);
           return FALSE;
         }
 
@@ -327,7 +326,7 @@ private function readLine() {
         $quoted = $this->parseQuoted($line);
         if ($quoted === FALSE) {
           // The plural form must be wrapped in quotes.
-          $this->_errors[] = $t('The translation stream %uri contains a syntax error on line %line.', $log_vars);
+          $this->_errors[] = t('The translation stream %uri contains a syntax error on line %line.', $log_vars);
           return FALSE;
         }
 
@@ -354,7 +353,7 @@ private function readLine() {
         }
         elseif ($this->_context == 'MSGID') {
           // We are currently already in the context, meaning we passed an id with no data.
-          $this->_errors[] = $t('The translation stream %uri contains an error: "msgid" is unexpected on line %line.', $log_vars);
+          $this->_errors[] = t('The translation stream %uri contains an error: "msgid" is unexpected on line %line.', $log_vars);
           return FALSE;
         }
 
@@ -365,7 +364,7 @@ private function readLine() {
         $quoted = $this->parseQuoted($line);
         if ($quoted === FALSE) {
           // The message id must be wrapped in quotes.
-          $this->_errors[] = $t('The translation stream %uri contains an error: invalid format for "msgid" on line %line.', $log_vars, $log_vars);
+          $this->_errors[] = t('The translation stream %uri contains an error: invalid format for "msgid" on line %line.', $log_vars, $log_vars);
           return FALSE;
         }
 
@@ -383,7 +382,7 @@ private function readLine() {
         }
         elseif (!empty($this->_current_item['msgctxt'])) {
           // A context cannot apply to another context.
-          $this->_errors[] = $t('The translation stream %uri contains an error: "msgctxt" is unexpected on line %line.', $log_vars);
+          $this->_errors[] = t('The translation stream %uri contains an error: "msgctxt" is unexpected on line %line.', $log_vars);
           return FALSE;
         }
 
@@ -394,7 +393,7 @@ private function readLine() {
         $quoted = $this->parseQuoted($line);
         if ($quoted === FALSE) {
           // The context string must be quoted.
-          $this->_errors[] = $t('The translation stream %uri contains an error: invalid format for "msgctxt" on line %line.', $log_vars);
+          $this->_errors[] = t('The translation stream %uri contains an error: invalid format for "msgctxt" on line %line.', $log_vars);
           return FALSE;
         }
 
@@ -412,13 +411,13 @@ private function readLine() {
             ($this->_context != 'MSGSTR_ARR')) {
           // Plural message strings must come after msgid, msgxtxt,
           // msgid_plural, or other msgstr[] entries.
-          $this->_errors[] = $t('The translation stream %uri contains an error: "msgstr[]" is unexpected on line %line.', $log_vars);
+          $this->_errors[] = t('The translation stream %uri contains an error: "msgstr[]" is unexpected on line %line.', $log_vars);
           return FALSE;
         }
 
         // Ensure the plurality is terminated.
         if (strpos($line, ']') === FALSE) {
-          $this->_errors[] = $t('The translation stream %uri contains an error: invalid format for "msgstr[]" on line %line.', $log_vars);
+          $this->_errors[] = t('The translation stream %uri contains an error: invalid format for "msgstr[]" on line %line.', $log_vars);
           return FALSE;
         }
 
@@ -433,7 +432,7 @@ private function readLine() {
         $quoted = $this->parseQuoted($line);
         if ($quoted === FALSE) {
           // The string must be quoted.
-          $this->_errors[] = $t('The translation stream %uri contains an error: invalid format for "msgstr[]" on line %line.', $log_vars);
+          $this->_errors[] = t('The translation stream %uri contains an error: invalid format for "msgstr[]" on line %line.', $log_vars);
           return FALSE;
         }
         if (!isset($this->_current_item['msgstr']) || !is_array($this->_current_item['msgstr'])) {
@@ -450,7 +449,7 @@ private function readLine() {
 
         if (($this->_context != 'MSGID') && ($this->_context != 'MSGCTXT')) {
           // Strings are only valid within an id or context scope.
-          $this->_errors[] = $t('The translation stream %uri contains an error: "msgstr" is unexpected on line %line.', $log_vars);
+          $this->_errors[] = t('The translation stream %uri contains an error: "msgstr" is unexpected on line %line.', $log_vars);
           return FALSE;
         }
 
@@ -461,7 +460,7 @@ private function readLine() {
         $quoted = $this->parseQuoted($line);
         if ($quoted === FALSE) {
           // The string must be quoted.
-          $this->_errors[] = $t('The translation stream %uri contains an error: invalid format for "msgstr" on line %line.', $log_vars);
+          $this->_errors[] = t('The translation stream %uri contains an error: invalid format for "msgstr" on line %line.', $log_vars);
           return FALSE;
         }
 
@@ -476,7 +475,7 @@ private function readLine() {
         $quoted = $this->parseQuoted($line);
         if ($quoted === FALSE) {
           // This string must be quoted.
-          $this->_errors[] = $t('The translation stream %uri contains an error: string continuation expected on line %line.', $log_vars);
+          $this->_errors[] = t('The translation stream %uri contains an error: string continuation expected on line %line.', $log_vars);
           return FALSE;
         }
 
@@ -506,7 +505,7 @@ private function readLine() {
         }
         else {
           // No valid context to append to.
-          $this->_errors[] = $t('The translation stream %uri contains an error: unexpected string on line %line.', $log_vars);
+          $this->_errors[] = t('The translation stream %uri contains an error: unexpected string on line %line.', $log_vars);
           return FALSE;
         }
         return;
@@ -519,7 +518,7 @@ private function readLine() {
       $this->_current_item = array();
     }
     elseif ($this->_context != 'COMMENT') {
-      $this->_errors[] = $t('The translation stream %uri ended unexpectedly at line %line.', $log_vars);
+      $this->_errors[] = t('The translation stream %uri ended unexpectedly at line %line.', $log_vars);
       return FALSE;
     }
   }
diff --git a/core/lib/Drupal/Core/Database/Driver/mysql/Install/Tasks.php b/core/lib/Drupal/Core/Database/Driver/mysql/Install/Tasks.php
index 0f09aae82aaa..e4ecd9954b89 100644
--- a/core/lib/Drupal/Core/Database/Driver/mysql/Install/Tasks.php
+++ b/core/lib/Drupal/Core/Database/Driver/mysql/Install/Tasks.php
@@ -27,7 +27,7 @@ class Tasks extends InstallTasks {
    * Returns a human-readable name string for MySQL and equivalent databases.
    */
   public function name() {
-    return st('MySQL, MariaDB, or equivalent');
+    return t('MySQL, MariaDB, or equivalent');
   }
 
   /**
@@ -70,13 +70,13 @@ protected function connect() {
         catch (DatabaseNotFoundException $e) {
           // Still no dice; probably a permission issue. Raise the error to the
           // installer.
-          $this->fail(st('Database %database not found. The server reports the following message when attempting to create the database: %error.', array('%database' => $database, '%error' => $e->getMessage())));
+          $this->fail(t('Database %database not found. The server reports the following message when attempting to create the database: %error.', array('%database' => $database, '%error' => $e->getMessage())));
         }
       }
       else {
         // Database connection failed for some other reason than the database
         // not existing.
-        $this->fail(st('Failed to connect to your database server. The server reports the following message: %error.<ul><li>Is the database server running?</li><li>Does the database exist or does the database user have sufficient privileges to create the database?</li><li>Have you entered the correct database name?</li><li>Have you entered the correct username and password?</li><li>Have you entered the correct database hostname?</li></ul>', array('%error' => $e->getMessage())));
+        $this->fail(t('Failed to connect to your database server. The server reports the following message: %error.<ul><li>Is the database server running?</li><li>Does the database exist or does the database user have sufficient privileges to create the database?</li><li>Have you entered the correct database name?</li><li>Have you entered the correct username and password?</li><li>Have you entered the correct database hostname?</li></ul>', array('%error' => $e->getMessage())));
         return FALSE;
       }
     }
diff --git a/core/lib/Drupal/Core/Database/Driver/pgsql/Install/Tasks.php b/core/lib/Drupal/Core/Database/Driver/pgsql/Install/Tasks.php
index 1a053c0543a5..1c97985bb50c 100644
--- a/core/lib/Drupal/Core/Database/Driver/pgsql/Install/Tasks.php
+++ b/core/lib/Drupal/Core/Database/Driver/pgsql/Install/Tasks.php
@@ -34,7 +34,7 @@ public function __construct() {
   }
 
   public function name() {
-    return st('PostgreSQL');
+    return t('PostgreSQL');
   }
 
   public function minimumVersion() {
@@ -84,13 +84,13 @@ protected function connect() {
         catch (DatabaseNotFoundException $e) {
           // Still no dice; probably a permission issue. Raise the error to the
           // installer.
-          $this->fail(st('Database %database not found. The server reports the following message when attempting to create the database: %error.', array('%database' => $database, '%error' => $e->getMessage())));
+          $this->fail(t('Database %database not found. The server reports the following message when attempting to create the database: %error.', array('%database' => $database, '%error' => $e->getMessage())));
         }
       }
       else {
         // Database connection failed for some other reason than the database
         // not existing.
-        $this->fail(st('Failed to connect to your database server. The server reports the following message: %error.<ul><li>Is the database server running?</li><li>Does the database exist, and have you entered the correct database name?</li><li>Have you entered the correct username and password?</li><li>Have you entered the correct database hostname?</li></ul>', array('%error' => $e->getMessage())));
+        $this->fail(t('Failed to connect to your database server. The server reports the following message: %error.<ul><li>Is the database server running?</li><li>Does the database exist, and have you entered the correct database name?</li><li>Have you entered the correct username and password?</li><li>Have you entered the correct database hostname?</li></ul>', array('%error' => $e->getMessage())));
         return FALSE;
       }
     }
@@ -103,7 +103,7 @@ protected function connect() {
   protected function checkEncoding() {
     try {
       if (db_query('SHOW server_encoding')->fetchField() == 'UTF8') {
-        $this->pass(st('Database is encoded in UTF-8'));
+        $this->pass(t('Database is encoded in UTF-8'));
       }
       else {
         $replacements = array(
@@ -113,11 +113,11 @@ protected function checkEncoding() {
         );
         $text  = 'The %driver database must use %encoding encoding to work with Drupal.';
         $text .= 'Recreate the database with %encoding encoding. See !link for more details.';
-        $this->fail(st($text, $replacements));
+        $this->fail(t($text, $replacements));
       }
     }
     catch (\Exception $e) {
-      $this->fail(st('Drupal could not determine the encoding of the database was set to UTF-8'));
+      $this->fail(t('Drupal could not determine the encoding of the database was set to UTF-8'));
     }
   }
 
@@ -236,4 +236,3 @@ function initializeDatabase() {
     }
   }
 }
-
diff --git a/core/lib/Drupal/Core/Database/Driver/sqlite/Install/Tasks.php b/core/lib/Drupal/Core/Database/Driver/sqlite/Install/Tasks.php
index ab12bcca5e1f..1079688562ff 100644
--- a/core/lib/Drupal/Core/Database/Driver/sqlite/Install/Tasks.php
+++ b/core/lib/Drupal/Core/Database/Driver/sqlite/Install/Tasks.php
@@ -16,7 +16,7 @@ class Tasks extends InstallTasks {
   protected $pdoDriver = 'sqlite';
 
   public function name() {
-    return st('SQLite');
+    return t('SQLite');
   }
 
   /**
@@ -35,8 +35,8 @@ public function getFormOptions($database) {
     unset($form['username'], $form['password'], $form['advanced_options']['host'], $form['advanced_options']['port']);
 
     // Make the text more accurate for SQLite.
-    $form['database']['#title'] = st('Database file');
-    $form['database']['#description'] = st('The absolute path to the file where @drupal data will be stored. This must be writable by the web server and should exist outside of the web root.', array('@drupal' => drupal_install_profile_distribution_name()));
+    $form['database']['#title'] = t('Database file');
+    $form['database']['#description'] = t('The absolute path to the file where @drupal data will be stored. This must be writable by the web server and should exist outside of the web root.', array('@drupal' => drupal_install_profile_distribution_name()));
     $default_database = conf_path(FALSE, TRUE) . '/files/.ht.sqlite';
     $form['database']['#default_value'] = empty($database['database']) ? $default_database : $database['database'];
     return $form;
@@ -86,17 +86,16 @@ protected function connect() {
         catch (DatabaseNotFoundException $e) {
           // Still no dice; probably a permission issue. Raise the error to the
           // installer.
-          $this->fail(st('Database %database not found. The server reports the following message when attempting to create the database: %error.', array('%database' => $database, '%error' => $e->getMessage())));
+          $this->fail(t('Database %database not found. The server reports the following message when attempting to create the database: %error.', array('%database' => $database, '%error' => $e->getMessage())));
         }
       }
       else {
         // Database connection failed for some other reason than the database
         // not existing.
-        $this->fail(st('Failed to connect to your database server. The server reports the following message: %error.<ul><li>Is the database server running?</li><li>Does the database exist, and have you entered the correct database name?</li><li>Have you entered the correct username and password?</li><li>Have you entered the correct database hostname?</li></ul>', array('%error' => $e->getMessage())));
+        $this->fail(t('Failed to connect to your database server. The server reports the following message: %error.<ul><li>Is the database server running?</li><li>Does the database exist, and have you entered the correct database name?</li><li>Have you entered the correct username and password?</li><li>Have you entered the correct database hostname?</li></ul>', array('%error' => $e->getMessage())));
         return FALSE;
       }
     }
     return TRUE;
   }
 }
-
diff --git a/core/lib/Drupal/Core/Database/Install/Tasks.php b/core/lib/Drupal/Core/Database/Install/Tasks.php
index b051c75f3061..d46251bd04f2 100644
--- a/core/lib/Drupal/Core/Database/Install/Tasks.php
+++ b/core/lib/Drupal/Core/Database/Install/Tasks.php
@@ -137,7 +137,7 @@ public function runTasks() {
           }
         }
         else {
-          throw new TaskException(st("Failed to run all tasks against the database server. The task %task wasn't found.", array('%task' => $task['function'])));
+          throw new TaskException(t("Failed to run all tasks against the database server. The task %task wasn't found.", array('%task' => $task['function'])));
         }
       }
     }
@@ -166,7 +166,7 @@ protected function connect() {
       $this->pass('Drupal can CONNECT to the database ok.');
     }
     catch (\Exception $e) {
-      $this->fail(st('Failed to connect to your database server. The server reports the following message: %error.<ul><li>Is the database server running?</li><li>Does the database exist, and have you entered the correct database name?</li><li>Have you entered the correct username and password?</li><li>Have you entered the correct database hostname?</li></ul>', array('%error' => $e->getMessage())));
+      $this->fail(t('Failed to connect to your database server. The server reports the following message: %error.<ul><li>Is the database server running?</li><li>Does the database exist, and have you entered the correct database name?</li><li>Have you entered the correct username and password?</li><li>Have you entered the correct database hostname?</li></ul>', array('%error' => $e->getMessage())));
       return FALSE;
     }
     return TRUE;
@@ -178,10 +178,10 @@ protected function connect() {
   protected function runTestQuery($query, $pass, $fail, $fatal = FALSE) {
     try {
       db_query($query);
-      $this->pass(st($pass));
+      $this->pass(t($pass));
     }
     catch (\Exception $e) {
-      $this->fail(st($fail, array('%query' => $query, '%error' => $e->getMessage(), '%name' => $this->name())));
+      $this->fail(t($fail, array('%query' => $query, '%error' => $e->getMessage(), '%name' => $this->name())));
       return !$fatal;
     }
   }
@@ -191,7 +191,7 @@ protected function runTestQuery($query, $pass, $fail, $fatal = FALSE) {
    */
   protected function checkEngineVersion() {
     if ($this->minimumVersion() && version_compare(Database::getConnection()->version(), $this->minimumVersion(), '<')) {
-      $this->fail(st("The database version %version is less than the minimum required version %minimum_version.", array('%version' => Database::getConnection()->version(), '%minimum_version' => $this->minimumVersion())));
+      $this->fail(t("The database version %version is less than the minimum required version %minimum_version.", array('%version' => Database::getConnection()->version(), '%minimum_version' => $this->minimumVersion())));
     }
   }
 
@@ -207,16 +207,16 @@ protected function checkEngineVersion() {
   public function getFormOptions($database) {
     $form['database'] = array(
       '#type' => 'textfield',
-      '#title' => st('Database name'),
+      '#title' => t('Database name'),
       '#default_value' => empty($database['database']) ? '' : $database['database'],
       '#size' => 45,
       '#required' => TRUE,
-      '#description' => st('The name of the database your @drupal data will be stored in.', array('@drupal' => drupal_install_profile_distribution_name())),
+      '#description' => t('The name of the database your @drupal data will be stored in.', array('@drupal' => drupal_install_profile_distribution_name())),
     );
 
     $form['username'] = array(
       '#type' => 'textfield',
-      '#title' => st('Database username'),
+      '#title' => t('Database username'),
       '#default_value' => empty($database['username']) ? '' : $database['username'],
       '#required' => TRUE,
       '#size' => 45,
@@ -224,7 +224,7 @@ public function getFormOptions($database) {
 
     $form['password'] = array(
       '#type' => 'password',
-      '#title' => st('Database password'),
+      '#title' => t('Database password'),
       '#default_value' => empty($database['password']) ? '' : $database['password'],
       '#required' => FALSE,
       '#size' => 45,
@@ -232,9 +232,9 @@ public function getFormOptions($database) {
 
     $form['advanced_options'] = array(
       '#type' => 'details',
-      '#title' => st('Advanced options'),
+      '#title' => t('Advanced options'),
       '#collapsed' => TRUE,
-      '#description' => st("These options are only necessary for some sites. If you're not sure what you should enter here, leave the default settings or check with your hosting provider."),
+      '#description' => t("These options are only necessary for some sites. If you're not sure what you should enter here, leave the default settings or check with your hosting provider."),
       '#weight' => 10,
     );
 
@@ -242,32 +242,32 @@ public function getFormOptions($database) {
     $db_prefix = ($profile == 'standard') ? 'drupal_' : $profile . '_';
     $form['advanced_options']['db_prefix'] = array(
       '#type' => 'textfield',
-      '#title' => st('Table prefix'),
+      '#title' => t('Table prefix'),
       '#default_value' => '',
       '#size' => 45,
-      '#description' => st('If more than one application will be sharing this database, enter a table prefix such as %prefix for your @drupal site here.', array('@drupal' => drupal_install_profile_distribution_name(), '%prefix' => $db_prefix)),
+      '#description' => t('If more than one application will be sharing this database, enter a table prefix such as %prefix for your @drupal site here.', array('@drupal' => drupal_install_profile_distribution_name(), '%prefix' => $db_prefix)),
       '#weight' => 10,
     );
 
     $form['advanced_options']['host'] = array(
       '#type' => 'textfield',
-      '#title' => st('Database host'),
+      '#title' => t('Database host'),
       '#default_value' => empty($database['host']) ? 'localhost' : $database['host'],
       '#size' => 45,
       // Hostnames can be 255 characters long.
       '#maxlength' => 255,
       '#required' => TRUE,
-      '#description' => st('If your database is located on a different server, change this.'),
+      '#description' => t('If your database is located on a different server, change this.'),
     );
 
     $form['advanced_options']['port'] = array(
       '#type' => 'textfield',
-      '#title' => st('Database port'),
+      '#title' => t('Database port'),
       '#default_value' => empty($database['port']) ? '' : $database['port'],
       '#size' => 45,
       // The maximum port number is 65536, 5 digits.
       '#maxlength' => 5,
-      '#description' => st('If your database server is listening to a non-standard port, enter its number.'),
+      '#description' => t('If your database server is listening to a non-standard port, enter its number.'),
     );
 
     return $form;
@@ -290,12 +290,12 @@ public function validateDatabaseSettings($database) {
 
     // Verify the table prefix.
     if (!empty($database['prefix']) && is_string($database['prefix']) && !preg_match('/^[A-Za-z0-9_.]+$/', $database['prefix'])) {
-      $errors[$database['driver'] . '][advanced_options][db_prefix'] = st('The database table prefix you have entered, %prefix, is invalid. The table prefix can only contain alphanumeric characters, periods, or underscores.', array('%prefix' => $database['prefix']));
+      $errors[$database['driver'] . '][advanced_options][db_prefix'] = t('The database table prefix you have entered, %prefix, is invalid. The table prefix can only contain alphanumeric characters, periods, or underscores.', array('%prefix' => $database['prefix']));
     }
 
     // Verify the database port.
     if (!empty($database['port']) && !is_numeric($database['port'])) {
-      $errors[$database['driver'] . '][advanced_options][port'] =  st('Database port must be a number.');
+      $errors[$database['driver'] . '][advanced_options][port'] =  t('Database port must be a number.');
     }
 
     return $errors;
diff --git a/core/lib/Drupal/Core/Locale/CountryManager.php b/core/lib/Drupal/Core/Locale/CountryManager.php
index 8ac3cdf9adfc..33a0a5556d13 100644
--- a/core/lib/Drupal/Core/Locale/CountryManager.php
+++ b/core/lib/Drupal/Core/Locale/CountryManager.php
@@ -42,259 +42,257 @@ public function __construct(ModuleHandlerInterface $module_handler) {
    *   An array of country code => country name pairs.
    */
   public static function getStandardList() {
-    $t = get_t();
-
     $countries = array(
-      'AD' => $t('Andorra'),
-      'AE' => $t('United Arab Emirates'),
-      'AF' => $t('Afghanistan'),
-      'AG' => $t('Antigua and Barbuda'),
-      'AI' => $t('Anguilla'),
-      'AL' => $t('Albania'),
-      'AM' => $t('Armenia'),
-      'AN' => $t('Netherlands Antilles'),
-      'AO' => $t('Angola'),
-      'AQ' => $t('Antarctica'),
-      'AR' => $t('Argentina'),
-      'AS' => $t('American Samoa'),
-      'AT' => $t('Austria'),
-      'AU' => $t('Australia'),
-      'AW' => $t('Aruba'),
-      'AX' => $t('Ã…land Islands'),
-      'AZ' => $t('Azerbaijan'),
-      'BA' => $t('Bosnia and Herzegovina'),
-      'BB' => $t('Barbados'),
-      'BD' => $t('Bangladesh'),
-      'BE' => $t('Belgium'),
-      'BF' => $t('Burkina Faso'),
-      'BG' => $t('Bulgaria'),
-      'BH' => $t('Bahrain'),
-      'BI' => $t('Burundi'),
-      'BJ' => $t('Benin'),
-      'BL' => $t('Saint Barthélemy'),
-      'BM' => $t('Bermuda'),
-      'BN' => $t('Brunei Darussalam'),
-      'BO' => $t('Bolivia, Plurinational State of'),
-      'BQ' => $t('Bonaire, Sint Eustatius and Saba'),
-      'BR' => $t('Brazil'),
-      'BS' => $t('Bahamas'),
-      'BT' => $t('Bhutan'),
-      'BV' => $t('Bouvet Island'),
-      'BW' => $t('Botswana'),
-      'BY' => $t('Belarus'),
-      'BZ' => $t('Belize'),
-      'CA' => $t('Canada'),
-      'CC' => $t('Cocos (Keeling) Islands'),
-      'CD' => $t('Congo, The Democratic Republic of the'),
-      'CF' => $t('Central African Republic'),
-      'CG' => $t('Congo'),
-      'CH' => $t('Switzerland'),
-      'CI' => $t("Côte d'Ivoire"),
-      'CK' => $t('Cook Islands'),
-      'CL' => $t('Chile'),
-      'CM' => $t('Cameroon'),
-      'CN' => $t('China'),
-      'CO' => $t('Colombia'),
-      'CR' => $t('Costa Rica'),
-      'CU' => $t('Cuba'),
-      'CV' => $t('Cape Verde'),
-      'CW' => $t('Curaçao'),
-      'CX' => $t('Christmas Island'),
-      'CY' => $t('Cyprus'),
-      'CZ' => $t('Czech Republic'),
-      'DE' => $t('Germany'),
-      'DJ' => $t('Djibouti'),
-      'DK' => $t('Denmark'),
-      'DM' => $t('Dominica'),
-      'DO' => $t('Dominican Republic'),
-      'DZ' => $t('Algeria'),
-      'EC' => $t('Ecuador'),
-      'EE' => $t('Estonia'),
-      'EG' => $t('Egypt'),
-      'EH' => $t('Western Sahara'),
-      'ER' => $t('Eritrea'),
-      'ES' => $t('Spain'),
-      'ET' => $t('Ethiopia'),
-      'FI' => $t('Finland'),
-      'FJ' => $t('Fiji'),
-      'FK' => $t('Falkland Islands (Malvinas)'),
-      'FM' => $t('Micronesia, Federated States of'),
-      'FO' => $t('Faroe Islands'),
-      'FR' => $t('France'),
-      'GA' => $t('Gabon'),
-      'GB' => $t('United Kingdom'),
-      'GD' => $t('Grenada'),
-      'GE' => $t('Georgia'),
-      'GF' => $t('French Guiana'),
-      'GG' => $t('Guernsey'),
-      'GH' => $t('Ghana'),
-      'GI' => $t('Gibraltar'),
-      'GL' => $t('Greenland'),
-      'GM' => $t('Gambia'),
-      'GN' => $t('Guinea'),
-      'GP' => $t('Guadeloupe'),
-      'GQ' => $t('Equatorial Guinea'),
-      'GR' => $t('Greece'),
-      'GS' => $t('South Georgia and the South Sandwich Islands'),
-      'GT' => $t('Guatemala'),
-      'GU' => $t('Guam'),
-      'GW' => $t('Guinea-Bissau'),
-      'GY' => $t('Guyana'),
-      'HK' => $t('Hong Kong'),
-      'HM' => $t('Heard Island and McDonald Islands'),
-      'HN' => $t('Honduras'),
-      'HR' => $t('Croatia'),
-      'HT' => $t('Haiti'),
-      'HU' => $t('Hungary'),
-      'ID' => $t('Indonesia'),
-      'IE' => $t('Ireland'),
-      'IL' => $t('Israel'),
-      'IM' => $t('Isle of Man'),
-      'IN' => $t('India'),
-      'IO' => $t('British Indian Ocean Territory'),
-      'IQ' => $t('Iraq'),
-      'IR' => $t('Iran, Islamic Republic of'),
-      'IS' => $t('Iceland'),
-      'IT' => $t('Italy'),
-      'JE' => $t('Jersey'),
-      'JM' => $t('Jamaica'),
-      'JO' => $t('Jordan'),
-      'JP' => $t('Japan'),
-      'KE' => $t('Kenya'),
-      'KG' => $t('Kyrgyzstan'),
-      'KH' => $t('Cambodia'),
-      'KI' => $t('Kiribati'),
-      'KM' => $t('Comoros'),
-      'KN' => $t('Saint Kitts and Nevis'),
-      'KP' => $t("Korea, Democratic People's Republic of"),
-      'KR' => $t('Korea, Republic of'),
-      'KW' => $t('Kuwait'),
-      'KY' => $t('Cayman Islands'),
-      'KZ' => $t('Kazakhstan'),
-      'LA' => $t("Lao People's Democratic Republic"),
-      'LB' => $t('Lebanon'),
-      'LC' => $t('Saint Lucia'),
-      'LI' => $t('Liechtenstein'),
-      'LK' => $t('Sri Lanka'),
-      'LR' => $t('Liberia'),
-      'LS' => $t('Lesotho'),
-      'LT' => $t('Lithuania'),
-      'LU' => $t('Luxembourg'),
-      'LV' => $t('Latvia'),
-      'LY' => $t('Libya'),
-      'MA' => $t('Morocco'),
-      'MC' => $t('Monaco'),
-      'MD' => $t('Moldova, Republic of'),
-      'ME' => $t('Montenegro'),
-      'MF' => $t('Saint Martin (French part)'),
-      'MG' => $t('Madagascar'),
-      'MH' => $t('Marshall Islands'),
-      'MK' => $t('Macedonia, Republic of'),
-      'ML' => $t('Mali'),
-      'MM' => $t('Myanmar'),
-      'MN' => $t('Mongolia'),
-      'MO' => $t('Macao'),
-      'MP' => $t('Northern Mariana Islands'),
-      'MQ' => $t('Martinique'),
-      'MR' => $t('Mauritania'),
-      'MS' => $t('Montserrat'),
-      'MT' => $t('Malta'),
-      'MU' => $t('Mauritius'),
-      'MV' => $t('Maldives'),
-      'MW' => $t('Malawi'),
-      'MX' => $t('Mexico'),
-      'MY' => $t('Malaysia'),
-      'MZ' => $t('Mozambique'),
-      'NA' => $t('Namibia'),
-      'NC' => $t('New Caledonia'),
-      'NE' => $t('Niger'),
-      'NF' => $t('Norfolk Island'),
-      'NG' => $t('Nigeria'),
-      'NI' => $t('Nicaragua'),
-      'NL' => $t('Netherlands'),
-      'NO' => $t('Norway'),
-      'NP' => $t('Nepal'),
-      'NR' => $t('Nauru'),
-      'NU' => $t('Niue'),
-      'NZ' => $t('New Zealand'),
-      'OM' => $t('Oman'),
-      'PA' => $t('Panama'),
-      'PE' => $t('Peru'),
-      'PF' => $t('French Polynesia'),
-      'PG' => $t('Papua New Guinea'),
-      'PH' => $t('Philippines'),
-      'PK' => $t('Pakistan'),
-      'PL' => $t('Poland'),
-      'PM' => $t('Saint Pierre and Miquelon'),
-      'PN' => $t('Pitcairn'),
-      'PR' => $t('Puerto Rico'),
-      'PS' => $t('Palestine, State of'),
-      'PT' => $t('Portugal'),
-      'PW' => $t('Palau'),
-      'PY' => $t('Paraguay'),
-      'QA' => $t('Qatar'),
-      'RE' => $t('Réunion'),
-      'RO' => $t('Romania'),
-      'RS' => $t('Serbia'),
-      'RU' => $t('Russian Federation'),
-      'RW' => $t('Rwanda'),
-      'SA' => $t('Saudi Arabia'),
-      'SB' => $t('Solomon Islands'),
-      'SC' => $t('Seychelles'),
-      'SD' => $t('Sudan'),
-      'SE' => $t('Sweden'),
-      'SG' => $t('Singapore'),
-      'SH' => $t('Saint Helena, Ascension and Tristan da Cunha'),
-      'SI' => $t('Slovenia'),
-      'SJ' => $t('Svalbard and Jan Mayen'),
-      'SK' => $t('Slovakia'),
-      'SL' => $t('Sierra Leone'),
-      'SM' => $t('San Marino'),
-      'SN' => $t('Senegal'),
-      'SO' => $t('Somalia'),
-      'SR' => $t('Suriname'),
-      'SS' => $t('South Sudan'),
-      'ST' => $t('Sao Tome and Principe'),
-      'SV' => $t('El Salvador'),
-      'SX' => $t('Sint Maarten (Dutch part)'),
-      'SY' => $t('Syrian Arab Republic'),
-      'SZ' => $t('Swaziland'),
-      'TC' => $t('Turks and Caicos Islands'),
-      'TD' => $t('Chad'),
-      'TF' => $t('French Southern Territories'),
-      'TG' => $t('Togo'),
-      'TH' => $t('Thailand'),
-      'TJ' => $t('Tajikistan'),
-      'TK' => $t('Tokelau'),
-      'TL' => $t('Timor-Leste'),
-      'TM' => $t('Turkmenistan'),
-      'TN' => $t('Tunisia'),
-      'TO' => $t('Tonga'),
-      'TR' => $t('Turkey'),
-      'TT' => $t('Trinidad and Tobago'),
-      'TV' => $t('Tuvalu'),
-      'TW' => $t('Taiwan, Province of China'),
-      'TZ' => $t('Tanzania, United Republic of'),
-      'UA' => $t('Ukraine'),
-      'UG' => $t('Uganda'),
-      'UM' => $t('United States Minor Outlying Islands'),
-      'US' => $t('United States'),
-      'UY' => $t('Uruguay'),
-      'UZ' => $t('Uzbekistan'),
-      'VA' => $t('Holy See (Vatican City State)'),
-      'VC' => $t('Saint Vincent and the Grenadines'),
-      'VE' => $t('Venezuela, Bolivarian Republic of'),
-      'VG' => $t('Virgin Islands, British'),
-      'VI' => $t('Virgin Islands, U.S.'),
-      'VN' => $t('Viet Nam'),
-      'VU' => $t('Vanuatu'),
-      'WF' => $t('Wallis and Futuna'),
-      'WS' => $t('Samoa'),
-      'YE' => $t('Yemen'),
-      'YT' => $t('Mayotte'),
-      'ZA' => $t('South Africa'),
-      'ZM' => $t('Zambia'),
-      'ZW' => $t('Zimbabwe'),
+      'AD' => t('Andorra'),
+      'AE' => t('United Arab Emirates'),
+      'AF' => t('Afghanistan'),
+      'AG' => t('Antigua and Barbuda'),
+      'AI' => t('Anguilla'),
+      'AL' => t('Albania'),
+      'AM' => t('Armenia'),
+      'AN' => t('Netherlands Antilles'),
+      'AO' => t('Angola'),
+      'AQ' => t('Antarctica'),
+      'AR' => t('Argentina'),
+      'AS' => t('American Samoa'),
+      'AT' => t('Austria'),
+      'AU' => t('Australia'),
+      'AW' => t('Aruba'),
+      'AX' => t('Ã…land Islands'),
+      'AZ' => t('Azerbaijan'),
+      'BA' => t('Bosnia and Herzegovina'),
+      'BB' => t('Barbados'),
+      'BD' => t('Bangladesh'),
+      'BE' => t('Belgium'),
+      'BF' => t('Burkina Faso'),
+      'BG' => t('Bulgaria'),
+      'BH' => t('Bahrain'),
+      'BI' => t('Burundi'),
+      'BJ' => t('Benin'),
+      'BL' => t('Saint Barthélemy'),
+      'BM' => t('Bermuda'),
+      'BN' => t('Brunei Darussalam'),
+      'BO' => t('Bolivia, Plurinational State of'),
+      'BQ' => t('Bonaire, Sint Eustatius and Saba'),
+      'BR' => t('Brazil'),
+      'BS' => t('Bahamas'),
+      'BT' => t('Bhutan'),
+      'BV' => t('Bouvet Island'),
+      'BW' => t('Botswana'),
+      'BY' => t('Belarus'),
+      'BZ' => t('Belize'),
+      'CA' => t('Canada'),
+      'CC' => t('Cocos (Keeling) Islands'),
+      'CD' => t('Congo, The Democratic Republic of the'),
+      'CF' => t('Central African Republic'),
+      'CG' => t('Congo'),
+      'CH' => t('Switzerland'),
+      'CI' => t("Côte d'Ivoire"),
+      'CK' => t('Cook Islands'),
+      'CL' => t('Chile'),
+      'CM' => t('Cameroon'),
+      'CN' => t('China'),
+      'CO' => t('Colombia'),
+      'CR' => t('Costa Rica'),
+      'CU' => t('Cuba'),
+      'CV' => t('Cape Verde'),
+      'CW' => t('Curaçao'),
+      'CX' => t('Christmas Island'),
+      'CY' => t('Cyprus'),
+      'CZ' => t('Czech Republic'),
+      'DE' => t('Germany'),
+      'DJ' => t('Djibouti'),
+      'DK' => t('Denmark'),
+      'DM' => t('Dominica'),
+      'DO' => t('Dominican Republic'),
+      'DZ' => t('Algeria'),
+      'EC' => t('Ecuador'),
+      'EE' => t('Estonia'),
+      'EG' => t('Egypt'),
+      'EH' => t('Western Sahara'),
+      'ER' => t('Eritrea'),
+      'ES' => t('Spain'),
+      'ET' => t('Ethiopia'),
+      'FI' => t('Finland'),
+      'FJ' => t('Fiji'),
+      'FK' => t('Falkland Islands (Malvinas)'),
+      'FM' => t('Micronesia, Federated States of'),
+      'FO' => t('Faroe Islands'),
+      'FR' => t('France'),
+      'GA' => t('Gabon'),
+      'GB' => t('United Kingdom'),
+      'GD' => t('Grenada'),
+      'GE' => t('Georgia'),
+      'GF' => t('French Guiana'),
+      'GG' => t('Guernsey'),
+      'GH' => t('Ghana'),
+      'GI' => t('Gibraltar'),
+      'GL' => t('Greenland'),
+      'GM' => t('Gambia'),
+      'GN' => t('Guinea'),
+      'GP' => t('Guadeloupe'),
+      'GQ' => t('Equatorial Guinea'),
+      'GR' => t('Greece'),
+      'GS' => t('South Georgia and the South Sandwich Islands'),
+      'GT' => t('Guatemala'),
+      'GU' => t('Guam'),
+      'GW' => t('Guinea-Bissau'),
+      'GY' => t('Guyana'),
+      'HK' => t('Hong Kong'),
+      'HM' => t('Heard Island and McDonald Islands'),
+      'HN' => t('Honduras'),
+      'HR' => t('Croatia'),
+      'HT' => t('Haiti'),
+      'HU' => t('Hungary'),
+      'ID' => t('Indonesia'),
+      'IE' => t('Ireland'),
+      'IL' => t('Israel'),
+      'IM' => t('Isle of Man'),
+      'IN' => t('India'),
+      'IO' => t('British Indian Ocean Territory'),
+      'IQ' => t('Iraq'),
+      'IR' => t('Iran, Islamic Republic of'),
+      'IS' => t('Iceland'),
+      'IT' => t('Italy'),
+      'JE' => t('Jersey'),
+      'JM' => t('Jamaica'),
+      'JO' => t('Jordan'),
+      'JP' => t('Japan'),
+      'KE' => t('Kenya'),
+      'KG' => t('Kyrgyzstan'),
+      'KH' => t('Cambodia'),
+      'KI' => t('Kiribati'),
+      'KM' => t('Comoros'),
+      'KN' => t('Saint Kitts and Nevis'),
+      'KP' => t("Korea, Democratic People's Republic of"),
+      'KR' => t('Korea, Republic of'),
+      'KW' => t('Kuwait'),
+      'KY' => t('Cayman Islands'),
+      'KZ' => t('Kazakhstan'),
+      'LA' => t("Lao People's Democratic Republic"),
+      'LB' => t('Lebanon'),
+      'LC' => t('Saint Lucia'),
+      'LI' => t('Liechtenstein'),
+      'LK' => t('Sri Lanka'),
+      'LR' => t('Liberia'),
+      'LS' => t('Lesotho'),
+      'LT' => t('Lithuania'),
+      'LU' => t('Luxembourg'),
+      'LV' => t('Latvia'),
+      'LY' => t('Libya'),
+      'MA' => t('Morocco'),
+      'MC' => t('Monaco'),
+      'MD' => t('Moldova, Republic of'),
+      'ME' => t('Montenegro'),
+      'MF' => t('Saint Martin (French part)'),
+      'MG' => t('Madagascar'),
+      'MH' => t('Marshall Islands'),
+      'MK' => t('Macedonia, Republic of'),
+      'ML' => t('Mali'),
+      'MM' => t('Myanmar'),
+      'MN' => t('Mongolia'),
+      'MO' => t('Macao'),
+      'MP' => t('Northern Mariana Islands'),
+      'MQ' => t('Martinique'),
+      'MR' => t('Mauritania'),
+      'MS' => t('Montserrat'),
+      'MT' => t('Malta'),
+      'MU' => t('Mauritius'),
+      'MV' => t('Maldives'),
+      'MW' => t('Malawi'),
+      'MX' => t('Mexico'),
+      'MY' => t('Malaysia'),
+      'MZ' => t('Mozambique'),
+      'NA' => t('Namibia'),
+      'NC' => t('New Caledonia'),
+      'NE' => t('Niger'),
+      'NF' => t('Norfolk Island'),
+      'NG' => t('Nigeria'),
+      'NI' => t('Nicaragua'),
+      'NL' => t('Netherlands'),
+      'NO' => t('Norway'),
+      'NP' => t('Nepal'),
+      'NR' => t('Nauru'),
+      'NU' => t('Niue'),
+      'NZ' => t('New Zealand'),
+      'OM' => t('Oman'),
+      'PA' => t('Panama'),
+      'PE' => t('Peru'),
+      'PF' => t('French Polynesia'),
+      'PG' => t('Papua New Guinea'),
+      'PH' => t('Philippines'),
+      'PK' => t('Pakistan'),
+      'PL' => t('Poland'),
+      'PM' => t('Saint Pierre and Miquelon'),
+      'PN' => t('Pitcairn'),
+      'PR' => t('Puerto Rico'),
+      'PS' => t('Palestine, State of'),
+      'PT' => t('Portugal'),
+      'PW' => t('Palau'),
+      'PY' => t('Paraguay'),
+      'QA' => t('Qatar'),
+      'RE' => t('Réunion'),
+      'RO' => t('Romania'),
+      'RS' => t('Serbia'),
+      'RU' => t('Russian Federation'),
+      'RW' => t('Rwanda'),
+      'SA' => t('Saudi Arabia'),
+      'SB' => t('Solomon Islands'),
+      'SC' => t('Seychelles'),
+      'SD' => t('Sudan'),
+      'SE' => t('Sweden'),
+      'SG' => t('Singapore'),
+      'SH' => t('Saint Helena, Ascension and Tristan da Cunha'),
+      'SI' => t('Slovenia'),
+      'SJ' => t('Svalbard and Jan Mayen'),
+      'SK' => t('Slovakia'),
+      'SL' => t('Sierra Leone'),
+      'SM' => t('San Marino'),
+      'SN' => t('Senegal'),
+      'SO' => t('Somalia'),
+      'SR' => t('Suriname'),
+      'SS' => t('South Sudan'),
+      'ST' => t('Sao Tome and Principe'),
+      'SV' => t('El Salvador'),
+      'SX' => t('Sint Maarten (Dutch part)'),
+      'SY' => t('Syrian Arab Republic'),
+      'SZ' => t('Swaziland'),
+      'TC' => t('Turks and Caicos Islands'),
+      'TD' => t('Chad'),
+      'TF' => t('French Southern Territories'),
+      'TG' => t('Togo'),
+      'TH' => t('Thailand'),
+      'TJ' => t('Tajikistan'),
+      'TK' => t('Tokelau'),
+      'TL' => t('Timor-Leste'),
+      'TM' => t('Turkmenistan'),
+      'TN' => t('Tunisia'),
+      'TO' => t('Tonga'),
+      'TR' => t('Turkey'),
+      'TT' => t('Trinidad and Tobago'),
+      'TV' => t('Tuvalu'),
+      'TW' => t('Taiwan, Province of China'),
+      'TZ' => t('Tanzania, United Republic of'),
+      'UA' => t('Ukraine'),
+      'UG' => t('Uganda'),
+      'UM' => t('United States Minor Outlying Islands'),
+      'US' => t('United States'),
+      'UY' => t('Uruguay'),
+      'UZ' => t('Uzbekistan'),
+      'VA' => t('Holy See (Vatican City State)'),
+      'VC' => t('Saint Vincent and the Grenadines'),
+      'VE' => t('Venezuela, Bolivarian Republic of'),
+      'VG' => t('Virgin Islands, British'),
+      'VI' => t('Virgin Islands, U.S.'),
+      'VN' => t('Viet Nam'),
+      'VU' => t('Vanuatu'),
+      'WF' => t('Wallis and Futuna'),
+      'WS' => t('Samoa'),
+      'YE' => t('Yemen'),
+      'YT' => t('Mayotte'),
+      'ZA' => t('South Africa'),
+      'ZM' => t('Zambia'),
+      'ZW' => t('Zimbabwe'),
     );
 
     // Sort the list.
diff --git a/core/lib/Drupal/Core/StringTranslation/Translator/FileTranslation.php b/core/lib/Drupal/Core/StringTranslation/Translator/FileTranslation.php
index 3904a216eaa2..42fd0c3e3f62 100644
--- a/core/lib/Drupal/Core/StringTranslation/Translator/FileTranslation.php
+++ b/core/lib/Drupal/Core/StringTranslation/Translator/FileTranslation.php
@@ -17,9 +17,6 @@
  *
  * Used during the install process, when database, theme, and localization
  * system is possibly not yet available.
- *
- * Use t() if your code will never run during the Drupal installation phase.
- * Use st() if your code will only run during installation.
  */
 class FileTranslation extends StaticTranslation {
 
diff --git a/core/modules/aggregator/aggregator.install b/core/modules/aggregator/aggregator.install
index 7979eba60f0e..018d9d12a9d4 100644
--- a/core/modules/aggregator/aggregator.install
+++ b/core/modules/aggregator/aggregator.install
@@ -10,16 +10,15 @@
  * Implements hook_requirements().
  */
 function aggregator_requirements($phase) {
-  $t = get_t();
   $has_curl = function_exists('curl_init');
   $requirements = array();
   $requirements['curl'] = array(
-    'title' => $t('cURL'),
-    'value' => $has_curl ? $t('Enabled') : $t('Not found'),
+    'title' => t('cURL'),
+    'value' => $has_curl ? t('Enabled') : t('Not found'),
   );
   if (!$has_curl) {
     $requirements['curl']['severity'] = REQUIREMENT_ERROR;
-    $requirements['curl']['description'] = $t('The Aggregator module could not be installed because the PHP <a href="@curl_url">cURL</a> library is not available.', array('@curl_url' => 'http://php.net/manual/curl.setup.php'));
+    $requirements['curl']['description'] = t('The Aggregator module could not be installed because the PHP <a href="@curl_url">cURL</a> library is not available.', array('@curl_url' => 'http://php.net/manual/curl.setup.php'));
   }
   return $requirements;
 }
diff --git a/core/modules/locale/lib/Drupal/locale/Tests/LocaleInstallTest.php b/core/modules/locale/lib/Drupal/locale/Tests/LocaleInstallTest.php
deleted file mode 100644
index fa6aafc88f47..000000000000
--- a/core/modules/locale/lib/Drupal/locale/Tests/LocaleInstallTest.php
+++ /dev/null
@@ -1,47 +0,0 @@
-<?php
-
-/**
- * @file
- * Definition of Drupal\locale\Tests\LocaleInstallTest.
- */
-
-namespace Drupal\locale\Tests;
-
-use Drupal\simpletest\WebTestBase;
-use ReflectionFunction;
-
-/**
- * Tests for the st() function.
- */
-class LocaleInstallTest extends WebTestBase {
-
-  /**
-   * Modules to enable.
-   *
-   * @var array
-   */
-  public static $modules = array('locale');
-
-  public static function getInfo() {
-    return array(
-      'name' => 'String translation using st()',
-      'description' => 'Tests that st() works like t().',
-      'group' => 'Locale',
-    );
-  }
-
-  function setUp() {
-    parent::setUp();
-    // st() lives in install.inc, so ensure that it is loaded for all tests.
-    require_once DRUPAL_ROOT . '/core/includes/install.inc';
-  }
-
-  /**
-   * Verify that function signatures of t() and st() are equal.
-   */
-  function testFunctionSignatures() {
-    $reflector_t = new ReflectionFunction('t');
-    $reflector_st = new ReflectionFunction('st');
-    $this->assertEqual($reflector_t->getParameters(), $reflector_st->getParameters(), t('Function signatures of t() and st() are equal.'));
-  }
-}
diff --git a/core/modules/locale/locale.batch.inc b/core/modules/locale/locale.batch.inc
index 227e85ef458e..352b0a587d40 100644
--- a/core/modules/locale/locale.batch.inc
+++ b/core/modules/locale/locale.batch.inc
@@ -32,7 +32,6 @@
  * @see locale_translation_batch_status_compare()
 */
 function locale_translation_batch_status_fetch_remote($source, &$context) {
-  $t = get_t();
   // Check the translation file at the remote server and update the source
   // data with the remote status.
   if (isset($source->files[LOCALE_TRANSLATION_REMOTE])) {
@@ -57,7 +56,7 @@ function locale_translation_batch_status_fetch_remote($source, &$context) {
       $context['results']['failed_files'][] = $source->name;
     }
     $context['results']['sources'][$source->name][$source->langcode] = $source;
-    $context['message'] = $t('Checked translation for %project.', array('%project' => $source->project));
+    $context['message'] = t('Checked translation for %project.', array('%project' => $source->project));
   }
 }
 
@@ -78,7 +77,6 @@ function locale_translation_batch_status_fetch_remote($source, &$context) {
  * @see locale_translation_batch_status_compare()
  */
 function locale_translation_batch_status_fetch_local($sources, &$context) {
-  $t = get_t();
   // Get the status of local translation files and store the result data in the
   // batch results for later processing.
   foreach ($sources as $source) {
@@ -96,7 +94,7 @@ function locale_translation_batch_status_fetch_local($sources, &$context) {
       $context['results']['sources'][$source->name][$source->langcode] = $source;
     }
   }
-  $context['message'] = $t('Checked all translations.');
+  $context['message'] = t('Checked all translations.');
 }
 
 /**
@@ -116,7 +114,6 @@ function locale_translation_batch_status_fetch_local($sources, &$context) {
  * @see locale_translation_batch_status_fetch_local()
  */
 function locale_translation_batch_status_compare(&$context) {
-  $t = get_t();
   $history = locale_translation_get_file_history();
   $results = array();
 
@@ -159,7 +156,7 @@ function locale_translation_batch_status_compare(&$context) {
         $results[$project][$langcode] = $source;
       }
     }
-    $context['message'] = $t('Updated translation status.');
+    $context['message'] = t('Updated translation status.');
   }
   locale_translation_status_save($results);
 }
@@ -173,7 +170,6 @@ function locale_translation_batch_status_compare(&$context) {
  *   Batch results.
  */
 function locale_translation_batch_status_finished($success, $results) {
-  $t = get_t();
   if ($success) {
     if (isset($results['failed_files'])) {
         if (Drupal::moduleHandler()->moduleExists('dblog')) {
@@ -196,7 +192,7 @@ function locale_translation_batch_status_finished($success, $results) {
     }
   }
   else {
-    drupal_set_message($t('An error occurred trying to check available interface translation updates.'), 'error');
+    drupal_set_message(t('An error occurred trying to check available interface translation updates.'), 'error');
   }
 }
 
@@ -250,9 +246,8 @@ function locale_translation_batch_fetch_download($project, $langcode, &$context)
   if (isset($sources[$project . ':' . $langcode])) {
     $source = $sources[$project . ':' . $langcode];
     if (isset($source->type) && $source->type == LOCALE_TRANSLATION_REMOTE) {
-      $t = get_t();
       if ($file = locale_translation_download_source($source->files[LOCALE_TRANSLATION_REMOTE])) {
-        $context['message'] = $t('Downloaded translation for %project.', array('%project' => $source->project));
+        $context['message'] = t('Downloaded translation for %project.', array('%project' => $source->project));
         $source->files[LOCALE_TRANSLATION_DOWNLOADED] = $file;
       }
       else {
@@ -295,7 +290,6 @@ function locale_translation_batch_fetch_import($project, $langcode, $options, &$
     if (isset($source->type)) {
       if ($source->type == LOCALE_TRANSLATION_REMOTE || $source->type == LOCALE_TRANSLATION_LOCAL) {
 
-        $t = get_t();
         // If we are working on a remote file we will import the downloaded
         // file. If the file was local just mark the result as such.
         if ($source->type == LOCALE_TRANSLATION_REMOTE) {
@@ -312,7 +306,7 @@ function locale_translation_batch_fetch_import($project, $langcode, $options, &$
         $file = $source_result->files[$import_type];
         module_load_include('bulk.inc', 'locale');
         $options += array(
-          'message' => $t('Importing translation for %project.', array('%project' => $source->project)),
+          'message' => t('Importing translation for %project.', array('%project' => $source->project)),
         );
         // Import the translation file. For large files the batch operations is
         // progressive and will be called repeatedly untill finished.
@@ -322,7 +316,7 @@ function locale_translation_batch_fetch_import($project, $langcode, $options, &$
         if (isset($context['finished']) && $context['finished'] == 1) {
           // The import is successfull.
           if (isset($context['results']['files'][$file->uri])) {
-            $context['message'] = $t('Imported translation for %project.', array('%project' => $source->project));
+            $context['message'] = t('Imported translation for %project.', array('%project' => $source->project));
 
             // Keep the data of imported source. In the following batch
             // operation it will be saved in the {locale_file} table.
@@ -386,7 +380,6 @@ function locale_translation_batch_fetch_import($project, $langcode, $options, &$
  * @see locale_translation_batch_status_compare()
  */
 function locale_translation_batch_fetch_update_status(&$context) {
-  $t = get_t();
   $results = array();
 
   if (isset($context['results']['sources'])) {
@@ -411,7 +404,7 @@ function locale_translation_batch_fetch_update_status(&$context) {
         $context['results']['sources'][$project][$langcode] = $source;
       }
     }
-    $context['message'] = $t('Updated translations.');
+    $context['message'] = t('Updated translations.');
 
     // The file history has changed, flush the static cache now.
     drupal_static_reset('locale_translation_get_file_history');
diff --git a/core/modules/locale/locale.bulk.inc b/core/modules/locale/locale.bulk.inc
index bc2f413be88f..a59c46472c26 100644
--- a/core/modules/locale/locale.bulk.inc
+++ b/core/modules/locale/locale.bulk.inc
@@ -392,7 +392,6 @@ function locale_translate_batch_build($files, $options) {
     'customized' => LOCALE_NOT_CUSTOMIZED,
     'finish_feedback' => TRUE,
   );
-  $t = get_t();
   if (count($files)) {
     $operations = array();
     foreach ($files as $file) {
@@ -407,9 +406,9 @@ function locale_translate_batch_build($files, $options) {
 
     $batch = array(
       'operations'    => $operations,
-      'title'         => $t('Importing interface translations'),
+      'title'         => t('Importing interface translations'),
       'progress_message' => '',
-      'error_message' => $t('Error importing interface translations'),
+      'error_message' => t('Error importing interface translations'),
       'file'          => drupal_get_path('module', 'locale') . '/locale.bulk.inc',
     );
     if ($options['finish_feedback']) {
@@ -794,15 +793,14 @@ function locale_config_batch_update_components(array $options, $langcodes = arra
  */
 function locale_config_batch_build(array $names, array $langcodes, $options = array()) {
   $options += array('finish_feedback' => TRUE);
-  $t = get_t();
   foreach ($names as $name) {
     $operations[] = array('locale_config_batch_refresh_name', array($name, $langcodes));
   }
   $batch = array(
     'operations'    => $operations,
-    'title'         => $t('Updating configuration translations'),
-    'init_message'  => $t('Starting configuration update'),
-    'error_message' => $t('Error updating configuration translations'),
+    'title'         => t('Updating configuration translations'),
+    'init_message'  => t('Starting configuration update'),
+    'error_message' => t('Error updating configuration translations'),
     'file'          => drupal_get_path('module', 'locale') . '/locale.bulk.inc',
   );
   if (!empty($options['finish_feedback'])) {
diff --git a/core/modules/locale/locale.compare.inc b/core/modules/locale/locale.compare.inc
index ece52cf336bc..2fbbaafb85b9 100644
--- a/core/modules/locale/locale.compare.inc
+++ b/core/modules/locale/locale.compare.inc
@@ -297,7 +297,6 @@ function locale_translation_check_projects_batch($projects = array(), $langcodes
  *   Batch definition array.
  */
 function locale_translation_batch_status_build($projects = array(), $langcodes = array()) {
-  $t = get_t();
   $projects = $projects ? $projects : array_keys(locale_translation_get_projects());
   $langcodes = $langcodes ? $langcodes : array_keys(locale_translatable_language_list());
 
@@ -305,10 +304,10 @@ function locale_translation_batch_status_build($projects = array(), $langcodes =
 
   $batch = array(
     'operations' => $operations,
-    'title' => $t('Checking translations'),
+    'title' => t('Checking translations'),
     'progress_message' => '',
     'finished' => 'locale_translation_batch_status_finished',
-    'error_message' => $t('Error checking translation updates.'),
+    'error_message' => t('Error checking translation updates.'),
     'file' => drupal_get_path('module', 'locale') . '/locale.batch.inc',
   );
   return $batch;
diff --git a/core/modules/locale/locale.fetch.inc b/core/modules/locale/locale.fetch.inc
index c17ff4a5920c..da55056b2c6f 100644
--- a/core/modules/locale/locale.fetch.inc
+++ b/core/modules/locale/locale.fetch.inc
@@ -28,7 +28,6 @@
  */
 function locale_translation_batch_update_build($projects = array(), $langcodes = array(), $options = array()) {
   module_load_include('compare.inc', 'locale');
-  $t = get_t();
   $projects = $projects ? $projects : array_keys(locale_translation_get_projects());
   $langcodes = $langcodes ? $langcodes : array_keys(locale_translatable_language_list());
 
@@ -37,9 +36,9 @@ function locale_translation_batch_update_build($projects = array(), $langcodes =
 
   $batch = array(
     'operations' => $operations,
-    'title' => $t('Updating translations'),
+    'title' => t('Updating translations'),
     'progress_message' => '',
-    'error_message' => $t('Error importing translation files'),
+    'error_message' => t('Error importing translation files'),
     'finished' => 'locale_translation_batch_fetch_finished',
     'file' => drupal_get_path('module', 'locale') . '/locale.batch.inc',
   );
@@ -64,12 +63,11 @@ function locale_translation_batch_fetch_build($projects = array(), $langcodes =
   $projects = $projects ? $projects : array_keys(locale_translation_get_projects());
   $langcodes = $langcodes ? $langcodes : array_keys(locale_translatable_language_list());
 
-  $t = get_t();
   $batch = array(
     'operations' => _locale_translation_fetch_operations($projects, $langcodes, $options),
-    'title' => $t('Updating translations.'),
+    'title' => t('Updating translations.'),
     'progress_message' => '',
-    'error_message' => $t('Error importing translation files'),
+    'error_message' => t('Error importing translation files'),
     'finished' => 'locale_translation_batch_fetch_finished',
     'file' => drupal_get_path('module', 'locale') . '/locale.batch.inc',
   );
diff --git a/core/modules/shortcut/lib/Drupal/shortcut/Tests/ShortcutTestBase.php b/core/modules/shortcut/lib/Drupal/shortcut/Tests/ShortcutTestBase.php
index d92a3d90fbbf..e1ea921df46f 100644
--- a/core/modules/shortcut/lib/Drupal/shortcut/Tests/ShortcutTestBase.php
+++ b/core/modules/shortcut/lib/Drupal/shortcut/Tests/ShortcutTestBase.php
@@ -53,14 +53,14 @@ function setUp() {
       $shortcut_set = shortcut_set_load('default');
       $menu_link = entity_create('menu_link', array(
         'link_path' => 'node/add',
-        'link_title' => st('Add content'),
+        'link_title' => t('Add content'),
         'weight' => -20,
       ));
       $menu_link->save();
       $shortcut_set->links[$menu_link->uuid()] = $menu_link;
       $menu_item = entity_create('menu_link', array(
         'link_path' => 'admin/content',
-        'link_title' => st('All content'),
+        'link_title' => t('All content'),
         'weight' => -19,
       ));
       $menu_item->save();
diff --git a/core/modules/simpletest/simpletest.install b/core/modules/simpletest/simpletest.install
index 387d88ce158a..020b3cdac2e0 100644
--- a/core/modules/simpletest/simpletest.install
+++ b/core/modules/simpletest/simpletest.install
@@ -15,7 +15,6 @@
  */
 function simpletest_requirements($phase) {
   $requirements = array();
-  $t = get_t();
 
   $has_curl = function_exists('curl_init');
   $has_hash = function_exists('hash_hmac');
@@ -23,41 +22,41 @@ function simpletest_requirements($phase) {
   $open_basedir = ini_get('open_basedir');
 
   $requirements['curl'] = array(
-    'title' => $t('cURL'),
-    'value' => $has_curl ? $t('Enabled') : $t('Not found'),
+    'title' => t('cURL'),
+    'value' => $has_curl ? t('Enabled') : t('Not found'),
   );
   if (!$has_curl) {
     $requirements['curl']['severity'] = REQUIREMENT_ERROR;
-    $requirements['curl']['description'] = $t('The testing framework could not be installed because the PHP <a href="@curl_url">cURL</a> library is not available.', array('@curl_url' => 'http://php.net/manual/curl.setup.php'));
+    $requirements['curl']['description'] = t('The testing framework could not be installed because the PHP <a href="@curl_url">cURL</a> library is not available.', array('@curl_url' => 'http://php.net/manual/curl.setup.php'));
   }
   $requirements['hash'] = array(
-    'title' => $t('hash'),
-    'value' => $has_hash ? $t('Enabled') : $t('Not found'),
+    'title' => t('hash'),
+    'value' => $has_hash ? t('Enabled') : t('Not found'),
   );
   if (!$has_hash) {
     $requirements['hash']['severity'] = REQUIREMENT_ERROR;
-    $requirements['hash']['description'] = $t('The testing framework could not be installed because the PHP <a href="@hash_url">hash</a> extension is disabled.', array('@hash_url' => 'http://php.net/manual/book.hash.php'));
+    $requirements['hash']['description'] = t('The testing framework could not be installed because the PHP <a href="@hash_url">hash</a> extension is disabled.', array('@hash_url' => 'http://php.net/manual/book.hash.php'));
   }
 
   $requirements['php_domdocument'] = array(
-    'title' => $t('PHP DOMDocument class'),
-    'value' => $has_domdocument ? $t('Enabled') : $t('Not found'),
+    'title' => t('PHP DOMDocument class'),
+    'value' => $has_domdocument ? t('Enabled') : t('Not found'),
   );
   if (!$has_domdocument) {
     $requirements['php_domdocument']['severity'] = REQUIREMENT_ERROR;
-    $requirements['php_domdocument']['description'] = $t('The testing framework requires the DOMDocument class to be available. Check the configure command at the <a href="@link-phpinfo">PHP info page</a>.', array('@link-phpinfo' => url('admin/reports/status/php')));
+    $requirements['php_domdocument']['description'] = t('The testing framework requires the DOMDocument class to be available. Check the configure command at the <a href="@link-phpinfo">PHP info page</a>.', array('@link-phpinfo' => url('admin/reports/status/php')));
   }
 
   // SimpleTest currently needs 2 cURL options which are incompatible with
   // having PHP's open_basedir restriction set.
   // See http://drupal.org/node/674304.
   $requirements['php_open_basedir'] = array(
-    'title' => $t('PHP open_basedir restriction'),
-    'value' => $open_basedir ? $t('Enabled') : $t('Disabled'),
+    'title' => t('PHP open_basedir restriction'),
+    'value' => $open_basedir ? t('Enabled') : t('Disabled'),
   );
   if ($open_basedir) {
     $requirements['php_open_basedir']['severity'] = REQUIREMENT_ERROR;
-    $requirements['php_open_basedir']['description'] = $t('The testing framework requires the PHP <a href="@open_basedir-url">open_basedir</a> restriction to be disabled. Check your webserver configuration or contact your web host.', array('@open_basedir-url' => 'http://php.net/manual/ini.core.php#ini.open-basedir'));
+    $requirements['php_open_basedir']['description'] = t('The testing framework requires the PHP <a href="@open_basedir-url">open_basedir</a> restriction to be disabled. Check your webserver configuration or contact your web host.', array('@open_basedir-url' => 'http://php.net/manual/ini.core.php#ini.open-basedir'));
   }
 
   // Check the current memory limit. If it is set too low, SimpleTest will fail
@@ -65,7 +64,7 @@ function simpletest_requirements($phase) {
   $memory_limit = ini_get('memory_limit');
   if (!drupal_check_memory_limit(SIMPLETEST_MINIMUM_PHP_MEMORY_LIMIT, $memory_limit)) {
     $requirements['php_memory_limit']['severity'] = REQUIREMENT_ERROR;
-    $requirements['php_memory_limit']['description'] = $t('The testing framework requires the PHP memory limit to be at least %memory_minimum_limit. The current value is %memory_limit. <a href="@url">Follow these steps to continue</a>.', array('%memory_limit' => $memory_limit, '%memory_minimum_limit' => SIMPLETEST_MINIMUM_PHP_MEMORY_LIMIT, '@url' => 'http://drupal.org/node/207036'));
+    $requirements['php_memory_limit']['description'] = t('The testing framework requires the PHP memory limit to be at least %memory_minimum_limit. The current value is %memory_limit. <a href="@url">Follow these steps to continue</a>.', array('%memory_limit' => $memory_limit, '%memory_minimum_limit' => SIMPLETEST_MINIMUM_PHP_MEMORY_LIMIT, '@url' => 'http://drupal.org/node/207036'));
   }
 
   return $requirements;
diff --git a/core/modules/system/system.api.php b/core/modules/system/system.api.php
index 30ee8b7f99bb..943e99a84330 100644
--- a/core/modules/system/system.api.php
+++ b/core/modules/system/system.api.php
@@ -2285,8 +2285,6 @@ function hook_file_url_alter(&$uri) {
  * Drupal itself (by install.php) with an installation profile or later by hand.
  * As a consequence, install-time requirements must be checked without access
  * to the full Drupal API, because it is not available during install.php.
- * For localization you should for example use $t = get_t() to
- * retrieve the appropriate localization function name (t() or st()).
  * If a requirement has a severity of REQUIREMENT_ERROR, install.php will abort
  * or at least the module will not install.
  * Other severity levels have no effect on the installation.
@@ -2325,13 +2323,11 @@ function hook_file_url_alter(&$uri) {
  */
 function hook_requirements($phase) {
   $requirements = array();
-  // Ensure translations don't break during installation.
-  $t = get_t();
 
   // Report Drupal version
   if ($phase == 'runtime') {
     $requirements['drupal'] = array(
-      'title' => $t('Drupal'),
+      'title' => t('Drupal'),
       'value' => VERSION,
       'severity' => REQUIREMENT_INFO
     );
@@ -2339,11 +2335,11 @@ function hook_requirements($phase) {
 
   // Test PHP version
   $requirements['php'] = array(
-    'title' => $t('PHP'),
+    'title' => t('PHP'),
     'value' => ($phase == 'runtime') ? l(phpversion(), 'admin/reports/status/php') : phpversion(),
   );
   if (version_compare(phpversion(), DRUPAL_MINIMUM_PHP) < 0) {
-    $requirements['php']['description'] = $t('Your PHP installation is too old. Drupal requires at least PHP %version.', array('%version' => DRUPAL_MINIMUM_PHP));
+    $requirements['php']['description'] = t('Your PHP installation is too old. Drupal requires at least PHP %version.', array('%version' => DRUPAL_MINIMUM_PHP));
     $requirements['php']['severity'] = REQUIREMENT_ERROR;
   }
 
@@ -2352,19 +2348,19 @@ function hook_requirements($phase) {
     $cron_last = \Drupal::state()->get('system.cron_last');
 
     if (is_numeric($cron_last)) {
-      $requirements['cron']['value'] = $t('Last run !time ago', array('!time' => format_interval(REQUEST_TIME - $cron_last)));
+      $requirements['cron']['value'] = t('Last run !time ago', array('!time' => format_interval(REQUEST_TIME - $cron_last)));
     }
     else {
       $requirements['cron'] = array(
-        'description' => $t('Cron has not run. It appears cron jobs have not been setup on your system. Check the help pages for <a href="@url">configuring cron jobs</a>.', array('@url' => 'http://drupal.org/cron')),
+        'description' => t('Cron has not run. It appears cron jobs have not been setup on your system. Check the help pages for <a href="@url">configuring cron jobs</a>.', array('@url' => 'http://drupal.org/cron')),
         'severity' => REQUIREMENT_ERROR,
-        'value' => $t('Never run'),
+        'value' => t('Never run'),
       );
     }
 
-    $requirements['cron']['description'] .= ' ' . $t('You can <a href="@cron">run cron manually</a>.', array('@cron' => url('admin/reports/status/run-cron')));
+    $requirements['cron']['description'] .= ' ' . t('You can <a href="@cron">run cron manually</a>.', array('@cron' => url('admin/reports/status/run-cron')));
 
-    $requirements['cron']['title'] = $t('Cron maintenance tasks');
+    $requirements['cron']['title'] = t('Cron maintenance tasks');
   }
 
   return $requirements;
@@ -2962,7 +2958,7 @@ function hook_install_tasks(&$install_state) {
     // entered data which requires that batch processing will need to occur
     // later on.
     'myprofile_data_import_form' => array(
-      'display_name' => st('Data import options'),
+      'display_name' => t('Data import options'),
       'type' => 'form',
     ),
     // Similarly, to implement this task, your profile would define a function
@@ -2973,7 +2969,7 @@ function hook_install_tasks(&$install_state) {
     // can simply define as many tasks of type 'form' as you wish to execute,
     // and the forms will be presented to the user, one after another.
     'myprofile_settings_form' => array(
-      'display_name' => st('Additional options'),
+      'display_name' => t('Additional options'),
       'type' => 'form',
     ),
     // This is an example of a task that performs batch operations. To
@@ -2984,7 +2980,7 @@ function hook_install_tasks(&$install_state) {
     // hidden and skipped unless your profile set it to TRUE in one of the
     // previous tasks.
     'myprofile_batch_processing' => array(
-      'display_name' => st('Import additional data'),
+      'display_name' => t('Import additional data'),
       'display' => $myprofile_needs_batch_processing,
       'type' => 'batch',
       'run' => $myprofile_needs_batch_processing ? INSTALL_TASK_RUN_IF_NOT_COMPLETED : INSTALL_TASK_SKIP,
diff --git a/core/modules/system/system.install b/core/modules/system/system.install
index 31feac56071d..54c1d66de323 100644
--- a/core/modules/system/system.install
+++ b/core/modules/system/system.install
@@ -20,13 +20,11 @@
 function system_requirements($phase) {
   global $base_url;
   $requirements = array();
-  // Ensure translations don't break during installation.
-  $t = get_t();
 
   // Report Drupal version
   if ($phase == 'runtime') {
     $requirements['drupal'] = array(
-      'title' => $t('Drupal'),
+      'title' => t('Drupal'),
       'value' => VERSION,
       'severity' => REQUIREMENT_INFO,
       'weight' => -10,
@@ -38,8 +36,8 @@ function system_requirements($phase) {
     if ($profile != 'standard') {
       $info = system_get_info('module', $profile);
       $requirements['install_profile'] = array(
-        'title' => $t('Installation profile'),
-        'value' => $t('%profile_name (%profile-%version)', array(
+        'title' => t('Installation profile'),
+        'value' => t('%profile_name (%profile-%version)', array(
           '%profile_name' => $info['name'],
           '%profile' => $profile,
           '%version' => $info['version']
@@ -53,7 +51,7 @@ function system_requirements($phase) {
   // Web server information.
   $software = $_SERVER['SERVER_SOFTWARE'];
   $requirements['webserver'] = array(
-    'title' => $t('Web server'),
+    'title' => t('Web server'),
     'value' => $software,
   );
 
@@ -61,21 +59,21 @@ function system_requirements($phase) {
   $phpversion = phpversion();
   if (function_exists('phpinfo')) {
     $requirements['php'] = array(
-      'title' => $t('PHP'),
-      'value' => ($phase == 'runtime') ? $phpversion .' ('. l($t('more information'), 'admin/reports/status/php') .')' : $phpversion,
+      'title' => t('PHP'),
+      'value' => ($phase == 'runtime') ? $phpversion .' ('. l(t('more information'), 'admin/reports/status/php') .')' : $phpversion,
     );
   }
   else {
     $requirements['php'] = array(
-      'title' => $t('PHP'),
+      'title' => t('PHP'),
       'value' => $phpversion,
-      'description' => $t('The phpinfo() function has been disabled for security reasons. To see your server\'s phpinfo() information, change your PHP settings or contact your server administrator. For more information, <a href="@phpinfo">Enabling and disabling phpinfo()</a> handbook page.', array('@phpinfo' => 'http://drupal.org/node/243993')),
+      'description' => t('The phpinfo() function has been disabled for security reasons. To see your server\'s phpinfo() information, change your PHP settings or contact your server administrator. For more information, <a href="@phpinfo">Enabling and disabling phpinfo()</a> handbook page.', array('@phpinfo' => 'http://drupal.org/node/243993')),
       'severity' => REQUIREMENT_INFO,
     );
   }
 
   if (version_compare($phpversion, DRUPAL_MINIMUM_PHP) < 0) {
-    $requirements['php']['description'] = $t('Your PHP installation is too old. Drupal requires at least PHP %version.', array('%version' => DRUPAL_MINIMUM_PHP));
+    $requirements['php']['description'] = t('Your PHP installation is too old. Drupal requires at least PHP %version.', array('%version' => DRUPAL_MINIMUM_PHP));
     $requirements['php']['severity'] = REQUIREMENT_ERROR;
     // If PHP is old, it's not safe to continue with the requirements check.
     return $requirements;
@@ -83,7 +81,7 @@ function system_requirements($phase) {
 
   // Test PHP register_globals setting.
   $requirements['php_register_globals'] = array(
-    'title' => $t('PHP register globals'),
+    'title' => t('PHP register globals'),
   );
   $register_globals = trim(ini_get('register_globals'));
   // Unfortunately, ini_get() may return many different values, and we can't
@@ -92,17 +90,17 @@ function system_requirements($phase) {
   // (register_globals off), when it is in fact on. We can only guarantee
   // register_globals is off if the value returned is 'off', '', or 0.
   if (!empty($register_globals) && strtolower($register_globals) != 'off') {
-    $requirements['php_register_globals']['description'] = $t('<em>register_globals</em> is enabled. Drupal requires this configuration directive to be disabled. Your site may not be secure when <em>register_globals</em> is enabled. The PHP manual has instructions for <a href="@url">how to change configuration settings</a>.', array('@url' => 'http://php.net/configuration.changes'));
+    $requirements['php_register_globals']['description'] = t('<em>register_globals</em> is enabled. Drupal requires this configuration directive to be disabled. Your site may not be secure when <em>register_globals</em> is enabled. The PHP manual has instructions for <a href="@url">how to change configuration settings</a>.', array('@url' => 'http://php.net/configuration.changes'));
     $requirements['php_register_globals']['severity'] = REQUIREMENT_ERROR;
-    $requirements['php_register_globals']['value'] = $t("Enabled ('@value')", array('@value' => $register_globals));
+    $requirements['php_register_globals']['value'] = t("Enabled ('@value')", array('@value' => $register_globals));
   }
   else {
-    $requirements['php_register_globals']['value'] = $t('Disabled');
+    $requirements['php_register_globals']['value'] = t('Disabled');
   }
 
   // Test for PHP extensions.
   $requirements['php_extensions'] = array(
-    'title' => $t('PHP extensions'),
+    'title' => t('PHP extensions'),
   );
 
   $missing_extensions = array();
@@ -128,30 +126,30 @@ function system_requirements($phase) {
   }
 
   if (!empty($missing_extensions)) {
-    $description = $t('Drupal requires you to enable the PHP extensions in the following list (see the <a href="@system_requirements">system requirements page</a> for more information):', array(
+    $description = t('Drupal requires you to enable the PHP extensions in the following list (see the <a href="@system_requirements">system requirements page</a> for more information):', array(
       '@system_requirements' => 'http://drupal.org/requirements',
     ));
 
     $description .= theme('item_list', array('items' => $missing_extensions));
 
-    $requirements['php_extensions']['value'] = $t('Disabled');
+    $requirements['php_extensions']['value'] = t('Disabled');
     $requirements['php_extensions']['severity'] = REQUIREMENT_ERROR;
     $requirements['php_extensions']['description'] = $description;
   }
   else {
-    $requirements['php_extensions']['value'] = $t('Enabled');
+    $requirements['php_extensions']['value'] = t('Enabled');
   }
 
   if ($phase == 'install' || $phase == 'update') {
     // Test for PDO (database).
     $requirements['database_extensions'] = array(
-      'title' => $t('Database support'),
+      'title' => t('Database support'),
     );
 
     // Make sure PDO is available.
     $database_ok = extension_loaded('pdo');
     if (!$database_ok) {
-      $pdo_message = $t('Your web server does not appear to support PDO (PHP Data Objects). Ask your hosting provider if they support the native PDO extension. See the <a href="@link">system requirements</a> page for more information.', array(
+      $pdo_message = t('Your web server does not appear to support PDO (PHP Data Objects). Ask your hosting provider if they support the native PDO extension. See the <a href="@link">system requirements</a> page for more information.', array(
         '@link' => 'http://drupal.org/requirements/pdo',
       ));
     }
@@ -160,7 +158,7 @@ function system_requirements($phase) {
       $drivers = drupal_detect_database_types();
       if (empty($drivers)) {
         $database_ok = FALSE;
-        $pdo_message = $t('Your web server does not appear to support any common PDO database extensions. Check with your hosting provider to see if they support PDO (PHP Data Objects) and offer any databases that <a href="@drupal-databases">Drupal supports</a>.', array(
+        $pdo_message = t('Your web server does not appear to support any common PDO database extensions. Check with your hosting provider to see if they support PDO (PHP Data Objects) and offer any databases that <a href="@drupal-databases">Drupal supports</a>.', array(
           '@drupal-databases' => 'http://drupal.org/node/270#database',
         ));
       }
@@ -168,19 +166,19 @@ function system_requirements($phase) {
       // version. (See install_verify_pdo() for details.)
       if (!defined('PDO::ATTR_DEFAULT_FETCH_MODE')) {
         $database_ok = FALSE;
-        $pdo_message = $t('Your web server seems to have the wrong version of PDO installed. Drupal requires the PDO extension from PHP core. This system has the older PECL version. See the <a href="@link">system requirements</a> page for more information.', array(
+        $pdo_message = t('Your web server seems to have the wrong version of PDO installed. Drupal requires the PDO extension from PHP core. This system has the older PECL version. See the <a href="@link">system requirements</a> page for more information.', array(
           '@link' => 'http://drupal.org/requirements/pdo#pecl',
         ));
       }
     }
 
     if (!$database_ok) {
-      $requirements['database_extensions']['value'] = $t('Disabled');
+      $requirements['database_extensions']['value'] = t('Disabled');
       $requirements['database_extensions']['severity'] = REQUIREMENT_ERROR;
       $requirements['database_extensions']['description'] = $pdo_message;
     }
     else {
-      $requirements['database_extensions']['value'] = $t('Enabled');
+      $requirements['database_extensions']['value'] = t('Enabled');
     }
   }
   else {
@@ -188,11 +186,11 @@ function system_requirements($phase) {
     $class = Database::getConnection()->getDriverClass('Install\\Tasks');
     $tasks = new $class();
     $requirements['database_system'] = array(
-      'title' => $t('Database system'),
+      'title' => t('Database system'),
       'value' => $tasks->name(),
     );
     $requirements['database_system_version'] = array(
-      'title' => $t('Database system version'),
+      'title' => t('Database system version'),
       'value' => Database::getConnection()->version(),
     );
   }
@@ -200,31 +198,31 @@ function system_requirements($phase) {
   // Test PHP memory_limit
   $memory_limit = ini_get('memory_limit');
   $requirements['php_memory_limit'] = array(
-    'title' => $t('PHP memory limit'),
+    'title' => t('PHP memory limit'),
     'value' => $memory_limit == -1 ? t('-1 (Unlimited)') : $memory_limit,
   );
 
   if (!drupal_check_memory_limit(DRUPAL_MINIMUM_PHP_MEMORY_LIMIT, $memory_limit)) {
     $description = '';
     if ($phase == 'install') {
-      $description = $t('Consider increasing your PHP memory limit to %memory_minimum_limit to help prevent errors in the installation process.', array('%memory_minimum_limit' => DRUPAL_MINIMUM_PHP_MEMORY_LIMIT));
+      $description = t('Consider increasing your PHP memory limit to %memory_minimum_limit to help prevent errors in the installation process.', array('%memory_minimum_limit' => DRUPAL_MINIMUM_PHP_MEMORY_LIMIT));
     }
     elseif ($phase == 'update') {
-      $description = $t('Consider increasing your PHP memory limit to %memory_minimum_limit to help prevent errors in the update process.', array('%memory_minimum_limit' => DRUPAL_MINIMUM_PHP_MEMORY_LIMIT));
+      $description = t('Consider increasing your PHP memory limit to %memory_minimum_limit to help prevent errors in the update process.', array('%memory_minimum_limit' => DRUPAL_MINIMUM_PHP_MEMORY_LIMIT));
     }
     elseif ($phase == 'runtime') {
-      $description = $t('Depending on your configuration, Drupal can run with a %memory_limit PHP memory limit. However, a %memory_minimum_limit PHP memory limit or above is recommended, especially if your site uses additional custom or contributed modules.', array('%memory_limit' => $memory_limit, '%memory_minimum_limit' => DRUPAL_MINIMUM_PHP_MEMORY_LIMIT));
+      $description = t('Depending on your configuration, Drupal can run with a %memory_limit PHP memory limit. However, a %memory_minimum_limit PHP memory limit or above is recommended, especially if your site uses additional custom or contributed modules.', array('%memory_limit' => $memory_limit, '%memory_minimum_limit' => DRUPAL_MINIMUM_PHP_MEMORY_LIMIT));
     }
 
     if (!empty($description)) {
       if ($php_ini_path = get_cfg_var('cfg_file_path')) {
-        $description .= ' ' . $t('Increase the memory limit by editing the memory_limit parameter in the file %configuration-file and then restart your web server (or contact your system administrator or hosting provider for assistance).', array('%configuration-file' => $php_ini_path));
+        $description .= ' ' . t('Increase the memory limit by editing the memory_limit parameter in the file %configuration-file and then restart your web server (or contact your system administrator or hosting provider for assistance).', array('%configuration-file' => $php_ini_path));
       }
       else {
-        $description .= ' ' . $t('Contact your system administrator or hosting provider for assistance with increasing your PHP memory limit.');
+        $description .= ' ' . t('Contact your system administrator or hosting provider for assistance with increasing your PHP memory limit.');
       }
 
-      $requirements['php_memory_limit']['description'] = $description . ' ' . $t('For more information, see the online handbook entry for <a href="@memory-limit">increasing the PHP memory limit</a>.', array('@memory-limit' => 'http://drupal.org/node/207036'));
+      $requirements['php_memory_limit']['description'] = $description . ' ' . t('For more information, see the online handbook entry for <a href="@memory-limit">increasing the PHP memory limit</a>.', array('@memory-limit' => 'http://drupal.org/node/207036'));
       $requirements['php_memory_limit']['severity'] = REQUIREMENT_WARNING;
     }
   }
@@ -234,12 +232,12 @@ function system_requirements($phase) {
     $conf_errors = array();
     $conf_path = conf_path();
     if (!drupal_verify_install_file($conf_path, FILE_NOT_WRITABLE, 'dir')) {
-      $conf_errors[] = $t("The directory %file is not protected from modifications and poses a security risk. You must change the directory's permissions to be non-writable.", array('%file' => $conf_path));
+      $conf_errors[] = t("The directory %file is not protected from modifications and poses a security risk. You must change the directory's permissions to be non-writable.", array('%file' => $conf_path));
     }
     foreach (array('settings.php', 'settings.local.php') as $conf_file) {
       $full_path = $conf_path . '/' . $conf_file;
       if (file_exists($full_path) && !drupal_verify_install_file($full_path, FILE_EXIST|FILE_READABLE|FILE_NOT_WRITABLE)) {
-        $conf_errors[] = $t("The file %file is not protected from modifications and poses a security risk. You must change the file's permissions to be non-writable.", array('%file' => $full_path));
+        $conf_errors[] = t("The file %file is not protected from modifications and poses a security risk. You must change the file's permissions to be non-writable.", array('%file' => $full_path));
       }
     }
     if (!empty($conf_errors)) {
@@ -250,17 +248,17 @@ function system_requirements($phase) {
         $description = theme('item_list', array('items' => $conf_errors));
       }
       $requirements['settings.php'] = array(
-        'value' => $t('Not protected'),
+        'value' => t('Not protected'),
         'severity' => REQUIREMENT_ERROR,
         'description' => $description,
       );
     }
     else {
       $requirements['settings.php'] = array(
-        'value' => $t('Protected'),
+        'value' => t('Protected'),
       );
     }
-    $requirements['settings.php']['title'] = $t('Configuration files');
+    $requirements['settings.php']['title'] = t('Configuration files');
   }
 
   // Report cron status.
@@ -271,7 +269,7 @@ function system_requirements($phase) {
     // Cron error threshold defaults to two weeks.
     $threshold_error = $cron_config->get('threshold.requirements_error');
     // Cron configuration help text.
-    $help = $t('For more information, see the online handbook entry for <a href="@cron-handbook">configuring cron jobs</a>.', array('@cron-handbook' => 'http://drupal.org/cron'));
+    $help = t('For more information, see the online handbook entry for <a href="@cron-handbook">configuring cron jobs</a>.', array('@cron-handbook' => 'http://drupal.org/cron'));
 
     // Determine when cron last ran.
     $cron_last = Drupal::state()->get('system.cron_last');
@@ -289,17 +287,17 @@ function system_requirements($phase) {
     }
 
     // Set summary and description based on values determined above.
-    $summary = $t('Last run !time ago', array('!time' => format_interval(REQUEST_TIME - $cron_last)));
+    $summary = t('Last run !time ago', array('!time' => format_interval(REQUEST_TIME - $cron_last)));
     $description = '';
     if ($severity != REQUIREMENT_INFO) {
-      $description = $t('Cron has not run recently.') . ' ' . $help;
+      $description = t('Cron has not run recently.') . ' ' . $help;
     }
 
-    $description .= ' ' . $t('You can <a href="@cron">run cron manually</a>.', array('@cron' => url('admin/reports/status/run-cron')));
-    $description .= '<br />' . $t('To run cron from outside the site, go to <a href="!cron">!cron</a>', array('!cron' => url('cron/' . Drupal::state()->get('system.cron_key'), array('absolute' => TRUE))));
+    $description .= ' ' . t('You can <a href="@cron">run cron manually</a>.', array('@cron' => url('admin/reports/status/run-cron')));
+    $description .= '<br />' . t('To run cron from outside the site, go to <a href="!cron">!cron</a>', array('!cron' => url('cron/' . Drupal::state()->get('system.cron_key'), array('absolute' => TRUE))));
 
     $requirements['cron'] = array(
-      'title' => $t('Cron maintenance tasks'),
+      'title' => t('Cron maintenance tasks'),
       'severity' => $severity,
       'value' => $summary,
       'description' => $description
@@ -352,15 +350,15 @@ function system_requirements($phase) {
   }
   elseif ($phase != 'install') {
     $requirements['config directories'] = array(
-      'title' => $t('Configuration directories'),
-      'value' => $t('Not present'),
-      'description' => $t('Your %file file must define the $config_directories variable as an array containing the name of a directories in which configuration files can be written.', array('%file' => conf_path() . '/settings.php')),
+      'title' => t('Configuration directories'),
+      'value' => t('Not present'),
+      'description' => t('Your %file file must define the $config_directories variable as an array containing the name of a directories in which configuration files can be written.', array('%file' => conf_path() . '/settings.php')),
       'severity' => REQUIREMENT_ERROR,
     );
   }
 
   $requirements['file system'] = array(
-    'title' => $t('File system'),
+    'title' => t('File system'),
   );
 
   $error = '';
@@ -376,21 +374,21 @@ function system_requirements($phase) {
     $is_directory = is_dir($directory);
     if (!$is_writable || !$is_directory) {
       $description = '';
-      $requirements['file system']['value'] = $t('Not writable');
+      $requirements['file system']['value'] = t('Not writable');
       if (!$is_directory) {
-        $error .= $t('The directory %directory does not exist.', array('%directory' => $directory)) . ' ';
+        $error .= t('The directory %directory does not exist.', array('%directory' => $directory)) . ' ';
       }
       else {
-        $error .= $t('The directory %directory is not writable.', array('%directory' => $directory)) . ' ';
+        $error .= t('The directory %directory is not writable.', array('%directory' => $directory)) . ' ';
       }
       // The files directory requirement check is done only during install and runtime.
       if ($phase == 'runtime') {
-        $description = $error . $t('You may need to set the correct directory at the <a href="@admin-file-system">file system settings page</a> or change the current directory\'s permissions so that it is writable.', array('@admin-file-system' => url('admin/config/media/file-system')));
+        $description = $error . t('You may need to set the correct directory at the <a href="@admin-file-system">file system settings page</a> or change the current directory\'s permissions so that it is writable.', array('@admin-file-system' => url('admin/config/media/file-system')));
       }
       elseif ($phase == 'install') {
         // For the installer UI, we need different wording. 'value' will
         // be treated as version, so provide none there.
-        $description = $error . $t('An automated attempt to create this directory failed, possibly due to a permissions problem. To proceed with the installation, either create the directory and modify its permissions manually or ensure that the installer has the permissions to create it automatically. For more information, see INSTALL.txt or the <a href="@handbook_url">online handbook</a>.', array('@handbook_url' => 'http://drupal.org/server-permissions'));
+        $description = $error . t('An automated attempt to create this directory failed, possibly due to a permissions problem. To proceed with the installation, either create the directory and modify its permissions manually or ensure that the installer has the permissions to create it automatically. For more information, see INSTALL.txt or the <a href="@handbook_url">online handbook</a>.', array('@handbook_url' => 'http://drupal.org/server-permissions'));
         $requirements['file system']['value'] = '';
       }
       if (!empty($description)) {
@@ -402,10 +400,10 @@ function system_requirements($phase) {
       // This function can be called before the config_cache table has been
       // created.
       if ($phase == 'install' || file_default_scheme() == 'public') {
-        $requirements['file system']['value'] = $t('Writable (<em>public</em> download method)');
+        $requirements['file system']['value'] = t('Writable (<em>public</em> download method)');
       }
       else {
-        $requirements['file system']['value'] = $t('Writable (<em>private</em> download method)');
+        $requirements['file system']['value'] = t('Writable (<em>private</em> download method)');
       }
     }
   }
@@ -413,8 +411,8 @@ function system_requirements($phase) {
   // See if updates are available in update.php.
   if ($phase == 'runtime') {
     $requirements['update'] = array(
-      'title' => $t('Database updates'),
-      'value' => $t('Up to date'),
+      'title' => t('Database updates'),
+      'value' => t('Up to date'),
     );
 
     // Check installed modules.
@@ -424,8 +422,8 @@ function system_requirements($phase) {
         $default = drupal_get_installed_schema_version($module);
         if (max($updates) > $default) {
           $requirements['update']['severity'] = REQUIREMENT_ERROR;
-          $requirements['update']['value'] = $t('Out of date');
-          $requirements['update']['description'] = $t('Some modules have database schema updates to install. You should run the <a href="@update">database update script</a> immediately.', array('@update' => base_path() . 'core/update.php'));
+          $requirements['update']['value'] = t('Out of date');
+          $requirements['update']['description'] = t('Some modules have database schema updates to install. You should run the <a href="@update">database update script</a> immediately.', array('@update' => base_path() . 'core/update.php'));
           break;
         }
       }
@@ -436,17 +434,17 @@ function system_requirements($phase) {
   if ($phase == 'runtime') {
     if (settings()->get('update_free_access')) {
       $requirements['update access'] = array(
-        'value' => $t('Not protected'),
+        'value' => t('Not protected'),
         'severity' => REQUIREMENT_ERROR,
-        'description' => $t('The update.php script is accessible to everyone without authentication check, which is a security risk. You must change the @settings_name value in your settings.php back to FALSE.', array('@settings_name' => '$settings[\'update_free_access\']')),
+        'description' => t('The update.php script is accessible to everyone without authentication check, which is a security risk. You must change the @settings_name value in your settings.php back to FALSE.', array('@settings_name' => '$settings[\'update_free_access\']')),
       );
     }
     else {
       $requirements['update access'] = array(
-        'value' => $t('Protected'),
+        'value' => t('Protected'),
       );
     }
-    $requirements['update access']['title'] = $t('Access to update.php');
+    $requirements['update access']['title'] = t('Access to update.php');
   }
 
   // Display an error if a newly introduced dependency in a module is not resolved.
@@ -462,7 +460,7 @@ function system_requirements($phase) {
       $name = $file->info['name'];
       $php = $file->info['php'];
       if (version_compare($php, PHP_VERSION, '>')) {
-        $requirements['php']['description'] .= $t('@name requires at least PHP @version.', array('@name' => $name, '@version' => $php));
+        $requirements['php']['description'] .= t('@name requires at least PHP @version.', array('@name' => $name, '@version' => $php));
         $requirements['php']['severity'] = REQUIREMENT_ERROR;
       }
       // Check the module's required modules.
@@ -471,8 +469,8 @@ function system_requirements($phase) {
         // Check if the module exists.
         if (!isset($files[$required_module])) {
           $requirements["$module-$required_module"] = array(
-            'title' => $t('Unresolved dependency'),
-            'description' => $t('@name requires this module.', array('@name' => $name)),
+            'title' => t('Unresolved dependency'),
+            'description' => t('@name requires this module.', array('@name' => $name)),
             'value' => t('@required_name (Missing)', array('@required_name' => $required_module)),
             'severity' => REQUIREMENT_ERROR,
           );
@@ -486,8 +484,8 @@ function system_requirements($phase) {
         if ($compatibility) {
           $compatibility = rtrim(substr($compatibility, 2), ')');
           $requirements["$module-$required_module"] = array(
-            'title' => $t('Unresolved dependency'),
-            'description' => $t('@name requires this module and version. Currently using @required_name version @version', array('@name' => $name, '@required_name' => $required_name, '@version' => $version)),
+            'title' => t('Unresolved dependency'),
+            'description' => t('@name requires this module and version. Currently using @required_name version @version', array('@name' => $name, '@required_name' => $required_name, '@version' => $version)),
             'value' => t('@required_name (Version @compatibility required)', array('@required_name' => $required_name, '@compatibility' => $compatibility)),
             'severity' => REQUIREMENT_ERROR,
           );
@@ -505,17 +503,17 @@ function system_requirements($phase) {
     // Check for update status module.
     if (!module_exists('update')) {
       $requirements['update status'] = array(
-        'value' => $t('Not enabled'),
+        'value' => t('Not enabled'),
         'severity' => REQUIREMENT_WARNING,
-        'description' => $t('Update notifications are not enabled. It is <strong>highly recommended</strong> that you enable the Update Manager module from the <a href="@module">module administration page</a> in order to stay up-to-date on new releases. For more information, <a href="@update">Update status handbook page</a>.', array('@update' => 'http://drupal.org/documentation/modules/update', '@module' => url('admin/modules'))),
+        'description' => t('Update notifications are not enabled. It is <strong>highly recommended</strong> that you enable the Update Manager module from the <a href="@module">module administration page</a> in order to stay up-to-date on new releases. For more information, <a href="@update">Update status handbook page</a>.', array('@update' => 'http://drupal.org/documentation/modules/update', '@module' => url('admin/modules'))),
       );
     }
     else {
       $requirements['update status'] = array(
-        'value' => $t('Enabled'),
+        'value' => t('Enabled'),
       );
     }
-    $requirements['update status']['title'] = $t('Update notifications');
+    $requirements['update status']['title'] = t('Update notifications');
   }
 
   return $requirements;
diff --git a/core/modules/system/tests/modules/requirements1_test/requirements1_test.install b/core/modules/system/tests/modules/requirements1_test/requirements1_test.install
index 91caca3f5b10..80220b9e5f00 100644
--- a/core/modules/system/tests/modules/requirements1_test/requirements1_test.install
+++ b/core/modules/system/tests/modules/requirements1_test/requirements1_test.install
@@ -5,15 +5,13 @@
  */
 function requirements1_test_requirements($phase) {
   $requirements = array();
-  // Ensure translations don't break during installation.
-  $t = get_t();
 
   // Always fails requirements.
   if ('install' == $phase) {
     $requirements['requirements1_test'] = array(
-      'title' => $t('Requirements 1 Test'),
+      'title' => t('Requirements 1 Test'),
       'severity' => REQUIREMENT_ERROR,
-      'description' => $t('Requirements 1 Test failed requirements.'),
+      'description' => t('Requirements 1 Test failed requirements.'),
     );
   }
 
diff --git a/core/modules/user/user.install b/core/modules/user/user.install
index 69d96b6424e9..94c9d5d6650c 100644
--- a/core/modules/user/user.install
+++ b/core/modules/user/user.install
@@ -303,8 +303,6 @@ function user_install() {
  * helper function so that other install profiles can reuse it.
  */
 function user_install_picture_field() {
-  $t = get_t();
-
   $field = array(
     'field_name' => 'user_picture',
     'module' => 'image',
@@ -324,7 +322,7 @@ function user_install_picture_field() {
     'entity_type' => 'user',
     'label' => 'Picture',
     'bundle' => 'user',
-    'description' => $t('Your virtual face or picture.'),
+    'description' => t('Your virtual face or picture.'),
     'required' => FALSE,
     'settings' => array(
       'file_extensions' => 'png gif jpg jpeg',
diff --git a/core/profiles/standard/standard.install b/core/profiles/standard/standard.install
index 741f857c1873..0075ebd1cd6a 100644
--- a/core/profiles/standard/standard.install
+++ b/core/profiles/standard/standard.install
@@ -30,18 +30,18 @@ function standard_install() {
   $types = array(
     array(
       'type' => 'page',
-      'name' => st('Basic page'),
+      'name' => t('Basic page'),
       'base' => 'node_content',
-      'description' => st("Use <em>basic pages</em> for your static content, such as an 'About us' page."),
+      'description' => t("Use <em>basic pages</em> for your static content, such as an 'About us' page."),
       'custom' => 1,
       'modified' => 1,
       'locked' => 0,
     ),
     array(
       'type' => 'article',
-      'name' => st('Article'),
+      'name' => t('Article'),
       'base' => 'node_content',
-      'description' => st('Use <em>articles</em> for time-sensitive content like news, press releases or blog posts.'),
+      'description' => t('Use <em>articles</em> for time-sensitive content like news, press releases or blog posts.'),
       'custom' => 1,
       'modified' => 1,
       'locked' => 0,
@@ -113,7 +113,7 @@ function standard_install() {
 
   // Create a Home link in the main menu.
   $menu_link = entity_create('menu_link', array(
-    'link_title' => st('Home'),
+    'link_title' => t('Home'),
     'link_path' => '<front>',
     'menu_name' => 'main',
   ));
@@ -128,7 +128,7 @@ function standard_install() {
   $shortcut_set = shortcut_set_load('default');
   $menu_link = entity_create('menu_link', array(
     'link_path' => 'node/add',
-    'link_title' => st('Add content'),
+    'link_title' => t('Add content'),
     'weight' => -20,
   ));
   $menu_link->save();
@@ -136,7 +136,7 @@ function standard_install() {
 
   $menu_link = entity_create('menu_link', array(
     'link_path' => 'admin/content',
-    'link_title' => st('All content'),
+    'link_title' => t('All content'),
     'weight' => -19,
   ));
   $menu_link->save();
diff --git a/core/scripts/update-iso-3166.sh b/core/scripts/update-iso-3166.sh
index ec0148a4225d..e06f0595ae90 100644
--- a/core/scripts/update-iso-3166.sh
+++ b/core/scripts/update-iso-3166.sh
@@ -62,7 +62,7 @@
   // For .po translation file's sake, use double-quotes instead of escaped
   // single-quotes.
   $name = (strpos($name, '\'') !== FALSE ? '"' . $name . '"' : "'" . $name . "'");
-  $out .= '    ' . var_export($code, TRUE) . ' => $t(' . $name . '),' . "\n";
+  $out .= '    ' . var_export($code, TRUE) . ' => t(' . $name . '),' . "\n";
 }
 
 // Replace the actual PHP code in standard.inc.
@@ -70,13 +70,3 @@
 $content = file_get_contents($file);
 $content = preg_replace('/(\$countries = array\(\n)(.+?)(^\s+\);)/ms', '$1' . $out . '$3', $content);
 file_put_contents($file, $content);
-
-
-/**
- * No-op script helper.
- */
-function get_t() {
-  return function ($string) {
-    return $string;
-  };
-}
-- 
GitLab