You are here

function template_preprocess_l10n_update_last_check in Localization update 7.2

Prepares variables for most recent translation update templates.

Displays the last time we checked for locale update data. In addition to properly formatting the given timestamp, this function also provides a "Check manually" link that refreshes the available update and redirects back to the same page.

Default template: l10n_update-translation-last-check.tpl.php.

Parameters

array $variables: An associative array containing:

  • last: The timestamp when the site last checked for available updates.

See also

l10n_update_status_form()

File

./l10n_update.admin.inc, line 547
Admin settings and update page.

Code

function template_preprocess_l10n_update_last_check(array &$variables) {
  $last = $variables['last'];
  $variables['last_checked'] = $last ? t('Last checked: !time ago', array(
    '!time' => format_interval(REQUEST_TIME - $last),
  )) : t('Last checked: never');
  $variables['link'] = l(t('Check manually'), 'admin/config/regional/translate/check');
}