Index: privatemsg.module
===================================================================
RCS file: /cvs/drupal/contributions/modules/privatemsg/privatemsg.module,v
retrieving revision 1.92
diff -u -r1.92 privatemsg.module
--- privatemsg.module	14 Oct 2008 17:00:41 -0000	1.92
+++ privatemsg.module	14 Oct 2008 23:41:14 -0000
@@ -208,11 +208,12 @@
   }
 
   $participants = implode(', ', $to);
-  if (drupal_strlen($participants)) {
-    $participants .= " and ";
+  if (empty($participants)) {
+    $vars['participants'] = t("From !last", array('!last' => $last));
+    return;
   }
 
-  $vars['participants'] = 'Between '. $participants . $last;
+  $vars['participants'] = t('Between !participants and !last',array('!participants' => $participants, '!last' => $last));
 }
 
 /**
@@ -268,13 +269,23 @@
       switch ($index) {
         case 'id':
           continue 2;
+        case 'author':
+      	  $col = t('Author');
+      	  break;
+        case 'recipient':
+          $col = t('Recipient');
+          break;
+        case 'subject':
+          $col = t('Subject');
+          break;
         case 'timestamp':
-          $col = arg(1) == 'sent' ? 'sent' : 'received';
+          $col = arg(1) == 'sent' ? t('Sent') : t('Received');
           break;
         default:
-          $col = $index;
+          //t($variable) should not be used, but are there actually any indexes missing?
+          $col = t($index);
       }
-      $head[$index] =  array('data' => t($col), 'field' => $index, 'sort'=> 'desc');
+      $head[$index] =  array('data' => $col, 'field' => $index, 'sort'=> 'desc');
     }
     if (arg(1) == 'inbox') {
       $query = _privatemsg_assemble_query('privatemsg_list', $account);
@@ -376,13 +387,13 @@
   if ($verbose) {
     if ($result) {
       if ($new == 1) {
-        $status = 'Unread';
+        $status = t('unread');
       }
       else {
-        $status = 'Read';
+        $status = t('read');
       }
       $total_marked = db_affected_rows();
-      drupal_set_message(format_plural($total_marked, "1 message marked as <em>!status</em>", '@count messages marked as <em>!status</em>', array('!status' => $status)));
+      drupal_set_message(format_plural($total_marked, "1 message marked as %status", '@count messages marked as %status', array('%status' => $status)));
     }
     else {
       drupal_set_message(t('An error has occured, please contact the site administrator.'), 'error');
@@ -490,12 +501,12 @@
   );
   $form['controls']['preview'] = array(
     '#type'               => 'submit',
-    '#value'              => 'Preview',
+    '#value'              => t('Preview'),
     '#submit'             => array('pm_preview'),
   );
   $form['controls']['submit'] = array(
     '#type'               => 'submit',
-    '#value'              => 'Send',
+    '#value'              => t('Send'),
     '#submit'             => array('pm_send'),
   );
   $form['controls']['cancel'] = array(
@@ -517,6 +528,7 @@
 //  if ($form_state['clicked_button']['#value'] == t('Cancel')) {
 //    return ;
 //  }
+
 //  drupal_set_message('<pre>'. print_r($form, 1). '</pre>');
 //  drupal_set_message('<pre>'. print_r($form_state, 1). '</pre>');
   // The actual message that is being sent, we create this during validation and pass to submit to send out.
@@ -823,7 +835,7 @@
       if (user_access('write privatemsg') && $user->uid <> $account->uid) {
         $account->content['privatemsg_send_new_message'] = array(
           '#type'   => 'markup',
-          '#value'  => l('Send this user a private message', 'messages/new/'. $account->uid, array('query' => 'destination='. $_GET['q'])),
+          '#value'  => l(t('Send this user a private message'), 'messages/new/'. $account->uid, array('query' => 'destination='. $_GET['q'])),
           '#weight' => 10,
         );
       }
@@ -867,17 +879,17 @@
   }
   $links = array();
   if (user_access('write privatemsg')) {
-    $links[] = l('Create private message', 'messages/new');
+    $links[] = l(t('Create private message'), 'messages/new');
   }
   if (user_access('read privatemsg') || user_access('read all private messages') ) {
-    $links[] = l('Inbox'. $new, 'messages/inbox');
+    $links[] = l(t('Inbox@new', array('@new' => $new)), 'messages/inbox');
   }
   if (user_access('read privatemsg') || user_access('read all private messages') ) {
-    $links[] = l('Sent', 'messages/sent');
+    $links[] = l(t('Sent'), 'messages/sent');
   }
   if ( count( $links ) ) {
     $block = array(
-      'subject' => 'Private messages',
+      'subject' => t('Private messages'),
       'content' => theme('item_list', $links),
     );
   }
@@ -924,7 +936,7 @@
         );
         $form['content']['body'] = array(
           '#type' => 'textarea',
-          '#title' => t('Send reply to ' . $recipient),
+          '#title' => t('Send reply to %recipient', array('%recipient' => $recipient)),
           '#cols' => 10,
           '#rows' => 6,
           '#default_value' => isset($form_state['values']['body'])? $form_state['values']['body']: '',
