You are here

function _i18n_string_batch_refresh_summary in Internationalization 7

Batch operations: Print refresh summary for group

1 string reference to '_i18n_string_batch_refresh_summary'
i18n_string_refresh_batch in i18n_string/i18n_string.admin.inc
Create batch for refreshing strings

File

i18n_string/i18n_string.admin.inc, line 253
Helper functions for string administration.

Code

function _i18n_string_batch_refresh_summary($group, &$context) {
  if ($context['results'][$group]['result']) {
    drupal_set_message(t("Successfully refreshed @count strings for %group", array(
      '@count' => $context['results'][$group]['refresh'],
      '%group' => i18n_string_group_info($group, 'title'),
    )));
    if (!empty($context['results'][$group]['deleted'])) {
      drupal_set_message(t('Deleted @count left over strings.', array(
        '@count' => $context['results'][$group]['deleted'],
      )));
    }
  }
  else {
    drupal_set_message(t("Cannot refresh strings for %group.", array(
      '%group' => i18n_string_group_info($group, 'title'),
    )), 'warning');
  }
}