You are here

function locale_translation_batch_fetch_finished in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/locale/locale.batch.inc \locale_translation_batch_fetch_finished()
  2. 9 core/modules/locale/locale.batch.inc \locale_translation_batch_fetch_finished()

Implements callback_batch_finished().

Set result message.

Parameters

bool $success: TRUE if batch successfully completed.

array $results: Batch results.

3 string references to 'locale_translation_batch_fetch_finished'
install_import_translations in core/includes/install.core.inc
Imports languages via a batch process during installation.
locale_translation_batch_fetch_build in core/modules/locale/locale.fetch.inc
Builds a batch to download and import project translations.
locale_translation_batch_update_build in core/modules/locale/locale.fetch.inc
Builds a batch to check, download and import project translations.

File

core/modules/locale/locale.batch.inc, line 219
Batch process to check the availability of remote or local po files.

Code

function locale_translation_batch_fetch_finished($success, $results) {
  \Drupal::moduleHandler()
    ->loadInclude('locale', 'inc', 'locale.bulk');
  if ($success) {
    \Drupal::state()
      ->set('locale.translation_last_checked', \Drupal::time()
      ->getRequestTime());
  }
  return locale_translate_batch_finished($success, $results);
}