Fetch an array of projects for translation update.
array Array of project data including .info file data.
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;
}