function locale_translation_project_list

Fetch an array of projects for translation update.

Return value

array Array of project data including .info file data.

2 calls to locale_translation_project_list()
LocaleCompareTest::testLocaleCompare in drupal/core/modules/locale/lib/Drupal/locale/Tests/LocaleCompareTest.php
Test for translation status storage and translation status comparison.
locale_translation_build_projects in drupal/core/modules/locale/locale.compare.inc
Builds list of projects and stores the result in the database.
1 string reference to 'locale_translation_project_list'
LocaleCompareTest::testLocaleCompare in drupal/core/modules/locale/lib/Drupal/locale/Tests/LocaleCompareTest.php
Test for translation status storage and translation status comparison.

File

drupal/core/modules/locale/locale.compare.inc, line 195
The API for comparing project translation status with available translation.

Code

function locale_translation_project_list() {

  // This function depends on Update module. We degrade gracefully.
  if (!module_exists('update')) {
    return array();
  }
  $projects =& drupal_static(__FUNCTION__, array());
  if (empty($projects)) {
    module_load_include('compare.inc', 'update');
    $config = config('locale.settings');
    $projects = array();
    $additional_whitelist = array(
      'interface translation project',
      'interface translation server pattern',
    );
    $module_data = _locale_translation_prepare_project_list(system_rebuild_module_data(), 'module');
    $theme_data = _locale_translation_prepare_project_list(system_rebuild_theme_data(), 'theme');
    update_process_info_list($projects, $module_data, 'module', TRUE, $additional_whitelist);
    update_process_info_list($projects, $theme_data, 'theme', TRUE, $additional_whitelist);
    if ($config
      ->get('translation.check_disabled_modules')) {
      update_process_info_list($projects, $module_data, 'module', FALSE, $additional_whitelist);
      update_process_info_list($projects, $theme_data, 'theme', FALSE, $additional_whitelist);
    }

    // Allow other modules to alter projects before fetching and comparing.
    drupal_alter('locale_translation_projects', $projects);
  }
  return $projects;
}