? 226479-update-rebuild-permissions-check.patch
? 86287-translate-reset-password-page.patch
? user-pages-remove-tags-from-t.patch
Index: modules/user/user.pages.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/user/user.pages.inc,v
retrieving revision 1.35
diff -u -p -r1.35 user.pages.inc
--- modules/user/user.pages.inc	6 May 2009 11:31:44 -0000	1.35
+++ modules/user/user.pages.inc	6 May 2009 21:11:02 -0000
@@ -78,9 +78,14 @@ function user_pass_submit($form, &$form_
 function user_pass_reset(&$form_state, $uid, $timestamp, $hashed_pass, $action = NULL) {
   global $user;
 
+  //fetch uid from the URL, and use it to load the preferred language for the user trying to recover their password.
+  $uid = arg(2);
+  $user_language = user_preferred_language(user_load($uid));
+  $user_language = $user_language->language;
+
   // Check if the user is already logged in. The back button is often the culprit here.
   if ($user->uid) {
-    drupal_set_message(t('You have already used this one-time login link. It is not necessary to use this link to login anymore. You are already logged in.'));
+    drupal_set_message(t('You have already used this one-time login link. It is not necessary to use this link to login anymore. You are already logged in.', array(), $user_language));
     drupal_goto();
   }
   else {
@@ -92,7 +97,7 @@ function user_pass_reset(&$form_state, $
     if ($timestamp < $current && $account = reset($users)) {
       // No time out for first time login.
       if ($account->login && $current - $timestamp > $timeout) {
-        drupal_set_message(t('You have tried to use a one-time login link that has expired. Please request a new one using the form below.'));
+        drupal_set_message(t('You have tried to use a one-time login link that has expired. Please request a new one using the form below.', array(), $user_language));
         drupal_goto('user/password');
       }
       elseif ($account->uid && $timestamp > $account->login && $timestamp < $current && $hashed_pass == user_pass_rehash($account->pass, $timestamp, $account->login)) {
@@ -104,19 +109,19 @@ function user_pass_reset(&$form_state, $
           // user_authenticate_finalize() also updates the login timestamp of the
           // user, which invalidates further use of the one-time login link.
           user_authenticate_finalize($form_state['values']);
-          drupal_set_message(t('You have just used your one-time login link. It is no longer necessary to use this link to login. Please change your password.'));
+          drupal_set_message(t('You have just used your one-time login link. It is no longer necessary to use this link to login. Please change your password.', array(), $user_language));
           drupal_goto('user/' . $user->uid . '/edit');
         }
         else {
-          $form['message'] = array('#markup' => t('<p>This is a one-time login for %user_name and will expire on %expiration_date.</p><p>Click on this button to login to the site and change your password.</p>', array('%user_name' => $account->name, '%expiration_date' => format_date($timestamp + $timeout))));
-          $form['help'] = array('#markup' => '<p>' . t('This login can be used only once.') . '</p>');
-          $form['submit'] = array('#type' => 'submit', '#value' => t('Log in'));
+          $form['message'] = array('#markup' => t('<p>This is a one-time login for %user_name and will expire on %expiration_date.</p><p>Click on this button to login to the site and change your password.</p>', array('%user_name' => $account->name, '%expiration_date' => format_date($timestamp + $timeout)), $user_language));
+          $form['help'] = array('#markup' => '<p>' . t('This login can be used only once.', array(), $user_language) . '</p>');
+          $form['submit'] = array('#type' => 'submit', '#value' => t('Log in', array(), $user_language));
           $form['#action'] = url("user/reset/$uid/$timestamp/$hashed_pass/login");
           return $form;
         }
       }
       else {
-        drupal_set_message(t('You have tried to use a one-time login link which has either been used or is no longer valid. Please request a new one using the form below.'));
+        drupal_set_message(t('You have tried to use a one-time login link which has either been used or is no longer valid. Please request a new one using the form below.', array(), $user_language));
         drupal_goto('user/password');
       }
     }
