Support plural for 'passwordtooshort'
authorRaimond Spekking <raymond@users.mediawiki.org>
Tue, 10 Jun 2008 10:32:05 +0000 (10:32 +0000)
committerRaimond Spekking <raymond@users.mediawiki.org>
Tue, 10 Jun 2008 10:32:05 +0000 (10:32 +0000)
includes/SpecialUserlogin.php
includes/User.php
languages/messages/MessagesDe.php
languages/messages/MessagesEn.php

index f0bfff3..e2d802b 100644 (file)
@@ -271,7 +271,7 @@ class LoginForm {
                # check for minimal password length
                if ( !$u->isValidPassword( $this->mPassword ) ) {
                        if ( !$this->mCreateaccountMail ) {
-                               $this->mainLoginForm( wfMsg( 'passwordtooshort', $wgMinimalPasswordLength ) );
+                               $this->mainLoginForm( wfMsgExt( 'passwordtooshort', array( 'parsemag' ), $wgMinimalPasswordLength ) );
                                return false;
                        } else {
                                # do not force a password for account creation by email
index 0ba92e2..00840d4 100644 (file)
@@ -1537,7 +1537,7 @@ class User {
 
                        if( !$this->isValidPassword( $str ) ) {
                                global $wgMinimalPasswordLength;
-                               throw new PasswordError( wfMsg( 'passwordtooshort',
+                               throw new PasswordError( wfMsgExt( 'passwordtooshort', array( 'parsemag' ),
                                        $wgMinimalPasswordLength ) );
                        }
                }
index 3731f9e..4500759 100644 (file)
@@ -580,7 +580,7 @@ Dein Benutzerkonto wurde eingerichtet. Vergiss nicht, deine Einstellungen anzupa
 'nouserspecified'            => 'Bitte gib einen Benutzernamen an.',
 'wrongpassword'              => 'Das Passwort ist falsch (oder fehlt). Bitte versuche es erneut.',
 'wrongpasswordempty'         => 'Es wurde kein Passwort eingegeben. Bitte versuche es erneut.',
-'passwordtooshort'           => 'Fehler bei der Passwort-Wahl: Es muss mindestens $1 Zeichen lang sein und darf nicht mit dem Benutzernamen identisch sein.',
+'passwordtooshort'           => 'Fehler bei der Wahl des Passwortes: Es muss mindestens {{PLURAL:$1|1 Zeichen|$1 Zeichen}} lang sein und darf nicht mit dem Benutzernamen identisch sein.',
 'mailmypassword'             => 'Neues Passwort zusenden',
 'passwordremindertitle'      => 'Neues Passwort für ein {{SITENAME}}-Benutzerkonto',
 'passwordremindertext'       => 'Jemand mit der IP-Adresse $1, wahrscheinlich du selbst, hat ein neues Passwort für die Anmeldung bei {{SITENAME}} ($4) angefordert.
index 19e9943..da45d18 100644 (file)
@@ -905,7 +905,7 @@ Check your spelling.',
 'wrongpassword'              => 'Incorrect password entered. Please try again.',
 'wrongpasswordempty'         => 'Password entered was blank. Please try again.',
 'passwordtooshort'           => 'Your password is invalid or too short.
-It must have at least $1 characters and be different from your username.',
+It must have at least {{PLURAL:$1|1 character|$1 characters}} and be different from your username.',
 'mailmypassword'             => 'E-mail password',
 'passwordremindertitle'      => 'New temporary password for {{SITENAME}}',
 'passwordremindertext'       => 'Someone (probably you, from IP address $1)