--- sites/all/modules/privatemsg/privatemsg.module	2010-04-12 06:13:16.000000000 -0700
+++ sites/all/modules/privatemsg/privatemsg_new.module	2010-08-03 10:31:32.000000000 -0700
@@ -576,6 +576,11 @@ function privatemsg_theme() {
       'path'                  => drupal_get_path('module', 'privatemsg'),
       'arguments'        => array('form'),
     ),
+    'privatemsg_operation'=> array(
+      'file'                  => 'privatemsg.theme.inc',
+      'path'                  => drupal_get_path('module', 'privatemsg'),
+      'arguments'        => array('operation' => array(), 'undo' => NULL),
+    ),
     // Define pattern for header/field templates. The theme system will register all
     // theme functions that start with the defined pattern.
     'privatemsg_list_header'  => array(
@@ -2424,8 +2429,7 @@ function privatemsg_operation_execute($o
     // @todo: Provide a more flexible solution for such an undo action, operation defined string for example.
     $_SESSION['privatemsg']['undo callback'] = array('function' => $undo_function, 'args' => $undo_args);
     $undo = url('messages/undo/action', array('query' => drupal_get_destination()));
-
-    drupal_set_message(t('The previous action can be <a href="!undo">undone</a>.', array('!undo' => $undo)));
+    drupal_set_message(theme('privatemsg_operation', $operation, $undo));
   }
 }
 
