r94612 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r94611‎ | r94612 | r94613 >
Date:08:30, 16 August 2011
Author:siebrand
Status:deferred
Tags:
Comment:
Make message keys extension specific.
Remove unused key 'invaliduname'.
Modified paths:
  • /trunk/extensions/SemanticSignup/SemanticSignup.i18n.php (modified) (history)
  • /trunk/extensions/SemanticSignup/includes/SES_Special.php (modified) (history)
  • /trunk/extensions/SemanticSignup/includes/SES_UserAccountDataChecker.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticSignup/includes/SES_Special.php
@@ -58,7 +58,7 @@
5959 }
6060
6161 if ( $value > $wgAccountCreationThrottle ) {
62 - throw new Exception(wfMsg('throttlehit'));
 62+ throw new Exception(wfMsg('ses-throttlehit'));
6363 }
6464 }
6565
@@ -106,7 +106,7 @@
107107 $status = $user->sendConfirmationMail();
108108
109109 if ( !$status->isGood() ) {
110 - throw new Exception( wfMsg( 'emailfailed' ) . "\n" . $status->getMessage() );
 110+ throw new Exception( wfMsg( 'ses-emailfailed' ) . "\n" . $status->getMessage() );
111111 }
112112 }
113113
Index: trunk/extensions/SemanticSignup/includes/SES_UserAccountDataChecker.php
@@ -19,7 +19,7 @@
2020 $name = trim( $this->mUsername );
2121 $this->mUser = User::newFromName( $name, 'creatable' );
2222 if ( !$this->mUser ) {
23 - $this->error( wfMsg( 'noname' ) );
 23+ $this->error( wfMsg( 'ses-noname' ) );
2424 }
2525
2626 global $sesRealNameRequired;
@@ -28,7 +28,7 @@
2929 $this->mPassword = $this->getUserDataValue('wpPassword');
3030 $retype = $this->getUserDataValue('wpRetype');
3131 if (strcmp($this->mPassword, $retype))
32 - $this->error(wfMsg('nopwdmatch'));
 32+ $this->error(wfMsg('ses-nopwdmatch'));
3333
3434 $this->mDomain = $this->getUserDataValue('wpDomain');
3535
@@ -65,7 +65,7 @@
6666 global $wgUser;
6767
6868 if (!$wgUser->isAllowed( 'createaccount' ) || $wgUser->isBlockedFromCreateAccount() )
69 - $this->error(wfMsg('createforbidden'));
 69+ $this->error(wfMsg('ses-createforbidden'));
7070 }
7171
7272 public function checkSorbs()
@@ -81,7 +81,7 @@
8282 public function checkUserExists()
8383 {
8484 if ($this->mUser->idForName())
85 - $this->error(wfMsg('userexists'));
 85+ $this->error(wfMsg('ses-userexists'));
8686 }
8787
8888 public function checkPasswordLength()
Index: trunk/extensions/SemanticSignup/SemanticSignup.i18n.php
@@ -17,15 +17,14 @@
1818 $messages['en'] = array(
1919 'semanticsignup' => 'Semantic Signup',
2020 'ses-desc' => 'A MediaWiki extension built on top of Semantic Forms allowing to populate a user page with semantic data at signup time',
21 - 'nousername' => 'Username has not been specified',
22 - 'nopwdmatch' => 'Password and password confirmation don\'t match',
23 - 'norealname' => 'Real name is required but has not been specified',
24 - 'userexists' => 'User already exists',
25 - 'invaliduname' => 'Username specified is not allowed',
26 - 'emailfailed' => 'Confirmation email sending failed',
27 - 'createforbidden' => 'Current user is not allowed to create accounts',
28 - 'throttlehit' => 'New user accounts number maximum per day has been exceeded for this IP',
29 - 'ses_userexists' => 'User already exists'
 21+ 'ses-nousername' => 'Username has not been specified.',
 22+ 'ses-nopwdmatch' => 'Password and password confirmation do not match.',
 23+ 'ses-norealname' => 'Real name is required but has not been specified.',
 24+ 'ses-userexists' => 'User already exists.',
 25+ 'ses-emailfailed' => 'Confirmation email sending failed.',
 26+ 'ses-createforbidden' => 'Current user is not allowed to create accounts.',
 27+ 'ses-throttlehit' => 'New user accounts number maximum per day has been exceeded for this IP.',
 28+ 'ses-userexists' => 'User already exists.'
3029 );
3130
3231 $magicWords = array();