Problem/Motivation
After account creation and activation, the user (normally) receives an email with a one time login link that can be used to change their password. When this link is clicked, the title of the page redirected to is 'Reset Password'.
This string is not translateable (and should be).
Beta phase evaluation
Proposed resolution
I think that 'Set password' would be more appropriate when no password exists, while 'Reset Password' for when a password already exists.
Both strings should be translateable.
Remaining tasks
Contributor tasks needed
| Task |
Novice task? |
Contributor instructions |
Complete? |
| Add automated tests |
|
Instructions |
|
| Update the patch to incorporate feedback from reviews (include an interdiff) |
|
Instructions |
|
User interface changes
Set page title to 'Set Password' or 'Reset Password' depending on whether a password already exists.
API changes
None.



Comments
Comment #1
dcam commentedI'm not certain, but I think this is still the case in 8.x. If it is, then it will have to be changed there first.
Comment #2
jeet09 commentedChanged title from Reset Password to Set Password for one time login.
Comment #3
David Hernández commentedHello!
Thank you for working on this issue!
We should all try and use the same sprint tag. According to https://groups.drupal.org/node/447258 it should be SprintWeekend2015 with no #.
Also, if you want the testbot to execute the tests, you should check the status to Needs Review.
Comment #4
David Hernández commentedComment #5
Anonymous (not verified) commentedWe've taken a look at this here at the Toronto #SprintWeekend and we're proposing the following change.
"Reset Password" isn't wrapped with t() and the form is used for both password resets and one time login so the title should change to reflect that.
Comment #6
pierremarcel commentedGreat catch mhazy, I've tested the patch and it's working no problem. Great usability fix guys!
Comment #7
alimac commentedI'm doing a beta evaluation of this issue.
Setting the issue category to Task because it's "rewriting user interface strings for brevity and clarity."
Setting the issue priority to Normal because "affects one piece of functionality are normal priority". It's not a cosmetic change because it adds clarity to the wording and two translateable strings.
It's a prioritized change, because it falls under usability and user experience improvements. It can also be backported to D7.
The issue summary needs to be updated to mention that "Reset Password" is not currently a translateable string and should be.
Comment #8
alimac commentedComment #9
alimac commentedComment #10
RavindraSingh commented+1, works for me perfectly.
Comment #11
alimac commentedComment #12
alexpott$this->t() should be used here.
The title with/without password should be tested.
Comment #13
alimac commentedComment #14
alimac commentedComment #15
alimac commentedUpdated patch, plus one test for 'Reset Password' string. Setting to Needs Review to trigger testbot but it still needs another test for the other string, probably in UserRegistrationTest.php.
Comment #17
alimac commentedOne more time: updated patch, plus one test for 'Reset Password' string. Still needs a test for the 'Set Password' string.
Comment #18
alimac commentedAdded test for 'Set Password' after registration. I'm sure there is a better way to do this than copying the getResetURL function, though, so this part still needs work.
Comment #19
Anonymous (not verified) commentedChanged to use user_pass_reset_url to generate the reset URL instead of finding it in the email
Comment #20
alimac commented@mhazy, good to know about user_pass_reset_url.
Need to leave in that blank line before the very end of a class, per https://www.drupal.org/node/608152
Comment #21
RavindraSingh commentedPerfact @alimac, Just added that line as well in updated patch. and Good work @mhazy
Comment #22
alimac commentedComment #24
alimac commented@RavindraSingh: there are extra spaces on that blank line that need to be deleted:
When you post a patch, it is a good idea to also post an interdiff, to show the difference from one patch to the next: https://www.drupal.org/documentation/git/interdiff
I am not sure why this patch failed testing, the failing tests appear to be cache related..
Comment #25
adci_contributor commentedCleaning the whitespaces
Comment #26
alimac commentedComment #27
cepinos commentedPerfect!, It works for me.
I Applied this patch locally, and I did a visual review of it.
It is what I did. I created an account, and then It sent me an email, asking me set my password. Before the patch, It was showing reset Password in the title, and after apply this patch, It shows Set password in the title.
There is not test only patch, so we cannot confirm the patch at #25 includes a working test.
Comment #28
cepinos commentedPerfect!, It works for me.
I Applied this patch locally, and I did a visual review of it.
It is what I did. I created an account, and then It sent me an email, asking me set my password. Before the patch, It was showing reset Password in the title, and after apply this patch, It shows Set password in the title.
There is not test only patch, so we cannot confirm the patch at #25 includes a working test.
Comment #29
cepinos commentedSome screenshots from my review:
Before:

After:

Comment #30
cepinos commentedGoing to reopen this to manually test the multilingual functionality to ensure both "Reset password" and "Set Password" are translatable strings now.
Comment #31
cepinos commented"Reset Password" and "Set Password", are technically wrong, It should be "Reset password" and "Set password" as is recommended in here https://www.drupal.org/node/84146
Comment #32
cepinos commentedThis is a test only patch. I am doing this because I learned it from Dupalcon Bogotá. It is a good practice, because if it fails before apply the patch commented at #25 this means that the test works.
Comment #34
yesct commentedthat was a tests only patch. which failed nicely. this is needs review.
Comment #35
alimac commentedComment #36
alimac commentedPatch with the word password in lowercase for the title.Wrong patch, ignore.Comment #37
alimac commentedPatch with the word password in lowercase for the title.
Comment #38
yesct commentedI'm not sure if that old issue (referenced in #31) clarifies the casing,
but
the reset your password page title is "Reset your password"
in head right now.
also looked using
ag '\$form\[.#title.\] = '
for example in head. and lower case seems used else where in core.
has tests. so removing the needs tests tag.
Comment #39
alimac commentedPatch with the word password in lowercase for the title.
Comment #40
yesct commentedI read the patch and discussed this. (if green) rtbc.
Comment #41
alexpottCommitted df0bde0 and pushed to 8.0.x. Thanks!
Thanks for adding the beta evaluation to the issue summary and it's great to see a test for the logic.
I'm not sure that this can be backported since it changes UI text - won't translations have to be changed?
Comment #43
alexpottReading https://www.drupal.org/node/1527558 - this is not eligible for backport.
Comment #45
xjmRemoving the tag per #43.