From: Matěj Suchánek Date: Mon, 5 Jun 2017 15:06:31 +0000 (+0200) Subject: Add a message to localize strings like "2×" and use it in enhanced RC X-Git-Tag: 1.31.0-rc.0~2946^2 X-Git-Url: http://git.cyclocoop.org//%22javascript:ModifierStyle%28%27%22.%24id.%22%27%29/%22?a=commitdiff_plain;h=0da36c5cabed2f3eaf263ff632987c692db2eb89;p=lhc%2Fweb%2Fwiklou.git Add a message to localize strings like "2×" and use it in enhanced RC Change-Id: I4fb651347a45f30e26bb6a49a565013fa91797ad --- diff --git a/includes/changes/EnhancedChangesList.php b/includes/changes/EnhancedChangesList.php index b34a33fdcf..534e36007b 100644 --- a/includes/changes/EnhancedChangesList.php +++ b/includes/changes/EnhancedChangesList.php @@ -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 ); diff --git a/languages/i18n/en.json b/languages/i18n/en.json index 9fe0e3cfc5..a8502af6bf 100644 --- a/languages/i18n/en.json +++ b/languages/i18n/en.json @@ -1343,6 +1343,7 @@ "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", diff --git a/languages/i18n/qqq.json b/languages/i18n/qqq.json index e33a4b75b4..3fb31c6b51 100644 --- a/languages/i18n/qqq.json +++ b/languages/i18n/qqq.json @@ -1533,6 +1533,7 @@ "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}}",