function _locale_translation_batch_status_operations

Helper function to construct batch operations checking remote translation status.

Parameters

array projects: Array of project names to be processed.

array langcodes: Array of language codes.

Return value

array Array of batch operations.

2 calls to _locale_translation_batch_status_operations()
locale_translation_batch_status_build in drupal/core/modules/locale/locale.compare.inc
Builds a batch to get the status of remote and local translation files.
locale_translation_batch_update_build in drupal/core/modules/locale/locale.fetch.inc
Builds a batch to check, download and import project translations.

File

drupal/core/modules/locale/locale.compare.inc, line 329
The API for comparing project translation status with available translation.

Code

function _locale_translation_batch_status_operations($projects, $langcodes) {
  $operations = array();

  // Set the batch processes for remote sources.
  $sources = locale_translation_build_sources($projects, $langcodes);
  if (locale_translation_use_remote_source()) {
    foreach ($sources as $source) {
      $operations[] = array(
        'locale_translation_batch_status_fetch_remote',
        array(
          $source,
        ),
      );
    }
  }

  // Check for local sources, compare the results of local and remote and store
  // the most recent.
  $operations[] = array(
    'locale_translation_batch_status_fetch_local',
    array(
      $sources,
    ),
  );
  $operations[] = array(
    'locale_translation_batch_status_compare',
    array(),
  );
  return $operations;
}