--- /c/projects/drupal/cvs-head/contributions/modules/votingapi/votingapi.module	2006-07-31 07:29:09.359375000 -0400
+++ modules/votingapi/votingapi.module	2006-07-31 06:41:10.375000000 -0400
@@ -667,11 +667,10 @@ function _votingapi_load_content($conten
 function votingapi_cache_functions() {
   static $votingapi_cache_functions;
   if (!is_array($votingapi_cache_functions)) {
-    $votingapi_cache_functions = array();
     $votingapi_cache_functions = array(
-      'average' => 'Average vote value',
-      'count' => 'Number of votes',
-      'sum' => 'Sum of vote values',
+      'average' => t('Average vote value'),
+      'count' => t('Number of votes'),
+      'sum' => t('Sum of vote values'),
     );
 
     $result = db_query('SELECT DISTINCT function FROM {votingapi_cache}');
@@ -687,7 +686,7 @@ function votingapi_cache_functions() {
 function votingapi_cache_tags() {
   static $votingapi_cache_tags;
   if (!is_array($votingapi_cache_tags)) {
-    $votingapi_cache_tags[0] = '-- Any tag --';
+    $votingapi_cache_tags[0] = t('-- Any tag --');
     $result = db_query('SELECT DISTINCT tag FROM {votingapi_cache}');
     while ($fnc = db_fetch_object($result)) {
       if (!isset($votingapi_cache_tags[$fnc->tag])) {
@@ -701,7 +700,7 @@ function votingapi_cache_tags() {
 function votingapi_cache_value_types() {
   static $votingapi_cache_value_types;
   if (!is_array($votingapi_cache_value_types)) {
-    $votingapi_cache_value_types[0] = '-- Any value type --';
+    $votingapi_cache_value_types[0] = t('-- Any value type --');
     $result = db_query('SELECT DISTINCT value_type FROM {votingapi_cache}');
     while ($fnc = db_fetch_object($result)) {
       if (!isset($votingapi_cache_value_types[$fnc->value_type])) {
@@ -715,7 +714,7 @@ function votingapi_cache_value_types() {
 function votingapi_vote_tags() {
   static $votingapi_vote_tags;
   if (!is_array($votingapi_vote_tags)) {
-    $votingapi_vote_tags[0] = '-- Any tag --';
+    $votingapi_vote_tags[0] = t('-- Any tag --');
     $result = db_query('SELECT DISTINCT tag FROM {votingapi_vote}');
     while ($fnc = db_fetch_object($result)) {
       if (!isset($votingapi_vote_tags[$fnc->tag])) {
@@ -729,7 +728,7 @@ function votingapi_vote_tags() {
 function votingapi_vote_value_types() {
   static $votingapi_vote_value_types;
   if (!is_array($votingapi_vote_value_types)) {
-    $votingapi_vote_value_types[0] = '-- Any value type --';
+    $votingapi_vote_value_types[0] = t('-- Any value type --');
     $result = db_query('SELECT DISTINCT value_type FROM {votingapi_vote}');
     while ($fnc = db_fetch_object($result)) {
       if (!isset($votingapi_vote_value_types[$fnc->value_type])) {
--- /c/projects/drupal/cvs-head/contributions/modules/votingapi/votingapi_actions.inc	2006-07-31 07:29:13.187500000 -0400
+++ modules/votingapi/votingapi_actions.inc	2006-07-31 06:41:10.437500000 -0400
@@ -192,25 +192,20 @@ function _votingapi_validate_action_set(
   $errors = array();
 
   if (!is_array($set)) {
-    $errors[] = "The set '$name' is not an array!";
+    $errors[] = t("The set '%name' is not an array!", array('%name' => $name));
     return $errors;
   }
   
   if (!isset($set['content_type']) && !isset($set['parent_name'])) {
-    $errors[] = "The set '$name' must have a content_type.";
+    $errors[] = t("The set '%name' must have a content_type.", array('%name' => $name));
   }
 
   if ($set['condition_mask'] != 'AND' && $set['condition_mask'] != 'OR') {
-    $errors[] = "The set '$name' must define a condition_mask of 'AND' or 'OR'.";
+    $errors[] = t("The set '%name' must define a condition_mask of 'AND' or 'OR'.", array('%name' => $name));
   }
 
-  if (!isset($set['conditions'])) {
-    $errors[] = "The set '$name' has no conditions defined.";
-  }
-  else {
-    if (count($set['conditions']) == 0) {
-      $errors[] = "The set '$name' has no conditions defined.";
-    }
+  if (!isset($set['conditions']) || count($set['conditions']) == 0) {
+    $errors[] = t("The set '%name' has no conditions defined.", array('%name' => $name));
   }
 
   if (is_array($set['conditions'])) {
@@ -230,17 +225,17 @@ function _votingapi_validate_action_set(
 function _votingapi_validate_action_condition($name, $condition) {
   $errors = array();
   if (!is_array($condition)) {
-    $errors[] = "The condition '$name' is not an array!";
+    $errors[] = t("The condition '%name' is not an array!", array('%name' => $name));
     return $errors;
   }
 
   if (!isset($condition['handler'])) {
-    $errors[] = "The condition '$name' has no handler.";
+    $errors[] = t("The condition '%name' has no handler.", array('%name' => $name));
   }
 
   if (!function_exists($condition['handler'])) {
     $handler = $condition['handler'];
-    $errors[] = "The condition '$name' has an invalid handler ($handler).";
+    $errors[] = t("The condition '%name' has an invalid handler (%handler).", array('%name' => $name, '%handler' => $handler));
   }
 
   return $errors;
@@ -468,7 +463,7 @@ function votingapi_vote_result_handler($
     );
     $form['comparison'] = array(
       '#type' => 'select',
-      '#options' => array('==' => 'Is', '!=' => 'Is not', '<' => 'Is less than', '>' => 'Is greater than'),
+      '#options' => array('==' => t('Is'), '!=' => t('Is not'), '<' => t('Is less than'), '>' => t('Is greater than')),
     );
     $form['value'] = array(
       '#type' => 'textfield',
@@ -478,7 +473,7 @@ function votingapi_vote_result_handler($
     return $form;
   }
   else if ($op == 'name') {
-    return array('votingapi_vote_result_handler' => 'Vote result properties');
+    return array('votingapi_vote_result_handler' => t('Vote result properties'));
   }
 }
 
@@ -577,7 +572,7 @@ function votingapi_vote_handler($op, $co
   
     $form['comparison'] = array(
       '#type' => 'select',
-      '#options' => array('==' => 'Is', '!=' => 'Is not', '<' => 'Is less than', '>' => 'Is greater than'),
+      '#options' => array('==' => t('Is'), '!=' => t('Is not'), '<' => t('Is less than'), '>' => t('Is greater than')),
     );
     $form['value'] = array(
       '#type' => 'textfield',
@@ -587,7 +582,7 @@ function votingapi_vote_handler($op, $co
     return $form;
   }
   else if ($op == 'name') {
-    return array('votingapi_vote_handler' => 'Individual vote properties');
+    return array('votingapi_vote_handler' => t('Individual vote properties'));
   }
 }
 
@@ -631,7 +626,7 @@ function votingapi_node_properties_handl
     );
     $form['comparison'] = array(
       '#type' => 'select',
-      '#options' => array('==' => 'Is', '!=' => 'Is not'),
+      '#options' => array('==' => t('Is'), '!=' => t('Is not')),
     );
     $form['value'] = array(
       '#type' => 'textfield',
@@ -641,7 +636,7 @@ function votingapi_node_properties_handl
     return $form;
   }
   else if ($op == 'name') {
-    return array('votingapi_node_properties_handler' => 'Node properties');
+    return array('votingapi_node_properties_handler' => t('Node properties'));
   }
 }
 
--- /c/projects/drupal/cvs-head/contributions/modules/votingapi/votingapi_actions.module	2006-07-31 07:29:09.390625000 -0400
+++ modules/votingapi/votingapi_actions.module	2006-07-31 06:41:10.390625000 -0400
@@ -120,10 +120,10 @@ function votingapi_actions_admin_page() 
     $output .= theme('pager', NULL, $numSets);
   }
   else {
-    $output .= t('<p>No action sets have currently been defined.</p>');
+    $output .= '<p>'. t('No action sets have currently been defined.') .'</p>';
   }
 
-  $output .= t('<p>Below are system default action sets; if you clone one of these, or create another set with the same name, it will override the default.</p>');
+  $output .= '<p>'. t('Below are system default action sets; if you clone one of these, or create another set with the same name, it will override the default.') .'</p>';
 
   $items = array();
   $default_actions = _votingapi_load_action_sets_from_modules();
@@ -135,25 +135,25 @@ function votingapi_actions_admin_page() 
     }
     else if (isset($set_status[$name])) {
       if ($set_status[$name]) {
-        $status = 'Enabled';
+        $status = t('Enabled');
       }
       else {
-        $status = 'Disabled';
+        $status = t('Disabled');
       }
     }
     else if ($set['enabled']) {
-      $status = 'Enabled';
+      $status = t('Enabled');
     }
     else {
-      $status = 'Disabled';
+      $status = t('Disabled');
     }
 
-    if ($status == 'Enabled') {
+    if ($status == t('Enabled')) {
       $links = array(l(t('clone'), "admin/votingapi_actions/add/$name"));
       $links[] = l(t('disable'), "admin/votingapi_actions/disable/$name");
       $links[] = l(t('export'), "admin/votingapi_actions/export/$name");
     }
-    else if ($status == 'Disabled') {
+    else if ($status == t('Disabled')) {
       $links = array(l(t('clone'), "admin/votingapi_actions/add/$name"));
       $links[] = l(t('enable'), "admin/votingapi_actions/enable/$name");
       $links[] = l(t('export'), "admin/votingapi_actions/export/$name");
@@ -166,7 +166,7 @@ function votingapi_actions_admin_page() 
     $output .= theme('table', array(t('Name'), t('Source'), t('Description'), t('Status'), t('Actions')), $items, array("cellpadding" => "4"), t('Default Action Sets'));
   }
   else {
-    $output .= t('<p>No action sets have currently been defined.</p>');
+    $output .= '<p>'. t('No action sets have currently been defined.') .'</p>';
   }
 
   return $output;
@@ -252,7 +252,7 @@ function votingapi_actions_set_import_va
         }
       }
     }
-}
+  }
 }
 
 /*
--- /c/projects/drupal/cvs-head/contributions/modules/votingapi/votingapi_views.inc	2006-07-31 07:29:13.218750000 -0400
+++ modules/votingapi/votingapi_views.inc	2006-07-31 07:30:39.875000000 -0400
@@ -34,42 +34,42 @@ function votingapi_views_tables() {
       ),
     ),
     "sorts" => array(
-      "value" => array('name' => "Voting result")
+      "value" => array('name' => t('Voting result'))
     ),
     "filters" => array(
       "value_type" => array(
-        'name' => "VotingAPI: Result type",
-        'operator' => array("=" => "Is", "!=" => "Is Not"),
+        'name' => t('VotingAPI: Result type'),
+        'operator' => array("=" => t("Is"), "!=" => t("Is Not")),
         'list' => array(
-          'percent' => 'Percentage',
-          'points' => 'Points',
-          'option' => 'Options',
+          'percent' => t('Percentage'),
+          'points' => t('Points'),
+          'option' => t('Options'),
         ),
         'list-type' => "select",
         'handler' => 'votingapi_views_nullable_field_handler',
-        'help' => "Filter by the type of result being calculated (Percentage, points, etc)",
+        'help' => t("Filter by the type of result being calculated (Percentage, points, etc)"),
       ),
       "tag" => array(
-        'name' => "VotingAPI: Result tag",
-        'operator' => array("=" => "Is", "!=" => "Is Not"),
+        'name' => t('VotingAPI: Result tag'),
+        'operator' => array("=" => t("Is"), "!=" => t("Is Not")),
         'list' => "votingapi_cache_tags",
         'list-type' => "select",
         'handler' => 'votingapi_views_nullable_field_handler',
-        'help' => "Filter by the tag being voted on",
+        'help' => t("Filter by the tag being voted on"),
       ),
       "function" => array(
-        'name' => "VotingAPI: Result function",
-        'operator' => array("=" => "Is", "!=" => "Is Not"),
+        'name' => t("VotingAPI: Result function"),
+        'operator' => array("=" => t("Is"), "!=" => t("Is Not")),
         'list' => "votingapi_cache_functions",
         'list-type' => "select",
         'handler' => 'votingapi_views_nullable_field_handler',
-        'help' => "Filter by the function used to aggregate results (total number of votes, average vote, etc)",
+        'help' => t("Filter by the function used to aggregate results (total number of votes, average vote, etc)"),
       ),
       "value" => array(
         'name' => t("VotingAPI: Has been voted on"),
-        'list' => array('NULL' => 'Voted'),
+        'list' => array('NULL' => t('Voted')),
         'list-type' => "select",
-        'operator' => array('IS NOT' => "Yes", 'IS' => "No"),
+        'operator' => array('IS NOT' => t("Yes"), 'IS' => t("No")),
         'handler' => 'votingapi_views_value_is_nullable_handler',
         'help' => t("This will filter out nodes that have or have not been voted on."),
       ),
@@ -111,14 +111,14 @@ function votingapi_views_tables() {
         'sortable' => true,
         'handler' => 
           array(
-            "views_handler_field_date_small"=>"As Short Date", 
-            "views_handler_field_date"=>"As Medium Date", 
-            "views_handler_field_date_large"=>"As Long Date", 
-            "views_handler_field_since" => "As Time Ago"
+            "views_handler_field_date_small" => t("As Short Date"), 
+            "views_handler_field_date" => t("As Medium Date"), 
+            "views_handler_field_date_large" => t("As Long Date"), 
+            "views_handler_field_since" => t("As Time Ago")
           ),
         'sortable' => true,
         'addlfields' => array('value_type', 'tag', 'uid', 'content_type', 'content_id'),
-        'help' => "Display the time the vote was cast.",
+        'help' => t("Display the time the vote was cast."),
       ),
       "uid" => array(
         'name' => t("VotingAPI: Individual vote user"),
@@ -129,44 +129,44 @@ function votingapi_views_tables() {
       ),
     ),
     "sorts" => array(
-      "value" => array('name' => "Vote value")
+      "value" => array('name' => t("Vote value"))
     ),
     "filters" => array(
       "value_type" => array(
-        'name' => "VotingAPI: Individual vote type",
-        'operator' => array("=" => "Is", "!=" => "Is Not"),
+        'name' => t("VotingAPI: Individual vote type"),
+        'operator' => array("=" => t("Is"), "!=" => t("Is Not")),
         'list' => array(
-          'percent' => 'Percentage',
-          'points' => 'Points',
-          'option' => 'Custom',
+          'percent' => t('Percentage'),
+          'points' => t('Points'),
+          'option' => t('Custom'),
         ),
         'list-type' => "select",
         'handler' => 'votingapi_views_nullable_field_handler',
-        'help' => "Filter by the type of result being calculated (Percentage, points, etc)",
+        'help' => t("Filter by the type of result being calculated (Percentage, points, etc)"),
       ),
       "tag" => array(
-        'name' => "VotingAPI: Individual vote tag",
-        'operator' => array("=" => "Is", "!=" => "Is Not"),
+        'name' => t("VotingAPI: Individual vote tag"),
+        'operator' => array("=" => t("Is"), "!=" => t("Is Not")),
         'list' => "votingapi_vote_tags",
         'list-type' => "select",
         'handler' => 'votingapi_views_nullable_field_handler',
-        'help' => "Filter by the tag being voted on",
+        'help' => t("Filter by the tag being voted on"),
       ),
       "uid" => array(
-        'name' => "VotingAPI: Individual vote ",
-        'operator' => array("=" => "was cast by"),
-        'list' => array(NULL => "Current user"),
+        'name' => t("VotingAPI: Individual vote "),
+        'operator' => array("=" => t("was cast by")),
+        'list' => array(NULL => t("Current user")),
         'list-type' => "select",
         'handler' => 'votingapi_views_handler_filter_uid_voted',
       ),
       "currentuidtouched" => array(
         'field' => 'uid',
-        'name' => "VotingAPI: Current user has voted",
-        'operator' => array('=' => "voted on by"),
+        'name' => t("VotingAPI: Current user has voted"),
+        'operator' => array('=' => t("voted on by")),
         'list' => "views_handler_filter_usercurrent",
         'list-type' => 'select',
         'handler' => "votingapi_views_handler_filter_uid_has_voted",
-        'help' => "This allows you to filter by whether or not the logged in user has voted on the node.",
+        'help' => t("This allows you to filter by whether or not the logged in user has voted on the node."),
       ),
     ),
   );
@@ -262,8 +262,8 @@ function votingapi_views_handler_field_u
 
 function votingapi_views_default_views() {
   $view = new stdClass();
-  $view->name = 'Node votes';
-  $view->description = 'Lists all votes for a node';
+  $view->name = t('Node votes');
+  $view->description = t('Lists all votes for a node');
   $view->access = array (
     0 => '2',
   );
@@ -271,14 +271,14 @@ function votingapi_views_default_views()
   $view->page = TRUE;
   $view->disabled = TRUE;
   $view->page_title = '%1';
-  $view->page_header = 'An overview of all votes cast for this piece of content.';
+  $view->page_header = t('An overview of all votes cast for this piece of content.');
   $view->page_header_format = '1';
   $view->page_type = 'table';
   $view->url = 'node/$arg/votes';
   $view->use_pager = FALSE;
   $view->nodes_per_page = '10';
   $view->menu = TRUE;
-  $view->menu_title = 'votes';
+  $view->menu_title = t('votes');
   $view->menu_tab = TRUE;
   $view->menu_tab_default = FALSE;
   $view->menu_weight = '';
@@ -296,13 +296,13 @@ function votingapi_views_default_views()
     array (
       'tablename' => 'votingapi_vote',
       'field' => 'uid',
-      'label' => 'user',
+      'label' => t('user'),
       'sortable' => '1',
     ),
     array (
       'tablename' => 'votingapi_vote',
       'field' => 'timestamp',
-      'label' => 'time',
+      'label' => t('time'),
       'handler' => 'views_handler_field_since',
       'sortable' => '1',
       'defaultsort' => 'DESC',
@@ -310,13 +310,13 @@ function votingapi_views_default_views()
     array (
       'tablename' => 'votingapi_vote',
       'field' => 'tag',
-      'label' => 'criteria',
+      'label' => t('criteria'),
       'sortable' => '1',
     ),
     array (
       'tablename' => 'votingapi_vote',
       'field' => 'value',
-      'label' => 'vote',
+      'label' => t('vote'),
       'sortable' => '1',
     ),
   );
@@ -326,22 +326,22 @@ function votingapi_views_default_views()
   $views[$view->name] = $view;
 
   $view = new stdClass();
-  $view->name = 'Moderation queue';
-  $view->description = 'Nodes in the moderation queue';
+  $view->name = t('Moderation queue');
+  $view->description = t('Nodes in the moderation queue');
   $view->access = array (
     0 => '2',
   );
   $view->page = TRUE;
   $view->disabled = TRUE;
   $view->page_title = 'moderation queue';
-  $view->page_header = 'Content in the moderation queue can be voted on by the community. Depending on the results, content may be removed from the site or promoted to the front page.';
+  $view->page_header = t('Content in the moderation queue can be voted on by the community. Depending on the results, content may be removed from the site or promoted to the front page.');
   $view->page_header_format = '1';
   $view->page_type = 'table';
   $view->url = 'queue';
   $view->use_pager = TRUE;
   $view->nodes_per_page = '40';
   $view->menu = TRUE;
-  $view->menu_title = 'moderation queue';
+  $view->menu_title = t('moderation queue');
   $view->menu_tab = FALSE;
   $view->menu_tab_default = FALSE;
   $view->menu_weight = '';
@@ -353,26 +353,26 @@ function votingapi_views_default_views()
     array (
       'tablename' => 'node',
       'field' => 'type',
-      'label' => 'type',
+      'label' => t('type'),
       'sortable' => '1',
     ),
     array (
       'tablename' => 'node',
       'field' => 'title',
-      'label' => 'title',
+      'label' => t('title'),
       'handler' => 'views_handler_field_nodelink_with_mark',
       'sortable' => '1',
     ),
     array (
       'tablename' => 'users',
       'field' => 'name',
-      'label' => 'author',
+      'label' => t('author'),
       'sortable' => '1',
     ),
     array (
       'tablename' => 'node',
       'field' => 'created',
-      'label' => 'created on',
+      'label' => t('created on'),
       'handler' => 'views_handler_field_since',
       'sortable' => '1',
       'defaultsort' => 'DESC',
@@ -380,7 +380,7 @@ function votingapi_views_default_views()
     array (
       'tablename' => 'votingapi_cache',
       'field' => 'value',
-      'label' => 'current rating',
+      'label' => t('current rating'),
       'sortable' => '1',
     ),
   );
