Index: google_analytics_api.admin.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/google_analytics_api/google_analytics_api.admin.inc,v
retrieving revision 1.10
diff -u -r1.10 google_analytics_api.admin.inc
--- google_analytics_api.admin.inc	5 Oct 2009 04:58:22 -0000	1.10
+++ google_analytics_api.admin.inc	12 Nov 2009 21:12:28 -0000
@@ -15,7 +15,7 @@
 
   if (google_analytics_api_check_token()) {
     $form['login_status'] = array(
-      '#value' => t('<p>Currently you have granted access to a Google Analytics account.  Please choose the profile below that contains statistics for this site.</p>'),
+      '#value' => '<p>' . t('Currently you have granted access to a Google Analytics account. Please choose the profile below that contains statistics for this site.') . '</p>',
       '#weight' => -10,
     );
     $form['logout'] = array(
@@ -28,7 +28,7 @@
       '#title' => t('Profile'),
       '#options' => google_analytics_api_admin_account_data_options(),
       '#default_value' => variable_get('google_analytics_api_profile_id', 0),
-      '#description' => t('Choose your website\'s profile'),
+      '#description' => t("Choose your website's profile."),
       '#required' => TRUE,
       '#weight' => -2,
     );
@@ -40,7 +40,7 @@
   }
   else {
     $form['logout_status'] = array(
-      '#value' => t('<p>In order for you to access your Google Analytics account through Drupal, you need to grant access to your account.  This gives Drupal permission to contact the Google Analytics server and download statistics about your site.</p>'),
+      '#value' => '<p>' . t('In order for you to access your Google Analytics account through Drupal, you need to grant access to your account. This gives Drupal permission to contact the Google Analytics server and download statistics about your site.') . '</p>',
       '#weight' => -10,
     );
     $form['buttons']['submit'] = array(
@@ -60,10 +60,10 @@
     $options = array();
     $i = 0;
     if (!$accounts) {
-      return array(variable_get('google_analytics_api_profile_id', 0) => 'Account listing unavailable.  Currently selected account has ID: ' . variable_get('google_analytics_api_profile_id', 0));
+      return array(variable_get('google_analytics_api_profile_id', 0) => t('Account listing unavailable. Currently selected account has ID: @profile-id.', array('@profile-id' => variable_get('google_analytics_api_profile_id', 0))));
     }
     foreach ($accounts as $account) {
-      $options[$account->getProfileId()] = $account->getTitle() . ' (' . $account->getProfileId() . ')';
+      $options[$account->getProfileId()] = t('@title (@profile-id)', array('@title' => $account->getTitle(), '@profile-id' => $account->getProfileId()));
     }
     return $options;
 }
@@ -98,7 +98,7 @@
       $id = $accounts[0]->getProfileId();
       variable_set('google_analytics_api_profile_id', $id);
     }
-    drupal_set_message(t('You have granted access to your Google account.  Drupal will be able to download information from the account until you revoke access.'));
+    drupal_set_message(t('You have granted access to your Google account. Drupal will be able to download information from the account until you revoke access.'));
     header('Location: ' . gapiUrl::currentUrlWithoutGet());
     exit;
   }
Index: google_analytics_api.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/google_analytics_api/google_analytics_api.module,v
retrieving revision 1.22
diff -u -r1.22 google_analytics_api.module
--- google_analytics_api.module	5 Oct 2009 04:58:22 -0000	1.22
+++ google_analytics_api.module	12 Nov 2009 21:12:28 -0000
@@ -13,8 +13,8 @@
  */
 function google_analytics_api_menu() {
   $items['admin/settings/google-analytics-api'] = array(
-    'title' => t('Google Analytics API settings'),
-    'description' => t('Manage the currently logged in Analytics account'),
+    'title' => 'Google Analytics API settings',
+    'description' => 'Manage the currently logged in Analytics account.',
     'page callback' => 'drupal_get_form',
     'file' => 'google_analytics_api.admin.inc',
     'page arguments' => array('google_analytics_api_admin'),
@@ -29,7 +29,7 @@
  * Implementation of hook_perm().
  */
 function google_analytics_api_perm() {
-  return array('administer Google Analytics settings');
+  return array('administer google analytics settings');
 }
 
 /**
@@ -38,7 +38,7 @@
 function google_analytics_api_current_token($silent = FALSE) {
   $token = variable_get('google_analytics_api_token', NULL);
   if (!$token && !$silent) {
-    drupal_set_message(t('A Google Analytics API method has been called that requires access to a Google account.  Please visit the ' . l('administration page', 'admin/settings/google_analytics_api') . ' to grant access.'));
+    drupal_set_message(t('A Google Analytics API method has been called that requires access to a Google account. Please visit the <a href="@admin">administration page</a> to grant access.', array('@admin' => url('admin/settings/google_analytics_api')));
   }
   return $token;
 }
@@ -49,7 +49,7 @@
 function google_analytics_api_current_profile_id($silent = FALSE) {
   $profile_id = variable_get('google_analytics_api_profile_id', NULL);
   if (!$profile_id && !$silent) {
-    drupal_set_message(t('A Google Analytics API method has been called that requires the selection of a Google Analytics profile.  Please visit the ' . l('administration page', 'admin/settings/google_analytics_api') . ' to set one.'));
+    drupal_set_message(t('A Google Analytics API method has been called that requires the selection of a Google Analytics profile. Please visit the <a href="@admin">administration page</a> to set one.', array('@admin' => url('admin/settings/google_analytics_api')));
   }
   return $profile_id;
 }
@@ -93,7 +93,7 @@
 function google_analytics_api_gapi() {
   static $gapi;
 
-  if (user_access('administer Google Analytics settings')) {
+  if (user_access('administer google analytics settings')) {
     if ($gapi) {
       return $gapi;
     }
Index: reports/google_analytics_reports.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/google_analytics_api/reports/google_analytics_reports.module,v
retrieving revision 1.4
diff -u -r1.4 google_analytics_reports.module
--- reports/google_analytics_reports.module	5 Oct 2009 04:58:22 -0000	1.4
+++ reports/google_analytics_reports.module	12 Nov 2009 21:12:29 -0000
@@ -11,23 +11,23 @@
  */
 function google_analytics_reports_menu() {
   $items['admin/google-analytics/report'] = array(
-    'title' => t('Google Analytics Report Query'),
+    'title' => 'Google Analytics Report Query',
     'page callback' => 'drupal_get_form',
     'page arguments' => array('google_analytics_reports_query_form'),
-    'access arguments' => array('access Google Analytics reports'),
+    'access arguments' => array('access google analytics reports'),
     'type' => MENU_CALLBACK,
   );
   $items['statistics'] = array(
-    'title' => t('Google Analytics API Statistics'),
+    'title' => 'Google Analytics API Statistics',
     'page callback' => 'google_analytics_reports_statistics_page',
-    'access arguments' => array('access Google Analytics reports'),
+    'access arguments' => array('access google analytics reports'),
     'type' => MENU_CALLBACK,
   );
   $items['node/%node/statistics'] = array(
-    'title' => t('Statistics'),
+    'title' => 'Statistics',
     'page callback' => 'google_analytics_reports_statistics_page',
     'page arguments' => array(1, 'node'),
-    'access arguments' => array('access Google Analytics reports'),
+    'access arguments' => array('access google analytics reports'),
     'type' => MENU_LOCAL_TASK,
     'weight' => 10,
   );
@@ -39,7 +39,7 @@
  * Implementation of hook_perm().
  */
 function google_analytics_reports_api_perm() {
-  return array('access Google Analytics reports');
+  return array('access google analytics reports');
 }
 
 /**
@@ -49,7 +49,7 @@
   $form = array();
 
   $form['query']['info'] = array(
-    '#value' => t('Please see ' . l('Google Analytics Data API Reference', 'http://code.google.com/apis/analytics/docs/gdata/gdataReferenceDimensionsMetrics.html') . ' for a list of dimensions and metrics.'),
+    '#value' => t('Please see the <a href="@api-reference">Google Analytics Data API Reference</a> for a list of dimensions and metrics.', array('@api-reference' => 'http://code.google.com/apis/analytics/docs/gdata/gdataReferenceDimensionsMetrics.html')),
   );
   $form['query']['dimensions'] = array(
     '#type' => 'textfield',
@@ -65,7 +65,7 @@
   );
   $form['query']['sort_metric'] = array(
     '#type' => 'textfield',
-    '#title' => t('Sort Metric'),
+    '#title' => t('Sort metric'),
     '#maxlength' => 300,
     '#description' => t('(e.g. -entrances, pageviews)'),
   );
@@ -77,7 +77,7 @@
   );
   $form['query']['start_date'] = array(
     '#type' => 'date',
-    '#title' => t('Start Date'),
+    '#title' => t('Start date'),
   );
   $form['query']['no_start_date'] = array(
     '#type' => 'checkbox',
@@ -87,7 +87,7 @@
   );
   $form['query']['end_date'] = array(
     '#type' => 'date',
-    '#title' => t('End Date'),
+    '#title' => t('End date'),
   );
   $form['query']['no_end_date'] = array(
     '#type' => 'checkbox',
@@ -97,17 +97,17 @@
   );
   $form['query']['start_index'] = array(
     '#type' => 'textfield',
-    '#title' => t('Start Index'),
+    '#title' => t('Start index'),
     '#default_value' => 1,
   );
   $form['query']['max_results'] = array(
     '#type' => 'textfield',
-    '#title' => t('Maximum Results'),
+    '#title' => t('Maximum results'),
     '#default_value' => 10000,
   );
   $form['buttons']['submit'] = array(
     '#type' => 'submit',
-    '#value' => t('Submit query'),
+    '#value' => t('Execute query'),
   );
   $form['#redirect'] = FALSE;
 
@@ -172,7 +172,7 @@
     $row = array_merge($row, $entry->getMetrics());
     $rows[] = $row;
   }
-  $totals = array(t('Aggregate Value'));
+  $totals = array(t('Aggregate value'));
   $totals = array_pad($totals, sizeof($dimensions), '');
   $totals = array_merge($totals, google_analytics_api_gapi()->getMetrics());
   $rows[] = $totals;
@@ -328,13 +328,13 @@
   }
 
   // Ensure user has permission to view this block.
-  if (!user_access('access Google Analytics reports')) {
+  if (!user_access('access google analytics reports')) {
     return FALSE;
   }
 
   // Ensure the user is logged in.
   if (!google_analytics_api_gapi()) {
-    return 'Please ' . l('grant access', 'admin/settings/google_analytics_api') . ' to your Google account.';
+    return t('Please <a href="@admin">grant access</a> to your Google account.', array('@admin' => url('admin/settings/google_analytics_api')));
   }
 
   // Grab the data.
@@ -348,7 +348,7 @@
 
   // Check for data.
   if (!$rows) {
-    return '<p>No analytics data is currently available for this path.</p>';
+    return '<p>' . t('No analytics data is currently available for this path.') . '</p>';
   }
 
   // Format and perform calculations to display charts.
@@ -364,12 +364,12 @@
   }
 
   // Create charts.
-  $pageviews_chart = _google_analytics_reports_sparkline_chart('page_views', t('Page Views'), $chart_pageviews, $chart_dates);
-  $avg_time_chart = _google_analytics_reports_sparkline_chart('avg_time', t('Average Time (s)'), $chart_avg_time, $chart_dates);
-  $avg_bounce_rate = _google_analytics_reports_sparkline_chart('bounce_rate', t('Bounce Rate (%)'), $chart_bounce_rate, $chart_dates);
+  $pageviews_chart = _google_analytics_reports_sparkline_chart('page_views', t('Page views'), $chart_pageviews, $chart_dates);
+  $avg_time_chart = _google_analytics_reports_sparkline_chart('avg_time', t('Average time (s)'), $chart_avg_time, $chart_dates);
+  $avg_bounce_rate = _google_analytics_reports_sparkline_chart('bounce_rate', t('Bounce rate (%)'), $chart_bounce_rate, $chart_dates);
 
   // Text description.
-  $description = t('<p>Statistics for past 14 days:</p>');
+  $description = '<p>' . t('Statistics for past 14 days:') . '</p>';
   $description .= '<p><strong>/' . drupal_get_path_alias($_GET['q']) . '</strong></p>';
 
   // See more link.
@@ -424,13 +424,13 @@
     $path = $_GET['path'];
   }
   if (!$path) {
-    return '<p>' . t('This will become a page with overall statistics for the entire site.  For now please view statistics for individual paths by clicking the link in the statistics block.') . '</p>';
+    return '<p>' . t('This will become a page with overall statistics for the entire site. For now please view statistics for individual paths by clicking the link in the statistics block.') . '</p>';
   }
   elseif (is_object($path)) {
     $path = $path->path;
   }
 
-  $output = t('<p>These paths were searched for statistics:</p>');
+  $output = '<p>' . t('These paths were searched for statistics:') . '</p>';
 
   $aliases = _google_analytics_reports_path_aliases($path);
   foreach ($aliases as $key => $value) {
@@ -450,7 +450,7 @@
 
   // Check for data.
   if (!$rows) {
-    return '<p>No analytics data is currently available for this path.</p>';
+    return '<p>' . t('No analytics data is currently available for this path.') . '</p>';
   }
 
   // Format and perform calculations to display charts.
@@ -466,9 +466,9 @@
   }
 
   // Create charts.
-  $output .= chart_render(_google_analytics_reports_main_chart('page_views', t('Page Views'), $chart_pageviews, $chart_dates));
-  $output .= chart_render($avg_time_chart = _google_analytics_reports_main_chart('avg_time', t('Average Time (s)'), $chart_avg_time, $chart_dates));
-  $output .= chart_render(_google_analytics_reports_main_chart('bounce_rate', t('Bounce Rate (%)'), $chart_bounce_rate, $chart_dates));
+  $output .= chart_render(_google_analytics_reports_main_chart('page_views', t('Page views'), $chart_pageviews, $chart_dates));
+  $output .= chart_render($avg_time_chart = _google_analytics_reports_main_chart('avg_time', t('Average time (s)'), $chart_avg_time, $chart_dates));
+  $output .= chart_render(_google_analytics_reports_main_chart('bounce_rate', t('Bounce rate (%)'), $chart_bounce_rate, $chart_dates));
 
   // Query for browser usage information.
   $request = array(
@@ -496,7 +496,7 @@
   // Create browser chart.
   $chart = array(
     '#chart_id' => 'browsers',
-    '#title' => 'Browser Usage',
+    '#title' => 'Browser usage',
     '#type' => CHART_TYPE_PIE,
     '#size' => chart_size(600, 300),
     '#data' => $filtered_browsers,
@@ -539,7 +539,7 @@
     '#data_colors' => array('ffffff', 'edf0d4', '13390a'),
   );
 
-  $output .= t('<h3>Geographical Usage</h3>');
+  $output .= '<h3>' . t('Geographical usage') . '</h3>';
   $output .= chart_render($chart);
 
   // Query for referrer information.
@@ -562,7 +562,7 @@
   $referrers = array_reverse($referrers);
 
   // Create a table.
-  $headers = array('Page Views', 'Source');
+  $headers = array('Page views', 'Source');
   $rows = array();
   $threshold = $total_referrers * 0.005;
   foreach ($referrers as $site => $pageviews) {
@@ -577,7 +577,7 @@
     }
   }
 
-  $output .= t('<h3>Top Referrers (Past Month)</h3>');
+  $output .= '<h3>' . t('Top referrers (past month)') . '</h3>';
   $output .= theme('table', $headers, $rows);
 
   return $output;
Index: tests/google_analytics_api.test
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/google_analytics_api/tests/google_analytics_api.test,v
retrieving revision 1.5
diff -u -r1.5 google_analytics_api.test
--- tests/google_analytics_api.test	5 Oct 2009 04:58:22 -0000	1.5
+++ tests/google_analytics_api.test	12 Nov 2009 21:12:29 -0000
@@ -25,7 +25,7 @@
     variable_set('google_analytics_api_profile_id', NULL);
 
     // User needs permissions to access Google Analytics API data.
-    $this->web_user = $this->drupalCreateUser(array('access administration pages', 'administer Google Analytics settings'));
+    $this->web_user = $this->drupalCreateUser(array('access administration pages', 'administer google analytics settings'));
   }
 
   // grant access, revoke access, choose profile and save configuration
