Merge "Fix Message::newFromSpecifier for nested RawMessage"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Tue, 7 Jun 2016 22:47:17 +0000 (22:47 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Tue, 7 Jun 2016 22:47:17 +0000 (22:47 +0000)
includes/Status.php
languages/i18n/en.json

index d01f269..45d8bed 100644 (file)
@@ -251,12 +251,22 @@ class Status {
        }
 
        /**
-        * Get the error list as a Message object
+        * Get a bullet list of the errors as a Message object.
         *
-        * @param string|string[] $shortContext A short enclosing context message name (or an array of
-        * message names), to be used when there is a single error.
-        * @param string|string[] $longContext A long enclosing context message name (or an array of
-        * message names), for a list.
+        * $shortContext and $longContext can be used to wrap the error list in some text.
+        * $shortContext will be preferred when there is a single error; $longContext will be
+        * preferred when there are multiple ones. In either case, $1 will be replaced with
+        * the list of errors.
+        *
+        * $shortContext is assumed to use $1 as an inline parameter: if there is a single item,
+        * it will not be made into a list; if there are multiple items, newlines will be inserted
+        * around the list.
+        * $longContext is assumed to use $1 as a standalone parameter; it will always receive a list.
+        *
+        * If both parameters are missing, and there is only one error, no bullet will be added.
+        *
+        * @param string|string[] $shortContext A message name or an array of message names.
+        * @param string|string[] $longContext A message name or an array of message names.
         * @param string|Language $lang Language to use for processing messages
         * @return Message
         */
@@ -287,10 +297,6 @@ class Status {
                        $msgs = $this->getErrorMessageArray( $rawErrors, $lang );
                        $msgCount = count( $msgs );
 
-                       if ( $shortContext ) {
-                               $msgCount++;
-                       }
-
                        $s = new RawMessage( '* $' . implode( "\n* \$", range( 1, $msgCount ) ) );
                        $s->params( $msgs )->parse();
 
index 9432cad..a028283 100644 (file)
        "resetpass-temp-password": "Temporary password:",
        "resetpass-abort-generic": "Password change has been aborted by an extension.",
        "resetpass-expired": "Your password has expired. Please set a new password to log in.",
-       "resetpass-expired-soft": "Your password has expired and needs to be reset. Please choose a new password now, or click \"{{int:resetpass-submit-cancel}}\" to reset it later.",
-       "resetpass-validity-soft": "Your password is not valid: $1\n\nPlease choose a new password now, or click \"{{int:resetpass-submit-cancel}}\" to reset it later.",
+       "resetpass-expired-soft": "Your password has expired and needs to be reset. Please choose a new password now, or click \"{{int:authprovider-resetpass-skip-label}}\" to reset it later.",
+       "resetpass-validity-soft": "Your password is not valid: $1\n\nPlease choose a new password now, or click \"{{int:authprovider-resetpass-skip-label}}\" to reset it later.",
        "passwordreset": "Reset password",
        "passwordreset-text-one": "Complete this form to receive a temporary password via email.",
        "passwordreset-text-many": "{{PLURAL:$1|Fill in one of the fields to receive a temporary password via email.}}",