Index: privatemsg.module
===================================================================
RCS file: /cvs/drupal/contributions/modules/privatemsg/privatemsg.module,v
retrieving revision 1.88
diff -u -p -r1.88 privatemsg.module
--- privatemsg.module	20 Sep 2008 20:22:20 -0000	1.88
+++ privatemsg.module	23 Sep 2008 12:22:58 -0000
@@ -202,11 +202,12 @@ function privatemsg_preprocess_privatems
   }
 
   $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));
 }
 
 /**
@@ -230,7 +231,7 @@ function privatemsg_list($uid = NULL) {
       $account = user_load(array('uid' => $uid));
     }
     else { // We tried viewing someone else's messages but didn't have sufficient rights.
-      drupal_set_message("You do not have sufficient rights to view someone else's messages", WATCHDOG_WARNING);
+      drupal_set_message(t("You do not have sufficient rights to view someone else's messages"), WATCHDOG_WARNING);
       $account = $user;
     }
   }
@@ -317,7 +318,7 @@ function privatemsg_list($uid = NULL) {
   }
   else {
     $content = '';
-    drupal_set_message('No messages to display.');
+    drupal_set_message(t('No messages to display.'));
   }
 
 //  drupal_set_message('<pre>'. print_r(count($messages), 1) .'</pre>');
@@ -386,7 +387,7 @@ function privatemsg_set_new_status($acco
       drupal_set_message($msg);
     }
     else {
-      drupal_set_message('An error has occured, please contact the site administrator.', 'error');
+      drupal_set_message(t('An error has occured, please contact the site administrator.'), 'error');
     }
     return '';
   }
@@ -590,7 +591,7 @@ function pm_send_validate($form, &$form_
 
   $form_state['validate_built_message'] = $message;
   if (!empty($invalid)) {
-    drupal_set_message('The following users will not receive this private message: '. check_plain(implode(", ", $invalid)), 'error');
+    drupal_set_message(t('The following users will not receive this private message: %users', array('%users' => check_plain(implode(", ", $invalid)), 'error')));
   }
 }
 
@@ -623,7 +624,7 @@ function pm_send($form, &$form_state) {
     db_query($query, $mid, $thread_id, $recipient->uid, $message['author']->uid , $timestamp);
   }
 
-  drupal_set_message('A private message has been sent to '. $form_state['values']['recipient']);
+  drupal_set_message(t('A private message has been sent to @recipient', array('@recipient' => $form_state['values']['recipient'])));
 }
 
 function privatemsg_render_preview($message) {
@@ -854,16 +855,15 @@ function privatemsg_user($op, &$edit, &$
     case 'view':
       $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,
       );
       break;
     case 'login':
       $count = privatemsg_unread_count();
       if ($count) {
-        $login_msg = 'You have '. $count .' unread ';
-        $login_msg .= $count > 1 ? l('private messages', 'messages/inbox') : l('private message', 'messages/inbox');
-        $login_msg .= '.';
+
+        $login_msg = t('You have %messages.', array('%messages' => format_plural($count, 'one unread private message', '@count unread private messages')));
         drupal_set_message(t($login_msg));
       }
       break;
@@ -889,11 +889,11 @@ function privatemsg_block($op = 'list', 
           $new = " ({$count})";
         }
         $links = array();
-        $links[] = l('Create private message', 'messages/new');
-        $links[] = l('Inbox'. $new, 'messages/inbox');
-        $links[] = l('Sent', 'messages/sent');
+        $links[] = l(t('Create private message'), 'messages/new');
+        $links[] = l(t('Inbox'). $new, 'messages/inbox');
+        $links[] = l(t('Sent'), 'messages/sent');
         $block = array(
-          'subject' => 'Private messages',
+          'subject' => t('Private messages'),
           'content' => theme('item_list', $links),
         );
         break;
@@ -943,7 +943,7 @@ function privatemsg_form_alter(&$form, $
         );
         $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']: '',
@@ -954,4 +954,4 @@ function privatemsg_form_alter(&$form, $
       }
     break;
   }
-}
\ No newline at end of file
+}
