There are various classes of strings that account creation might display:
- error messages from the existing form that appear when you submit
- messages ACUX shows on validation
- other internal text
Hardcoded English in the JSEdit
Do we have to worry about these for the test?
Messages ACUX shows on validationEdit
Existing MW messagesEdit
MW has messages similar to what we want, or we can have our own variations.
Reusing from UserLogin form itself
'password-name-match' => 'Your password must be different from your username.', 'badretype' => 'The passwords you entered do not match.', 'noname' => 'You have not specified a valid username.',
Reusing these messages from Special:ChangeEmail form
'email-address-validity-valid' => 'E-mail address appears valid', 'email-address-validity-invalid' => 'Enter a valid e-mail address',
Reusing error returned by User.php
'passwordtooshort' => 'Passwords must be at least $1 characters.',
Reusing from somewhere
'userexists' => 'Username entered already in use.
too wordy? Extension:SignupAPI is just "User exists"
New messages neededEdit
While validating the username, the server API could tell us what the username will be, e.g. "steven" -> "Steven". I can inform the user with something like
'Username OK, will be Steven'
- We decided not to show this info to user.
When user tabs out of username field without entering anything and it goes red
"Username required" or "Username cannot be blank" ? or just "*" ?
- there is a generic
'htmlform-required' => 'This value is required',
- We decided to do nothing, the form placeholder text "Enter a desired username" is enough.
When blank name is submitted for validation (should never happen?)
'signupapi-noname' => 'No username was specified',
- just reuse "Username required" from above?
Messages from extensionsEdit
Extensions reject many usernames at account creation. The main way they do so is by hooking into AbortNewAccount ( 23 extensions do so someone please make a list of which of these are in use on enwiki). Many return an arbitrarily long and complex HTML message containing links and lists. These seem incompatible with a tooltip, unclear what to show, whether to have a shorter tooltip message, where the longer message goes, etc. Here are a few of these messages
'antispoof-conflict-top' => 'The name "$1" is too similar to the following $2 accounts:', ... ... ... 'antispoof-conflict-bottom' => 'Please choose another name.',
'The user name "$2" has been banned from creation. It matches the following blacklist entry:
enwiki message is much longer, en:MediaWiki:Titleblacklist-forbidden-new-account
Other internal textEdit
'Invalid value for user parameter name'
- comes from MW API when name does not look like a name (fails Title::makeTitleSafe). Not localized.
- I propose not showing API failure messages to user, and just a generic "I <error code="baduser_name" info="Invalid value for user parameter name" nvalid username"
Testing for these stringsEdit
- See also Account creation user experience/Strings/Testing and Account creation user experience/Strings/Usernames
You can generate the API messages by invoking the wiki's API in a URL
- Password too short
- name in use
- bad name (starts with #, note have to encode this in URL)
- bad name (# in middle)
- bad name (@ in it)
- bad name
- OK name
- OK password