Index: l10n_community/l10n_community.css
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/l10n_server/l10n_community/Attic/l10n_community.css,v
retrieving revision 1.1.2.10.2.6.2.12
diff -u -p -r1.1.2.10.2.6.2.12 l10n_community.css
--- l10n_community/l10n_community.css	16 Jun 2010 08:08:25 -0000	1.1.2.10.2.6.2.12
+++ l10n_community/l10n_community.css	16 Jun 2010 09:45:39 -0000
@@ -1,4 +1,4 @@
-/* $Id: l10n_community.css,v 1.1.2.10.2.6.2.12 2010/06/16 08:08:25 goba Exp $ */
+/* $Id: l10n_community.css,v 1.1.2.10.2.6.2.11 2010/06/05 07:37:08 goba Exp $ */
 
 div.admin .admin-panel-contribute {
   background: #ffb;
@@ -44,6 +44,7 @@ div.admin .l10n-next-action a {
 }
 .l10n-community-overview td.rowhead, .l10n-community-overview thead th.rowhead {
   text-align: left;
+  padding: 0.4em;
 }
 .l10n-community-progress {
   height: 1em;
@@ -122,3 +123,7 @@ em.l10n-community-marker {
 #autocomplete {
   text-align:left;
 }
+
+.page-translate .item-list .pager {
+  padding: 1em;
+}
Index: l10n_community/l10n_community.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/l10n_server/l10n_community/Attic/l10n_community.module,v
retrieving revision 1.1.2.23.2.66.2.16
diff -u -p -r1.1.2.23.2.66.2.16 l10n_community.module
--- l10n_community/l10n_community.module	16 Jun 2010 08:08:25 -0000	1.1.2.23.2.66.2.16
+++ l10n_community/l10n_community.module	16 Jun 2010 09:45:39 -0000
@@ -1,5 +1,5 @@
 <?php
-// $Id: l10n_community.module,v 1.1.2.23.2.66.2.16 2010/06/16 08:08:25 goba Exp $
+// $Id: l10n_community.module,v 1.1.2.23.2.66.2.15 2010/06/09 18:31:33 goba Exp $
 
 /**
  * @file
@@ -336,11 +336,14 @@ function l10n_community_block($op = 'lis
           'info' => t('Localization server help'),
         ),
         'stats' => array(
-          'info' => t('Localization server quick statistics'),
+          'info' => t('Localization server statistics'),
         ),
         'contribute' => array(
           'info' => t('Localization server contribute'),
         ),
+        'contributors' => array(
+          'info' => t('Localization server contributors'),
+        ),
       );
       return $blocks;
 
@@ -353,13 +356,72 @@ function l10n_community_block($op = 'lis
           return;
         case 'stats':
           if (user_access('access localization community')) {
-            return l10n_community_block_stats();
+            if (arg(0) == 'translate') {
+              $arg1 = arg(1);
+              $arg2 = arg(2);
+              $arg3 = arg(3);
+              if (empty($arg1)) {
+                return l10n_community_block_stats_front();
+              }
+              elseif ($arg1 == 'projects' && !empty($arg2) && empty($arg3)) {
+                $project = l10n_server_get_projects(array('uri' => $arg2));
+                include_once drupal_get_path('module', 'l10n_community') .'/pages.inc';
+                return l10n_community_block_stats_project($project);
+              }
+              elseif ($arg1 == 'languages' && !empty($arg2) && empty($arg3)) {
+                $languages = l10n_community_get_languages();
+                include_once drupal_get_path('module', 'l10n_community') .'/pages.inc';
+                return l10n_community_block_stats_language($languages[$arg2]);
+              }
+            }
           }
           return;
         case 'contribute':
           if (user_access('access localization community')) {
-            include_once drupal_get_path('module', 'l10n_community') .'/welcome.inc';
-            return l10n_community_block_contribute();
+            if (arg(0) == 'translate') {
+              $arg1 = arg(1);
+              $arg2 = arg(2);
+              $arg3 = arg(3);
+              if (empty($arg1)) {
+                include_once drupal_get_path('module', 'l10n_community') .'/welcome.inc';
+                return l10n_community_block_contribute_front();
+              }
+              elseif ($arg1 == 'projects' && !empty($arg2) && empty($arg3)) {
+                // Return contribution call to action on the project pages.
+                return array(
+                  'subject' => t('Contribute'),
+                  'content' => '<p class="info">'. t('Select a language from the overview to review translations and contribute to the translation efforts. The export tab allows exporting of translation templates, but translations can also be exported on the language pages.') .'</p>'
+                );
+              }
+              elseif ($arg1 == 'languages' && !empty($arg2) && empty($arg3)) {
+                $languages = l10n_community_get_languages();
+                $next_action = '';
+                if ($groups = module_invoke('l10n_groups', 'get_groups')) {
+                  if (isset($groups[$languages[$arg2]->language]) && node_access('view', $group_node = node_load($groups[$language->language])) && !isset($user->og_groups[$groups[$languages[$arg2]->language]])) {
+                    $next_action = '<div class="l10n-next-action">'. og_subscribe_link($group_node) .'</div>';
+                  }
+                }
+                if (empty($next_action) && user_access('submit suggestions')) {
+                  $next_action = '<div class="l10n-next-action">'. l(t('Translate'), 'translate/languages/'. $languages[$arg2]->language .'/translate') .'</div>';
+                }
+                // Return contribution call to action on language pages.
+                return array(
+                  'subject' => t('Contribute'),
+                  'content' => $next_action .'<p class="info">'. t('Different tabs allow you to view existing translations, suggest new ones, import translations completed offline or export translations for use for offline work.') .'</p>'
+                );
+              }
+            }
+          }
+          return;
+        case 'contributors':
+          if (user_access('access localization community')) {
+            $arg2 = arg(2);
+            $arg3 = arg(3);
+            if (arg(0) == 'translate' && (arg(1) == 'languages') && !empty($arg2) && empty($arg3)) {
+              $languages = l10n_community_get_languages();
+              include_once drupal_get_path('module', 'l10n_community') .'/pages.inc';
+              return l10n_community_block_contributors_language($languages[$arg2]);
+            }
           }
           return;
       }
@@ -456,7 +518,7 @@ function l10n_community_block_help() {
 /**
  * Stats block, also reused on welcome.inc.
  */
-function l10n_community_block_stats() {
+function l10n_community_block_stats_front() {
   $stats = array();
   $stats_numbers = l10n_community_get_stats();
   if (isset($stats_numbers['groups'])) {
Index: l10n_community/pages.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/l10n_server/l10n_community/Attic/pages.inc,v
retrieving revision 1.1.2.20.2.24.2.18
diff -u -p -r1.1.2.20.2.24.2.18 pages.inc
--- l10n_community/pages.inc	16 Jun 2010 08:08:25 -0000	1.1.2.20.2.24.2.18
+++ l10n_community/pages.inc	16 Jun 2010 09:45:40 -0000
@@ -1,5 +1,5 @@
 <?php
-// $Id: pages.inc,v 1.1.2.20.2.24.2.18 2010/06/16 08:08:25 goba Exp $
+// $Id: pages.inc,v 1.1.2.20.2.24.2.17 2010/06/10 12:27:16 goba Exp $
 
 /**
  * @file
@@ -137,8 +137,27 @@ function l10n_community_overview_languag
   }
 
   $languages = l10n_community_get_languages();
-  $page_structure = module_invoke_all('l10n_community_build_page', 'language', array($languages[$langcode]));
-  drupal_alter('l10n_community_page', $page_structure, 'language', array($languages[$langcode]));
+  $content_output = module_invoke('l10n_groups', 'l10n_community_build_language_page', $languages[$langcode]);
+  if (empty($content_output)) {
+    // Try to fill in with taxonomy.
+    if (module_exists('taxonomy')) {
+      if ($term = taxonomy_get_term_by_name('l10n-server-'. $languages[$langcode]->language)) {
+        // Found tag, look for posts.
+        $result = taxonomy_select_nodes(array($term[0]->tid), 'or', 0, TRUE);
+        while ($node = db_fetch_object($result)) {
+          $content_output .= node_view(node_load($node->nid), 1);
+        }
+      }
+      if (empty($content_output)) {
+        // Either no such tag, or that tag has no posts currently.
+        $content_output = '<p>'. t('There are currently no posts set for display here. Mark posts to display here with the %tagname tag, using the taxonomy module.', array('%tagname' => 'l10n-server-'. $languages[$langcode]->language)) .'</p>';
+      }
+    }
+    else {
+      // No way found to fill in content here.
+      $content_output = '<p>'. t('No posts to display') .'</p>';
+    }
+  }
 
   // Set title and breadcrumb. Do this late since the OG code will attempt to
   // set a title and a breadcrumb that is not fitting for us.
@@ -151,7 +170,7 @@ function l10n_community_overview_languag
     )
   );
 
-  return theme('l10n_community_page', $page_structure);
+  return $content_output;
 }
 
 /**
@@ -183,165 +202,76 @@ function l10n_community_overview_project
   }
 
   $project = l10n_server_get_projects(array('uri' => $uri));
-  $page_structure = module_invoke_all('l10n_community_build_page', 'project', array($project, $languages));
-  drupal_alter('l10n_community_page', $page_structure, 'project', array($project, $languages));
-  return theme('l10n_community_page', $page_structure);
+  $block = l10n_community_language_progress_for_project($project, $languages, t('Translations overview'), t('Overall status of translations'));
+  return $block['content'];
 }
 
 /**
- * Implementation of hook_l10n_community_build_page().
+ * Generate block data about project stats.
  */
-function l10n_community_l10n_community_build_page($page_key, $params) {
-  if ($page_key == 'project') {
-    list($project, $languages) = $params;
-    $page = array();
-
-    // Stats information on current project status per language.
-    $page['#left']['stats'] = array(
-      '#weight' => 1,
-      '#block' => l10n_community_language_progress_for_project($project, $languages, t('Translations overview'), t('Overall status of translations'))
-    );
-
-    // Call for contributions.
-    $page['#right']['contribute'] = array(
-      '#weight' => 1,
-      '#block' => array(
-        'title' => t('Contribute'),
-        'description' => t('Export, translate, review'),
-        'content' => '<p class="info">'. t('Select a language from the overview to review translations and contribute to the translation efforts. The export tab allows exporting of translation templates, but translations can also be exported on the language pages.') .'</p>'
-      ),
-      '#classes' => array('admin-panel-contribute'),
-    );
+function l10n_community_block_stats_project($project) {
+  $num_source = l10n_community_get_string_count('project', $project->pid);
+  $releases = l10n_server_get_releases($project->uri, FALSE);
 
-    // Summary of some interesting data about the project.
-    $num_source = l10n_community_get_string_count('project', $project->pid);
-    $releases = l10n_server_get_releases($project->uri, FALSE);
-    $num_parsed = 0;
-    foreach ($releases as $release) {
-      if ($release->last_parsed > 0) {
-        $num_parsed++;
-      }
+  $num_parsed = 0;
+  foreach ($releases as $release) {
+    if ($release->last_parsed > 0) {
+      $num_parsed++;
     }
-    $num_warnings = db_result(db_query("SELECT COUNT(DISTINCT e.eid) FROM {l10n_server_project} p LEFT JOIN {l10n_server_release} r ON p.pid = r.pid LEFT JOIN {l10n_server_error} e ON r.rid = e.rid WHERE p.uri = '%s'", $project->uri));
-    $page['#right']['summary'] = array(
-      '#weight' => 2,
-      '#block' => array(
-        'title' => t('@project summary', array('@project' => $project->title)),
-        'description' => t('Some details we know about this project'),
-        'content' => theme('item_list', array(
-          t('Project home') .': '. (!empty($project->home_link) ? ('<a href="'. check_url($project->home_link) .'">'. check_plain($project->home_link) .'</a>') : t('Not available')),
-          format_plural(count($releases), '1 release known', '@count releases known'),
-          format_plural($num_parsed, '1 release parsed', '@count releases parsed'),
-          format_plural($num_source, '1 source string in total', '@count source strings in total'),
-          ($num_warnings == 0 ? t('No source code warnings') : l(format_plural($num_warnings, '1 source code warning', '@count source code warnings'), 'translate/projects/'. $project->uri .'/warnings')),
-        ))
-      )
-    );
-
-    return $page;
   }
-  elseif ($page_key == 'language') {
-    list($language) = $params;
 
-    // Provide a summary of the activity.
-    $stats_numbers = l10n_community_get_stats($language->language);
-    $page['#right']['summary'] = array(
-      '#weight' => 1,
-      '#block' => array(
-        'title' => t('Progress status'),
-        'description' => t('Status overview'),
-        'content' => theme('item_list', array(
-          format_plural($stats_numbers['users'], '1 contributor', '@count contributors'),
-          format_plural($stats_numbers['strings'], '1 string to translate', '@count strings to translate'),
-          format_plural($stats_numbers['translations'], '1 translation recorded', '@count translations recorded'),
-          format_plural($stats_numbers['suggestions'], '1 suggestion awaiting approval', '@count suggestions awaiting approval'),
-        ))
-      )
-    );
+  $num_warnings = db_result(db_query("SELECT COUNT(DISTINCT e.eid) FROM {l10n_server_project} p LEFT JOIN {l10n_server_release} r ON p.pid = r.pid LEFT JOIN {l10n_server_error} e ON r.rid = e.rid WHERE p.uri = '%s'", $project->uri));
 
-    // Provide a summary of top contributors.
-    $people = l10n_community_get_string_count('top-people', $language->language);
-    $block = array(
-      'title' => t('Top contributors'),
-      'description' => t('People with most approved translations'),
-    );
-    $list = array();
-    foreach ($people as $translator) {
-      // $translator can be passed to theme('username'), since it has 'name' and 'uid'.
-      $list[] = format_plural($translator->sum, '!name - 1 translation', '!name - @count translations', array('!name' => theme('username', $translator)));
-    }
-    if ($list) {
-      $block['content'] = theme('item_list', $list);
-    }
-    else {
-      $block['content'] = '<p>'. t('Nobody contributed to this translation yet.') .'</p>';
-    }
-    $page['#right']['top-contributors'] = array(
-      '#weight' => 5,
-      '#block' => $block
-    );
-
-    return $page;
-  }
+  return array(
+    'subject' => t('Project statistics'),
+    'content' => theme('item_list', array(
+      t('Project home') .': '. (!empty($project->home_link) ? ('<a href="'. check_url($project->home_link) .'">'. check_plain($project->home_link) .'</a>') : t('Not available')),
+      format_plural(count($releases), '1 release known', '@count releases known'),
+      format_plural($num_parsed, '1 release parsed', '@count releases parsed'),
+      format_plural($num_source, '1 source string in total', '@count source strings in total'),
+      ($num_warnings == 0 ? t('No source code warnings') : l(format_plural($num_warnings, '1 source code warning', '@count source code warnings'), 'translate/projects/'. $project->uri .'/warnings')),
+    ))
+  );
 }
 
 /**
- * Implementation of hook_l10n_community_page_alter().
+ * Generate block data about language stats.
  */
-function l10n_community_l10n_community_page_alter(&$page, $page_key, $params) {
-  if ($page_key == 'language') {
-    list($language) = $params;
-
-    // If another module did not fill in the posts.
-    if (!isset($page['#left']['posts'])) {
-      $content_output = '';
-
-      // Try to fill in with taxonomy.
-      if (module_exists('taxonomy')) {
-        if ($term = taxonomy_get_term_by_name('l10n-server-'. $language->language)) {
-          // Found tag, look for posts.
-          $result = taxonomy_select_nodes(array($term[0]->tid), 'or', 0, TRUE);
-          while ($node = db_fetch_object($result)) {
-            $content_output .= node_view(node_load($node->nid), 1);
-          }
-        }
-        if (empty($content_output)) {
-          // Either no such tag, or that tag has no posts currently.
-          $content_output = '<p>'. t('There are currently no posts set for display here. Mark posts to display here with the %tagname tag, using the taxonomy module.', array('%tagname' => 'l10n-server-'. $language->language)) .'</p>';
-        }
-      }
-      else {
-        // No way found to fill in content here.
-        $content_output = '<p>'. t('No posts to display') .'</p>';
-      }
-
-      $page['#left']['posts'] = array(
-        '#weight' => -1,
-        '#block' => array (
-          'title' => t('Highlighted content'),
-          'description' => t('Important posts for @language', array('@language' => $language->name)),
-          'content' => $content_output,
-        ),
-      );
-    }
+function l10n_community_block_stats_language($language) {
+  // Provide a summary of the activity.
+  $stats_numbers = l10n_community_get_stats($language->language);
+  return array(
+    'subject' => t('Translation statistics'),
+    'content' => theme('item_list', array(
+      format_plural($stats_numbers['users'], '1 contributor', '@count contributors'),
+      format_plural($stats_numbers['strings'], '1 string to translate', '@count strings to translate'),
+      format_plural($stats_numbers['translations'], '1 translation recorded', '@count translations recorded'),
+      format_plural($stats_numbers['suggestions'], '1 suggestion awaiting approval', '@count suggestions awaiting approval'),
+    ))
+  );
+}
 
-    if (!isset($page['#right']['contribute'])) {
-      // Urge people to join and contribute.
-      $next_action = '';
-      if (user_access('submit suggestions')) {
-        $next_action = '<div class="l10n-next-action">'. l(t('Translate'), 'translate/languages/'. $language->language .'/translate') .'</div>';
-      }
-      $page['#right']['contribute'] = array(
-        '#weight' => -1,
-        '#block' => array(
-          'title' => t('Contribute'),
-          'description' => t('Review, translate, import'),
-          'content' => $next_action .'<p class="info">'. t('Different tabs allow you to view existing translations, suggest new ones, import translations completed offline or export translations for use for offline work.') .'</p>'
-        ),
-        '#classes' => array('admin-panel-contribute'),
-      );
-    }
+/**
+ * Generate block data about language stats.
+ */
+function l10n_community_block_contributors_language($language) {
+  // Provide a summary of top contributors.
+  $people = l10n_community_get_string_count('top-people', $language->language);
+  $block = array(
+    'subject' => t('Top contributors'),
+  );
+  $list = array();
+  foreach ($people as $translator) {
+    // $translator can be passed to theme('username'), since it has 'name' and 'uid'.
+    $list[] = format_plural($translator->sum, '!name - 1 translation', '!name - @count translations', array('!name' => theme('username', $translator)));
+  }
+  if ($list) {
+    $block['content'] = theme('item_list', $list);
   }
+  else {
+    $block['content'] = '<p>'. t('Nobody contributed to this translation yet.') .'</p>';
+  }
+  return $block;
 }
 
 /**
Index: l10n_community/welcome.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/l10n_server/l10n_community/Attic/welcome.inc,v
retrieving revision 1.1.2.7.2.17.2.10
diff -u -p -r1.1.2.7.2.17.2.10 welcome.inc
--- l10n_community/welcome.inc	16 Jun 2010 08:08:25 -0000	1.1.2.7.2.17.2.10
+++ l10n_community/welcome.inc	16 Jun 2010 09:45:40 -0000
@@ -1,5 +1,5 @@
 <?php
-// $Id: welcome.inc,v 1.1.2.7.2.17.2.10 2010/06/16 08:08:25 goba Exp $
+// $Id: welcome.inc,v 1.1.2.7.2.17.2.9 2010/06/09 18:31:33 goba Exp $
 
 /**
  * @file
@@ -32,7 +32,7 @@ function l10n_community_welcome_page() {
 /**
  * Block builder function to generate the main contribution block.
  */
-function l10n_community_block_contribute() {
+function l10n_community_block_contribute_front() {
   // Build contribution call to action block.
   $content = '';
   if (!$GLOBALS['user']->uid) {
Index: l10n_groups/l10n_groups.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/l10n_server/l10n_groups/Attic/l10n_groups.module,v
retrieving revision 1.1.2.4.2.10.2.6
diff -u -p -r1.1.2.4.2.10.2.6 l10n_groups.module
--- l10n_groups/l10n_groups.module	10 Jun 2010 12:21:02 -0000	1.1.2.4.2.10.2.6
+++ l10n_groups/l10n_groups.module	16 Jun 2010 09:45:40 -0000
@@ -344,61 +344,14 @@ function l10n_groups_broadcast($langcode
 // = Summary page outputs ======================================================
 
 /**
- * Implementation of hook_l10n_community_build_page().
+ * Language page content creator.
  */
-function l10n_groups_l10n_community_build_page($page_key, $params) {
-  if ($page_key == 'language') {
-    list($language) = $params;
-
-    $content_output = $next_action = '';
-    $groups = l10n_groups_get_groups();
-    if (isset($groups[$language->language]) && node_access('view', $group_node = node_load($groups[$language->language]))) {
-      $content_output = node_view($group_node, FALSE, TRUE);
-      if (!isset($user->og_groups[$groups[$language->language]])) {
-        $next_action = '<div class="l10n-next-action">'. og_subscribe_link($group_node) .'</div>';
-      }
-    }
-    else {
-      $content_output = '<p>'. t('Group not found or not accessible. No posts to display') .'</p>';
-    }
-
-    // Urge people to join this group.
-    if (empty($next_action) && user_access('submit suggestions')) {
-      $next_action = '<div class="l10n-next-action">'. l(t('Translate'), 'translate/languages/'. $language->language .'/translate') .'</div>';
-    }
-    $page['#right']['contribute'] = array(
-      '#weight' => -1,
-      '#block' => array(
-        'title' => t('Contribute'),
-        'description' => t('Review, translate, import'),
-        'content' => $next_action .'<p class="info">'. t('Different tabs allow you to view existing translations, suggest new ones, import translations completed offline or export translations for use for offline work.') .'</p>'
-      ),
-      '#classes' => array('admin-panel-contribute'),
-    );
-
-    // Add group posts to left column.
-    $page['#left']['posts'] = array(
-      '#weight' => -1,
-      '#block' => array (
-        'title' => t('Highlighted content'),
-        'description' => t('Important posts for @language', array('@language' => $language->name)),
-        'content' => $content_output,
-      ),
-    );
-
-    // Add group block into right column.
-    $og_block = module_invoke('og', 'block_details');
-    if (!empty($og_block)) {
-      $page['#right']['group'] = array(
-        '#weight' => 10,
-        '#block' => array(
-          'title' => t('Group links'),
-          'description' => t('Create content, manage your membership'),
-          'content' => $og_block['content'],
-        ),
-      );
-    }
-
-    return $page;
+function l10n_groups_l10n_community_build_language_page($language) {
+  $groups = l10n_groups_get_groups();
+  if (isset($groups[$language->language]) && node_access('view', $group_node = node_load($groups[$language->language]))) {
+    return node_view($group_node, FALSE, TRUE);
+  }
+  else {
+    return '<p>'. t('Group not found or not accessible. No posts to display') .'</p>';
   }
 }
Index: l10n_packager/l10n_packager.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/l10n_server/l10n_packager/Attic/l10n_packager.module,v
retrieving revision 1.1.2.4.2.12
diff -u -p -r1.1.2.4.2.12 l10n_packager.module
--- l10n_packager/l10n_packager.module	14 Jun 2010 14:19:16 -0000	1.1.2.4.2.12
+++ l10n_packager/l10n_packager.module	16 Jun 2010 09:45:40 -0000
@@ -35,14 +35,6 @@ define('L10N_PACKAGER_API_VERSION', '1.1
  * Implementation of hook_menu().
  */
 function l10n_packager_menu() {
-  // Downloads link printer, accessed from drupal.org via a little JS widget.
-  $items['translate/remote/downloads/%'] = array(
-    'title' => 'Download links for a project',
-    'page callback' => 'l10n_packager_build_download_links_page',
-    'page arguments' => array(3),
-    'access arguments' => array('access localization community'),
-  );
-
   // Administration tools.
   $items['admin/l10n_server/packager'] = array(
     'title' => 'Packaging tools',
@@ -110,6 +102,48 @@ function l10n_packager_check_updates() {
   return array($count_check, $count_files, $time);
 }
 
+/**
+ * Implementation of hook_block().
+ */
+function l10n_packager_block($op = 'list', $delta = 0, $edit = array()) {
+  switch ($op) {
+    case 'list':
+      $blocks = array(
+        'download' => array(
+          'info' => t('Localization packager downloads'),
+        ),
+      );
+      return $blocks;
+
+    case 'view':
+      switch ($delta) {
+        case 'download':
+          if (user_access('access localization community')) {
+            if (arg(0) == 'translate') {
+              $arg1 = arg(1);
+              $arg2 = arg(2);
+              $arg3 = arg(3);
+              if ($arg1 == 'projects' && !empty($arg2) && empty($arg3)) {
+                $project = l10n_server_get_projects(array('uri' => $arg2));
+                // Return contribution call to action on the project pages.
+                return array(
+                  'subject' => t('Downloads'),
+                  'content' => l10n_packager_build_download_links($project->uri)
+                );
+              }
+              elseif ($arg1 == 'languages' && !empty($arg2) && empty($arg3)) {
+                return array(
+                  'subject' => t('Downloads'),
+                  'content' => l(t('Browse and download translations'), variable_get('l10n_packager_update_url', file_create_url(l10n_packager_directory())))
+                );
+              }
+            }
+          }
+          return;
+      }
+  }
+}
+
 // == Language list export =====================================================
 
 /**
@@ -232,41 +266,6 @@ function l10n_packager_get_filepath($rel
 }
 
 /**
- * Implementation of hook_l10n_community_build_page().
- */
-function l10n_packager_l10n_community_build_page($page_key, $params) {
-  if ($page_key == 'project') {
-    list($project, $languages) = $params;
-    $page = array();
-
-    // Wrap it in a block.
-    $page['#right'][] = array(
-      '#weight' => -2,
-      '#block' => array(
-        'title' => t('Downloads'),
-        'description' => t('@project translations are available', array('@project' => $project->title)),
-        'content' => l10n_packager_build_download_links($project->uri),
-      )
-    );
-
-    return $page;
-  }
-  elseif ($page_key == 'language') {
-    list($language) = $params;
-    // Wrap it in a block.
-    $page['#right'][] = array(
-      '#weight' => -2,
-      '#block' => array(
-        'title' => t('Downloads'),
-        'description' => t('@language translations are available', array('@language' => $language->name)),
-        'content' => l(t('Browse and download translations'), variable_get('l10n_packager_update_url', file_create_url(l10n_packager_directory())))
-      )
-    );
-    return $page;
-  }
-}
-
-/**
  * Build a list of download links per core compatibility for a project.
  */
 function l10n_packager_build_download_links($uri) {
@@ -306,31 +305,3 @@ function l10n_packager_build_download_li
 
   return $rendered;
 }
-
-/**
- * Page callback version for download link renderer.
- *
- * Use this to present a list of downloads on a remote server. Example use:
- *
- * @code
- * <div id="l10n-server-download-links">Loading...</a>
- * <script type="text/javascript">
- * function l10nPackagerDownloadLinks(markup) {
- *  jQuery('#l10n-server-download-links').html(markup);
- * }
- * </script>
- * <script type="text/javascript" src="http://l10nserver-host/translate/remote/downloads/myproject"></script>
- * @endcode
- */
-function l10n_packager_build_download_links_page($uri) {
-  // Buffer the output, since drupal_json() will set an HTTP header.
-  ob_start();
-  // Invoke a function which is expected to be implemented by the client.
-  // This is the current possible way to do cross-domain AHAH communication.
-  echo 'l10nPackagerDownloadLinks(';
-  drupal_json(l10n_packager_build_download_links($uri));
-  echo ');';
-  // Now ready to flush the buffer and end the response.
-  ob_end_flush();
-  exit;
-}
