http://www.mediawiki.org/wiki/Special:Code/MediaWiki/94612

Revision: 94612
Author:   siebrand
Date:     2011-08-16 08:30:41 +0000 (Tue, 16 Aug 2011)
Log Message:
-----------
Make message keys extension specific.
Remove unused key 'invaliduname'.

Modified Paths:
--------------
    trunk/extensions/SemanticSignup/SemanticSignup.i18n.php
    trunk/extensions/SemanticSignup/includes/SES_Special.php
    trunk/extensions/SemanticSignup/includes/SES_UserAccountDataChecker.php

Modified: trunk/extensions/SemanticSignup/SemanticSignup.i18n.php
===================================================================
--- trunk/extensions/SemanticSignup/SemanticSignup.i18n.php     2011-08-16 
08:27:58 UTC (rev 94611)
+++ trunk/extensions/SemanticSignup/SemanticSignup.i18n.php     2011-08-16 
08:30:41 UTC (rev 94612)
@@ -17,15 +17,14 @@
 $messages['en'] = array(
        'semanticsignup' => 'Semantic Signup',
        'ses-desc' => 'A MediaWiki extension built on top of Semantic Forms 
allowing to populate a user page with semantic data at signup time',
-       'nousername' => 'Username has not been specified',
-       'nopwdmatch' => 'Password and password confirmation don\'t match',
-       'norealname' => 'Real name is required but has not been specified',
-       'userexists' => 'User already exists',
-       'invaliduname' => 'Username specified is not allowed',
-       'emailfailed' => 'Confirmation email sending failed',
-       'createforbidden' => 'Current user is not allowed to create accounts',
-       'throttlehit' => 'New user accounts number maximum per day has been 
exceeded for this IP',
-       'ses_userexists' => 'User already exists'
+       'ses-nousername' => 'Username has not been specified.',
+       'ses-nopwdmatch' => 'Password and password confirmation do not match.',
+       'ses-norealname' => 'Real name is required but has not been specified.',
+       'ses-userexists' => 'User already exists.',
+       'ses-emailfailed' => 'Confirmation email sending failed.',
+       'ses-createforbidden' => 'Current user is not allowed to create 
accounts.',
+       'ses-throttlehit' => 'New user accounts number maximum per day has been 
exceeded for this IP.',
+       'ses-userexists' => 'User already exists.'
 );
 
 $magicWords = array();

Modified: trunk/extensions/SemanticSignup/includes/SES_Special.php
===================================================================
--- trunk/extensions/SemanticSignup/includes/SES_Special.php    2011-08-16 
08:27:58 UTC (rev 94611)
+++ trunk/extensions/SemanticSignup/includes/SES_Special.php    2011-08-16 
08:30:41 UTC (rev 94612)
@@ -58,7 +58,7 @@
                        }
                        
                        if ( $value > $wgAccountCreationThrottle ) {
-                               throw new Exception(wfMsg('throttlehit'));
+                               throw new Exception(wfMsg('ses-throttlehit'));
                        }
                }
                
@@ -106,7 +106,7 @@
                        $status = $user->sendConfirmationMail();
                        
                        if ( !$status->isGood() ) {
-                               throw new Exception( wfMsg( 'emailfailed' ) . 
"\n" . $status->getMessage() );
+                               throw new Exception( wfMsg( 'ses-emailfailed' ) 
. "\n" . $status->getMessage() );
                        }
                }
                

Modified: 
trunk/extensions/SemanticSignup/includes/SES_UserAccountDataChecker.php
===================================================================
--- trunk/extensions/SemanticSignup/includes/SES_UserAccountDataChecker.php     
2011-08-16 08:27:58 UTC (rev 94611)
+++ trunk/extensions/SemanticSignup/includes/SES_UserAccountDataChecker.php     
2011-08-16 08:30:41 UTC (rev 94612)
@@ -19,7 +19,7 @@
                $name = trim( $this->mUsername );
                $this->mUser = User::newFromName( $name, 'creatable' );
                if ( !$this->mUser ) {
-                       $this->error( wfMsg( 'noname' ) );
+                       $this->error( wfMsg( 'ses-noname' ) );
                }
                                        
                global $sesRealNameRequired;
@@ -28,7 +28,7 @@
                $this->mPassword = $this->getUserDataValue('wpPassword');
                $retype = $this->getUserDataValue('wpRetype');
                if (strcmp($this->mPassword, $retype))
-                       $this->error(wfMsg('nopwdmatch'));
+                       $this->error(wfMsg('ses-nopwdmatch'));
                        
                $this->mDomain = $this->getUserDataValue('wpDomain');
                
@@ -65,7 +65,7 @@
                global $wgUser;
                 
                if (!$wgUser->isAllowed( 'createaccount' ) || 
$wgUser->isBlockedFromCreateAccount() )
-                       $this->error(wfMsg('createforbidden'));
+                       $this->error(wfMsg('ses-createforbidden'));
        }
        
        public function checkSorbs()
@@ -81,7 +81,7 @@
        public function checkUserExists()
        {
                if ($this->mUser->idForName())
-                       $this->error(wfMsg('userexists'));
+                       $this->error(wfMsg('ses-userexists'));
        }
        
        public function checkPasswordLength()


_______________________________________________
MediaWiki-CVS mailing list
MediaWiki-CVS@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to