Add a message to localize strings like "2×" and use it in enhanced RC
authorMatěj Suchánek <matejsuchanek97@gmail.com>
Mon, 5 Jun 2017 15:06:31 +0000 (17:06 +0200)
committerMatěj Suchánek <matejsuchanek97@gmail.com>
Tue, 6 Jun 2017 06:50:25 +0000 (08:50 +0200)
Change-Id: I4fb651347a45f30e26bb6a49a565013fa91797ad

includes/changes/EnhancedChangesList.php
languages/i18n/en.json
languages/i18n/qqq.json

index b34a33f..534e360 100644 (file)
@@ -243,8 +243,7 @@ class EnhancedChangesList extends ChangesList {
                        $text = $userlink;
                        $text .= $this->getLanguage()->getDirMark();
                        if ( $count > 1 ) {
-                               // @todo FIXME: Hardcoded '×'. Should be a message.
-                               $formattedCount = $this->getLanguage()->formatNum( $count ) . '×';
+                               $formattedCount = $this->msg( 'ntimes' )->numParams( $count )->escaped();
                                $text .= ' ' . $this->msg( 'parentheses' )->rawParams( $formattedCount )->escaped();
                        }
                        array_push( $users, $text );
index 9fe0e3c..a8502af 100644 (file)
        "action-deletechangetags": "delete tags from the database",
        "action-purge": "purge this page",
        "nchanges": "$1 {{PLURAL:$1|change|changes}}",
+       "ntimes": "$1×",
        "enhancedrc-since-last-visit": "$1 {{PLURAL:$1|since last visit}}",
        "enhancedrc-history": "history",
        "recentchanges": "Recent changes",
index e33a4b7..3fb31c6 100644 (file)
        "action-deletechangetags": "{{doc-action|deletechangetags}}",
        "action-purge": "{{doc-action|purge}}",
        "nchanges": "Appears on enhanced watchlist and recent changes when page has more than one change on given date, linking to a diff of the changes.\n\nParameters:\n* $1 - the number of changes on that day (2 or more)\nThree messages are shown side-by-side: ({{msg-mw|Nchanges}} | {{msg-mw|Enhancedrc-since-last-visit}} | {{msg-mw|Enhancedrc-history}}).",
+       "ntimes": "Used to indicate how many times an event occurred (eg. on enhanced recent change when a user did more than one change to the page). Parameters:\n* $1 - number (integer)",
        "enhancedrc-since-last-visit": "Appears on enhanced watchlist and recent changes when page has more than one change on given date and at least one that the user hasn't seen yet, linking to a diff of the unviewed changes.\n\nParameters:\n* $1 - the number of unviewed changes (1 or more)\nThree messages are shown side-by-side: ({{msg-mw|nchanges}} | {{msg-mw|enhancedrc-since-last-visit}} | {{msg-mw|enhancedrc-history}}).",
        "enhancedrc-history": "Appears on enhanced watchlist and recent changes when page has more than one change on given date, linking to its history.\n\nThis is the same as {{msg-mw|hist}}, but not abbreviated.\n\nThree messages are shown side-by-side: ({{msg-mw|nchanges}} | {{msg-mw|enhancedrc-since-last-visit}} | {{msg-mw|enhancedrc-history}}).\n{{Identical|History}}",
        "recentchanges": "The text of the link in sidebar going to the special page [[Special:RecentChanges]]. Also the page title of that special page.\n\nSee also:\n* {{msg-mw|Recentchanges}}\n* {{msg-mw|Accesskey-n-recentchanges}}\n* {{msg-mw|Tooltip-n-recentchanges}}\n{{Identical|Recent changes}}",