Batch operation callback: Check the availability of local po files.
Checks the presence and creation time of po files in the local file system. The file path and the timestamp are stored.
array $sources: Array of translation source objects of projects for which to check the state of local po files.
array $context: The batch context array. The collected state is stored in the 'results' parameter of the context.
locale_translation_batch_status_fetch_remote()
locale_translation_batch_status_compare()
function locale_translation_batch_status_fetch_local($sources, &$context) {
module_load_include('compare.inc', 'locale');
// Get the status of local translation files and store the result data in the
// batch results for later processing.
foreach ($sources as $source) {
if (isset($source->files['local'])) {
locale_translation_source_check_file($source);
// If remote data was collected before, we merge it into the newly
// collected result.
if (isset($context['results'][$source->name][$source->language])) {
$source->files['remote'] = $context['results'][$source->name][$source->language]->files['remote'];
}
$context['results'][$source->name][$source->language] = $source;
}
}
}