Add PLURAL support to youhavenewmessages*
authorAlex Ivanov <alexivanov97@gmail.com>
Tue, 3 Dec 2013 23:47:54 +0000 (01:47 +0200)
committerAlex Ivanov <alexivanov97@gmail.com>
Thu, 5 Dec 2013 18:41:07 +0000 (20:41 +0200)
Add PLURAL support on the number of talkpage messages received in
system messages youhavenewmessagesfromusers and youhavenewmessages.

Bug: 53897
Change-Id: Ic08c51f651fe4101ed0b6fcdaea4b4ae74331f70

includes/Skin.php
languages/messages/MessagesEn.php
languages/messages/MessagesQqq.php

index 750f319..26fea95 100644 (file)
@@ -1419,14 +1419,14 @@ abstract class Skin extends ContextSource {
                                        'youhavenewmessagesfromusers',
                                        $newMessagesLink,
                                        $newMessagesDiffLink
-                               )->numParams( $nofAuthors );
+                               )->numParams( $nofAuthors, $plural );
                        } else {
                                // $nofAuthors === 11 signifies "11 or more" ("more than 10")
                                $newMessagesAlert = $this->msg(
                                        $nofAuthors > 10 ? 'youhavenewmessagesmanyusers' : 'youhavenewmessages',
                                        $newMessagesLink,
                                        $newMessagesDiffLink
-                               );
+                               )->numParams( $plural );
                        }
                        $newMessagesAlert = $newMessagesAlert->text();
                        # Disable Squid cache
index e6ecc78..648aa18 100644 (file)
@@ -939,8 +939,8 @@ See [[Special:Version|version page]].',
 'pagetitle-view-mainpage'      => '{{SITENAME}}', # only translate this message to other languages if you have to change it
 'backlinksubtitle'             => '← $1', # only translate this message to other languages if you have to change it
 'retrievedfrom'                => 'Retrieved from "$1"',
-'youhavenewmessages'           => 'You have $1 ($2).',
-'youhavenewmessagesfromusers'  => 'You have $1 from {{PLURAL:$3|another user|$3 users}} ($2).',
+'youhavenewmessages'           => '{{PLURAL:$3|You have}} $1 ($2).',
+'youhavenewmessagesfromusers'  => '{{PLURAL:$4|You have}} $1 from {{PLURAL:$3|another user|$3 users}} ($2).',
 'youhavenewmessagesmanyusers'  => 'You have $1 from many users ($2).',
 'newmessageslinkplural'        => '{{PLURAL:$1|a new message|999=new messages}}',
 'newmessagesdifflinkplural'    => 'last {{PLURAL:$1|change|999=changes}}',
index 4d84a95..700d7c5 100644 (file)
@@ -820,19 +820,27 @@ Appears in subtitle. Parameters:
 
 Parameters:
 * $1 - a link back to the current page: {{FULLURL:{{FULLPAGENAME}}}}',
-'youhavenewmessages' => 'The yellow message appearing when someone edited your user talk page.
+'youhavenewmessages' => "The yellow message appearing when someone edited your user talk page.
 
-The format is: "{{int:youhavenewmessages| [[MediaWiki:Newmessageslinkplural/{{SUBPAGENAME}}|{{int:newmessageslinkplural}}]] |[[MediaWiki:Newmessagesdifflinkplural/{{SUBPAGENAME}}|{{int:newmessagesdifflinkplural}}]]}}"
+The format is: {{int:youhavenewmessages| [[MediaWiki:Newmessageslinkplural/{{SUBPAGENAME}}|{{int:newmessageslinkplural}}]] |[[MediaWiki:Newmessagesdifflinkplural/{{SUBPAGENAME}}|{{int:newmessagesdifflinkplural}}]]}}
 
 Parameters:
 * $1 - a link points to new messages. Its text is {{msg-mw|Newmessageslinkplural}}
 * $2 - a link points to new messages diff. Its text is {{msg-mw|Newmessagesdifflinkplural}}
+* $3 - 1 or 999:
+** 1 if there was '''one''' new edit since the last time the user has seen their talk page
+** 999 - if there was '''more than one''' new edit since the last time the user has seen their talk page
 See also:
-* {{msg-mw|Youhavenewmessagesmanyusers}}',
-'youhavenewmessagesfromusers' => 'New talk indicator message: the message appearing when someone edited your user talk page. Parameters:
+* {{msg-mw|Youhavenewmessagesmanyusers}}",
+'youhavenewmessagesfromusers' => "New talk indicator message: the message appearing when someone edited your user talk page.
+
+Parameters:
 * $1 - defined as {{msg-mw|newmessageslinkplural}}
 * $2 - defined as {{msg-mw|newmessagesdifflinkplural}}
-* $3 - the number of authors who have edited the talk page since the owning user last viewed it',
+* $3 - the number of authors who have edited the talk page since the owning user last viewed it
+* $4 - 1 or 999:
+** 1 if there was '''one''' new edit since the last time the user has seen their talk page
+** 999 - if there was '''more than one''' new edit since the last time the user has seen their talk page",
 'youhavenewmessagesmanyusers' => 'New talk indicator message: the message appearing when someone edited your user talk page.
 
 Used when more than 10 users edited the user talk page since the owning user last viewed it, similar to {{msg-mw|youhavenewmessages}}.