From 0da36c5cabed2f3eaf263ff632987c692db2eb89 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Mat=C4=9Bj=20Such=C3=A1nek?= Date: Mon, 5 Jun 2017 17:06:31 +0200 Subject: [PATCH 1/1] =?utf8?q?Add=20a=20message=20to=20localize=20strings?= =?utf8?q?=20like=20"2=C3=97"=20and=20use=20it=20in=20enhanced=20RC?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Change-Id: I4fb651347a45f30e26bb6a49a565013fa91797ad --- includes/changes/EnhancedChangesList.php | 3 +-- languages/i18n/en.json | 1 + languages/i18n/qqq.json | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) 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}}", -- 2.20.1