You are here

function lingotek_add_language_specific_targets_finished in Lingotek Translation 7.7

2 string references to 'lingotek_add_language_specific_targets_finished'
fix_failed_language_specific_form_submit in ./lingotek.util.inc
Runs the batch to fix failed language-specific targets
lingotek_add_language_specific_targets_batch_create in ./lingotek.batch.inc
Batch worker function for adding language-specific targets

File

./lingotek.batch.inc, line 737
Central location for batch create functions, before control is handed off to individual batch command files.

Code

function lingotek_add_language_specific_targets_finished($success, $results) {
  $message = format_plural($results['language_specific_targets'], t('1 language-specific translation has been added.'), t('@num language-specific translations have been added.', array(
    '@num' => (int) $results['language_specific_targets'],
  )));
  if ($success) {
    drupal_set_message(filter_xss($message), 'status');
  }
  else {
    drupal_set_message(filter_xss($message), 'error');
  }
  if (isset($results['language_specific_target_errors'])) {
    $message = format_plural($results['language_specific_target_errors'], t('Failed to add 1 language-specific profile.'), t('Failed to add @num language-specific translations.', array(
      '@num' => (int) $results['language_specific_target_errors'],
    )));
  }
  else {
    variable_delete('lingotek_failed_language_specific_targets');
  }
}