Returns HTML for translation status information per language.
array $variables: An associative array containing:
locale_translation_status_form()
function theme_locale_translation_update_info($variables) {
$description = $details = '';
// Build output for available updates.
if (isset($variables['updates'])) {
if ($variables['updates']) {
$releases = array();
foreach ($variables['updates'] as $update) {
$modules[] = $update['name'];
$releases[] = t('@module (@date)', array(
'@module' => $update['name'],
'@date' => format_date($update['timestamp'], 'html_date'),
));
}
}
$description = '<span class="text">' . t('Updates for: @modules', array(
'@modules' => implode(', ', $modules),
)) . '</span>';
$details = theme('item_list', array(
'items' => $releases,
));
}
// Build output for updates not found.
if (isset($variables['not_found'])) {
if (empty($description)) {
$description = '<span class="text">' . format_plural(count($variables['not_found']), 'Missing translations for one project', 'Missing translations for @count projects') . '</span>';
}
if ($variables['not_found']) {
$releases = array();
foreach ($variables['not_found'] as $update) {
$version = $update['version'] ? $update['version'] : t('no version');
$releases[] = t('@module (@version).', array(
'@module' => $update['name'],
'@version' => $version,
)) . ' ' . $update['info'];
}
}
if ($details) {
$details .= t('Missing translations for:');
}
$details .= theme('item_list', array(
'items' => $releases,
));
}
$output = '<div class="inner" tabindex="0" role="button">';
$output .= '<span class="update-description-prefix element-invisible">Show description</span>' . $description;
$output .= $details ? '<div class="details">' . $details . '</div>' : '';
$output .= '</div>';
return $output;
}