function drush_locale_check

master locale.d8.drush.inc drush_locale_check()

Checks for available translation updates.

@todo This can be simplified once https://www.drupal.org/node/2631584 lands in Drupal core.

See also

\Drupal\locale\Controller\LocaleController::checkTranslation()

File

commands/core/locale.d8.drush.inc, line 49
Provides Drush commands related to Interface Translation.

Code

function drush_locale_check() {
  \Drupal::moduleHandler()->loadInclude('locale', 'inc', 'locale.compare');

  // Check translation status of all translatable project in all languages.
  // First we clear the cached list of projects. Although not strictly
  // necessary, this is helpful in case the project list is out of sync.
  locale_translation_flush_projects();
  locale_translation_check_projects();

  // Execute a batch if required. A batch is only used when remote files
  // are checked.
  if (batch_get()) {
    drush_backend_batch_process();
  }
}