function locale_translation_batch_fetch_sources

Loads translation source data for the projects to be updated.

Source data is loaded from cache and stored in the context results array. Source data contains the translations status per project / per language and whether translation updates are available and where the updates can be retrieved from. The data is stored in the $context['results'] parameter so that other batch operations can take this data as input for their operation.

See also

locale_translation_batch_fetch_download()

locale_translation_batch_fetch_import()

locale_translation_batch_fetch_update_status()

locale_translation_batch_status_compare()

1 string reference to 'locale_translation_batch_fetch_sources'
_locale_translation_fetch_operations in drupal/core/modules/locale/locale.fetch.inc
Helper function to construct the batch operations to fetch translations.

File

drupal/core/modules/locale/locale.batch.inc, line 218
Batch process to check the availability of remote or local po files.

Code

function locale_translation_batch_fetch_sources($projects, $langcodes, &$context) {
  $context['results']['input'] = locale_translation_load_sources($projects, $langcodes);

  // If this batch operation is preceded by the status check operations, the
  // results of those operation are stored in the context. We remove them here
  // to keep the result records clean.
  unset($context['results']['files']);
  unset($context['results']['failed_files']);
}