Saves the status of translation sources in static cache.
array $data: Array of translation source data, structured by project name and langcode.
function locale_translation_status_save($data) {
// Followup issue: http://drupal.org/node/1842362
// Split status storage per module/language and expire individually. This will
// improve performance for large sites.
$status = Drupal::state()
->get('locale.translation_status');
$status = empty($status) ? array() : $status;
// Merge the new data into the existing structured status array.
foreach ($data as $project => $languages) {
foreach ($languages as $langcode => $source) {
$status[$project][$langcode] = $source;
}
}
Drupal::state()
->set('locale.translation_status', $status);
Drupal::state()
->set('locale.translation_last_checked', REQUEST_TIME);
}