You are here

function lingotek_bulk_mt_upload_batch_finished in Lingotek Translation 7.2

Batch Finished: Bulk Machine Translation Complete.

1 string reference to 'lingotek_bulk_mt_upload_batch_finished'
lingotek_bulk_mt_upload_batch_create in ./lingotek.batch.inc
Batch Create - Upload: Create a Bulk Machine Translate UPLOAD Batch.

File

./lingotek.batch.inc, line 480

Code

function lingotek_bulk_mt_upload_batch_finished($success, $results, $operations) {
  $messages = array();
  $result_count = count($results);
  if ($success) {

    // The 'success' (TRUE/FALSE) means no fatal PHP errors were detected. All other error management should be handled using 'results'.
    $messages[] = t('The process finished successfully.');
    $messages[] = format_plural($result_count, 'One node has been queued for translation.', '@count nodes have been queued for translation.');
  }
  else {
    $messages[] = t('The process finished with an errors.  Some content may have been missed.');
    $messages[] = format_plural($result_count, 'One node queued for translation.', '@count nodes queued for translation.');
  }
  $_SESSION['bulk_mt_batch_results'] = $messages;

  // Save data before redirect.
  drupal_goto(LINGOTEK_BASE_URL . '/mt-content-queued');
}