diff --git a/core/includes/install.core.inc b/core/includes/install.core.inc index 5ede5c1..e2e7cb3 100644 --- a/core/includes/install.core.inc +++ b/core/includes/install.core.inc @@ -1,5 +1,6 @@ getStringNames($next)) { + if (!empty($options['refresh_configuration']) && $names = LocaleModule::config()->getStringNames($next)) { $context['sandbox']['refresh']['names'] = $names; } } @@ -770,7 +771,7 @@ function locale_translate_delete_translation_files($projects = array(), $langcod */ function locale_config_batch_update_components(array $options, $langcodes = array(), $components = array()) { $langcodes = $langcodes ? $langcodes : array_keys(locale_translatable_language_list()); - if ($langcodes && $names = Locale::storage()->getComponentNames($components)) { + if ($langcodes && $names = LocaleModule::config()->getComponentNames($components)) { return locale_config_batch_build($names, $langcodes, $options); } } @@ -872,15 +873,15 @@ function locale_config_update_multiple(array $names, $langcodes = array()) { $langcodes = $langcodes ? $langcodes : array_keys(locale_translatable_language_list()); $count = 0; foreach ($names as $name) { - $wrapper = Locale::storage()->get($name); + $wrapper = LocaleModule::config()->get($name); foreach ($langcodes as $langcode) { $translation = $wrapper->getValue() ? $wrapper->getTranslation($langcode, TRUE)->getValue() : NULL; if ($translation) { - Locale::storage()->saveTranslationData($name, $langcode, $translation); + LocaleModule::config()->saveTranslationData($name, $langcode, $translation); $count++; } else { - Locale::storage()->deleteTranslationData($name, $langcode); + LocaleModule::config()->deleteTranslationData($name, $langcode); } } } diff --git a/core/modules/locale/locale.module b/core/modules/locale/locale.module index f81bc81..75c4fd7 100644 --- a/core/modules/locale/locale.module +++ b/core/modules/locale/locale.module @@ -10,6 +10,7 @@ * object files are supported. */ +use Drupal; use Drupal\locale\LocaleLookup; use Drupal\locale\LocaleConfigSubscriber; use Drupal\locale\SourceString; @@ -320,7 +321,7 @@ function locale_language_delete($language) { locale_translate_delete_translation_files(array(), array($language->langcode)); // Remove translated configuration objects. - Locale::storage()->deleteLanguageTranslations($language->langcode); + LocaleModule::config()->deleteLanguageTranslations($language->langcode); // Changing the language settings impacts the interface: _locale_invalidate_js($language->langcode); @@ -564,7 +565,7 @@ function locale_system_remove($components) { module_load_include('compare.inc', 'locale'); Drupal::moduleHandler()->loadInclude('locale', 'inc', 'bulk'); // Delete configuration translations. - Locale::storage()->deleteComponentTranslations($components, array_keys($language_list)); + LocaleModule::config()->deleteComponentTranslations($components, array_keys($language_list)); // Only when projects are removed, the translation files and records will be // deleted. Not each disabled module will remove a project. E.g. sub modules. @@ -1088,7 +1089,7 @@ function _locale_refresh_translations($langcodes, $lids = array()) { * List of string identifiers that have been updated / created. */ function _locale_refresh_configuration(array $langcodes, array $lids) { - if ($lids && $langcodes && $names = Locale::storage()->getStringNames($lids)) { + if ($lids && $langcodes && $names = LocaleModule::config()->getStringNames($lids)) { Drupal::moduleHandler()->loadInclude('locale', 'inc', 'bulk'); locale_config_update_multiple($names, $langcodes); }