diff --git a/core/includes/install.inc b/core/includes/install.inc index d34b39c..1ba317e 100644 --- a/core/includes/install.inc +++ b/core/includes/install.inc @@ -700,7 +700,7 @@ function st($string, array $args = array(), array $options = array()) { // that multiple files end with the same extension, even if unlikely. $files = install_find_translation_files($install_state['parameters']['langcode']); if (!empty($files)) { - include_once drupal_get_path('module', 'locale') . '/lib/Drupal/locale/Gettext.php'; + drupal_classloader_register('locale', drupal_get_path('module', 'locale')); $strings = Gettext::filesToArray($install_state['parameters']['langcode'], $files); } } diff --git a/core/lib/Drupal/Component/Gettext/PoMemoryWriter.php b/core/lib/Drupal/Component/Gettext/PoMemoryWriter.php index be798a3..11c5361 100644 --- a/core/lib/Drupal/Component/Gettext/PoMemoryWriter.php +++ b/core/lib/Drupal/Component/Gettext/PoMemoryWriter.php @@ -39,7 +39,7 @@ class PoMemoryWriter implements PoWriterInterface { $item->setTranslation(implode(LOCALE_PLURAL_DELIMITER, $item->getTranslation())); } $context = $item->getContext(); - $this->_items[$context != NULL ? $item->getContext() : ''][$item->getSource()] = $item->getTranslation(); + $this->_items[$context != NULL ? $context : ''][$item->getSource()] = $item->getTranslation(); } /**