Index: trunk/extensions/SignupAPI/SignupAPI.i18n.php |
— | — | @@ -11,6 +11,8 @@ |
12 | 12 | $messages['en'] = array( |
13 | 13 | 'signupapi-desc' => 'Cleans up the [[Special:UserLogin|login page]] from signup related stuff and adds an API for signup', |
14 | 14 | 'signupapi-ok' => 'OK', |
| 15 | + 'signupapi-noname' => 'No username was specified', |
| 16 | + 'signupapi-userexists' => 'User exists', |
15 | 17 | 'signupapi-enterpassword' => 'You must enter a password', |
16 | 18 | 'signupapi-passwordtooshort' => 'Password is too short', |
17 | 19 | 'signupapi-weak' => 'Weak', |
— | — | @@ -18,7 +20,7 @@ |
19 | 21 | 'signupapi-strong' => 'Strong', |
20 | 22 | 'signupapi-badretype' => 'The passwords you entered do not match', |
21 | 23 | 'signupapi-passwordsmatch' => 'Passwords match', |
22 | | - |
| 24 | + 'signupapi-invalidemailaddress' => 'Email address in invalid', |
23 | 25 | ); |
24 | 26 | |
25 | 27 | /** Belarusian (Taraškievica orthography) (Беларуская (тарашкевіца)) |
Index: trunk/extensions/SignupAPI/SignupAPI.php |
— | — | @@ -52,13 +52,16 @@ |
53 | 53 | 'scripts' => 'includes/verification.js', |
54 | 54 | 'messages' => array( |
55 | 55 | 'signupapi-ok', |
| 56 | + 'signupapi-noname', |
| 57 | + 'signupapi-userexists', |
56 | 58 | 'signupapi-enterpassword', |
57 | 59 | 'signupapi-passwordtooshort', |
58 | 60 | 'signupapi-weak', |
59 | 61 | 'signupapi-medium', |
60 | 62 | 'signupapi-strong', |
61 | 63 | 'signupapi-badretype', |
62 | | - 'signupapi-passwordsmatch' |
| 64 | + 'signupapi-passwordsmatch', |
| 65 | + 'signupapi-invalidemailaddress', |
63 | 66 | ), |
64 | 67 | 'dependencies' => array( 'jquery.ui.progressbar' ), |
65 | 68 | 'localBasePath' => dirname( __FILE__ ), |
Index: trunk/extensions/SignupAPI/includes/ApiValidateSignup.php |
— | — | @@ -25,28 +25,28 @@ |
26 | 26 | case "username": |
27 | 27 | $mUser = User::newFromName( $params['inputVal'], 'creatable' ); |
28 | 28 | if ( !is_object( $mUser ) ) { |
29 | | - $result['result'] = wfMsg( 'noname' ); |
| 29 | + $result['result'] = wfMsg( 'signupapi-noname' ); |
30 | 30 | $result['icon'] = 'MW-Icon-AlertMark.png'; |
31 | 31 | } |
32 | 32 | |
33 | 33 | if ( 0 != $mUser->idForName() ) { |
34 | | - $result['result'] = wfMsg( 'userexists' ); |
| 34 | + $result['result'] = wfMsg( 'signupapi-userexists' ); |
35 | 35 | $result['icon'] = "MW-Icon-NoMark.png"; |
36 | 36 | } |
37 | 37 | |
38 | 38 | else { |
39 | | - $result['result'] = wfMsg( 'ok' ); |
| 39 | + $result['result'] = wfMsg( 'signupapi-ok' ); |
40 | 40 | $result['icon'] = "MW-Icon-CheckMark.png"; |
41 | 41 | } |
42 | 42 | break; |
43 | 43 | |
44 | 44 | case "email" : |
45 | 45 | if ( $valid = User::isValidEmailAddr( $params['inputVal'] ) ) { |
46 | | - $result['result']= wfMsg( 'ok' ); |
| 46 | + $result['result']= wfMsg( 'signupapi-ok' ); |
47 | 47 | $result['icon'] = "MW-Icon-CheckMark.png"; |
48 | 48 | } |
49 | 49 | else { |
50 | | - $result['result']= wfMsg( 'invalidemailaddress' ); |
| 50 | + $result['result']= wfMsg( 'signupapi-invalidemailaddress' ); |
51 | 51 | $result['icon'] = "MW-Icon-NoMark.png"; |
52 | 52 | } |
53 | 53 | break; |
Index: trunk/extensions/SignupAPI/includes/verification.js |
— | — | @@ -27,7 +27,7 @@ |
28 | 28 | if (pwd.value.length==0) { |
29 | 29 | strength.innerHTML = mw.message( 'signupapi-enterpassword' ); |
30 | 30 | } else if (pwd.value.length<minlength) { |
31 | | - strength.innerHTML = mw.message( 'passwordtooshort', minlength ); |
| 31 | + strength.innerHTML = mw.message( 'signupapi-passwordtooshort', minlength ); |
32 | 32 | $("#progress").progressbar({value: 10}); |
33 | 33 | $("div.ui-progressbar-value").css("background","red"); |
34 | 34 | } else if (strongRegex.test(pwd.value)) { |
— | — | @@ -55,7 +55,7 @@ |
56 | 56 | message = mw.message( 'signupapi-passwordsmatch' ); |
57 | 57 | }else { |
58 | 58 | image = "<img src='"+ imagePath +"MW-Icon-NoMark.png'>"; |
59 | | - message = mw.message( 'badretype' ); |
| 59 | + message = mw.message( 'signupapi-badretype' ); |
60 | 60 | } |
61 | 61 | valresult.innerHTML = image+message; |
62 | 62 | } |