if (empty($project_info->type
)) { $updates[$langcode]['not_found'
][] =
[ 'name' =>
$project_info->name == 'drupal' ?
$this->
t('Drupal core'
) :
$project_data[$project_info->name
]->info
['name'
],
'version' =>
$project_info->version,
'info' =>
$this->
createInfoString($project_info),
];
} // Translation update found for this project-language combination.
elseif ($project_info->type == LOCALE_TRANSLATION_LOCAL ||
$project_info->type == LOCALE_TRANSLATION_REMOTE
) { $local =
$project_info->files
[LOCALE_TRANSLATION_LOCAL
] ?? NULL;
$remote =
$project_info->files
[LOCALE_TRANSLATION_REMOTE
] ?? NULL;
$recent =
_locale_translation_source_compare($local,
$remote) == LOCALE_TRANSLATION_SOURCE_COMPARE_LT ?
$remote :
$local;
$updates[$langcode]['updates'
][] =
[ 'name' =>
$project_info->name == 'drupal' ?
$this->
t('Drupal core'
) :
$project_data[$project_info->name
]->info
['name'
],
'version' =>
$project_info->version,
'timestamp' =>
$recent->timestamp,
];
} } } return $updates;
}