You are here

function lingotek_batch_identify_translations_finished in Lingotek Translation 7.6

Same name and namespace in other branches
  1. 7.7 lingotek.util.inc \lingotek_batch_identify_translations_finished()
  2. 7.5 lingotek.util.inc \lingotek_batch_identify_translations_finished()
1 string reference to 'lingotek_batch_identify_translations_finished'
lingotek_batch_identify_translations in ./lingotek.util.inc
Batch Create: Lingotek Identify Content - create informative lingotek_entity_ data (in lingotek table) for pre-existing content

File

./lingotek.util.inc, line 1872
Utility functions.

Code

function lingotek_batch_identify_translations_finished($success, $results, $operations) {
  $status_added = 0;
  foreach ($results as $result) {
    if (strpos($result, 'INSERT') !== FALSE) {
      $status_added++;
    }
  }
  $message = format_plural(count($results), t('Identified just one existing translation.'), t('Identified @count existing translations.')) . ' ';
  $message .= $status_added > 0 ? format_plural($status_added, t('One translation status was added.'), t('@count translation statuses were added.')) : t('Translation statuses were already present.');
  drupal_set_message($message);
}