You are here

function l10n_update_admin_overview in Localization update 7

Same name and namespace in other branches
  1. 6 l10n_update.admin.inc \l10n_update_admin_overview()

Page callback: Admin overview page.

1 string reference to 'l10n_update_admin_overview'
l10n_update_menu in ./l10n_update.module
Implements hook_menu().

File

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

Code

function l10n_update_admin_overview() {

  // For now we get package information provided by modules.
  $projects = l10n_update_get_projects();
  $languages = l10n_update_language_list('name');
  $build = array();
  if ($languages) {
    $history = l10n_update_get_history();
    $available = l10n_update_available_releases();
    $updates = l10n_update_build_updates($history, $available);
    $build['project_status'] = array(
      '#theme' => 'l10n_update_project_status',
      '#projects' => $projects,
      '#languages' => $languages,
      '#history' => $history,
      '#available' => $available,
      '#updates' => $updates,
    );
    $build['admin_import_form'] = drupal_get_form('l10n_update_admin_import_form', $projects, $updates);
  }
  else {
    $build['no_languages'] = array(
      '#markup' => t('No translatable language defined. <a href="/admin/config/regional/language">Add a language</a>.'),
    );
  }
  return $build;
}