jenkins-bot has submitted this change and it was merged. Change subject: Make show/hide link in RC individually localizable ......................................................................
Make show/hide link in RC individually localizable This commit concerns the filters on the [[Special:RecentChanges]] box. Previously, "Show" and "Hide" in messages such as "Show anonymous users" were a shared system message: now each filter can be assigned a verb individually. For example: * Argument $1 of `rcshowhideminor` used to come from `show` or `hide`. * $1 now comes from `rcshowhideminor-show` or `rcshowhideminor-hide`. In place of `show` and `hide`, the following system messages are affected: * `rcshowhideminor` uses `rcshowhideminor-show` and `rcshowhideminor-hide`. * `rcshowhidebots` uses `rcshowhidebots-show` and `rcshowhidebots-hide`. * `rcshowhideanons` uses `rcshowhideanons-show` and `rcshowhideanons-hide`. * `rcshowhidepatr` uses `rcshowhidepatr-show` and `rcshowhideanons-hide`. * `rcshowhidemine` uses `rcshowhidemine-show` and `rcshowhidemine-hide`. This change attempts to correct an issue encountered when localising into Chechen (ce); previous behaviour made it impossible to translate the entire sentence fragment correctly (as the verb is rendered slightly differently depending on the rest of the sentence, and this was not possible with a shared Show/Hide message). Bug: 58449 Change-Id: Ibbfc3cd0477b029c8f22a3c812a891ac2109d660 --- M includes/specials/SpecialRecentchanges.php M languages/messages/MessagesEn.php M languages/messages/MessagesQqq.php M maintenance/language/messages.inc 4 files changed, 115 insertions(+), 11 deletions(-) Approvals: Bartosz Dziewoński: Looks good to me, but someone else must approve Nikerabbit: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/specials/SpecialRecentchanges.php b/includes/specials/SpecialRecentchanges.php index 90abe1c..7083f68 100644 --- a/includes/specials/SpecialRecentchanges.php +++ b/includes/specials/SpecialRecentchanges.php @@ -936,7 +936,6 @@ $dl = $lang->pipeList( $dl ); // show/hide links - $showhide = array( $this->msg( 'show' )->text(), $this->msg( 'hide' )->text() ); $filters = array( 'hideminor' => 'rcshowhideminor', 'hidebots' => 'rcshowhidebots', @@ -944,7 +943,16 @@ 'hideliu' => 'rcshowhideliu', 'hidepatrolled' => 'rcshowhidepatr', 'hidemyself' => 'rcshowhidemine' - ); + ); + + // The following messages are also used as the link text itself: + // rcshowhideminor-show, rcshowhideminor-hide, + // rcshowhidebots-show, rcshowhideminor-hide, + // rcshowhideanons-show, rcshowhideanons-hide, + // rcshowhidepatr-show, rcshowhidepatr-hide, + // rcshowhidemine-show, rcshowhidemine-hide. + $showhide = array( 'show', 'hide' ); + foreach ( $this->getCustomFilters() as $key => $params ) { $filters[$key] = $params['msg']; } @@ -955,7 +963,7 @@ $links = array(); foreach ( $filters as $key => $msg ) { - $link = $this->makeOptionsLink( $showhide[1 - $options[$key]], + $link = $this->makeOptionsLink( $this->msg( $msg . '-' . $showhide[1 - $options[$key]] ), array( $key => 1 - $options[$key] ), $nondefaults ); $links[] = $this->msg( $msg )->rawParams( $link )->escaped(); } diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index 726b8f0..c1f1333 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -2199,11 +2199,23 @@ 'rcnotefrom' => "Below are the changes since '''$2''' (up to '''$1''' shown).", 'rclistfrom' => 'Show new changes starting from $1', 'rcshowhideminor' => '$1 minor edits', +'rcshowhideminor-show' => 'Show', +'rcshowhideminor-hide' => 'Hide', 'rcshowhidebots' => '$1 bots', +'rcshowhidebots-show' => 'Show', +'rcshowhidebots-hide' => 'Hide', 'rcshowhideliu' => '$1 registered users', +'rcshowhideliu-show' => 'Show', +'rcshowhideliu-hide' => 'Hide', 'rcshowhideanons' => '$1 anonymous users', +'rcshowhideanons-show' => 'Show', +'rcshowhideanons-hide' => 'Hide', 'rcshowhidepatr' => '$1 patrolled edits', +'rcshowhidepatr-show' => 'Show', +'rcshowhidepatr-hide' => 'Hide', 'rcshowhidemine' => '$1 my edits', +'rcshowhidemine-show' => 'Show', +'rcshowhidemine-hide' => 'Hide', 'rclinks' => 'Show last $1 changes in last $2 days<br />$3', 'diff' => 'diff', 'hist' => 'hist', diff --git a/languages/messages/MessagesQqq.php b/languages/messages/MessagesQqq.php index 5ab76d2..a50f75f 100644 --- a/languages/messages/MessagesQqq.php +++ b/languages/messages/MessagesQqq.php @@ -3630,21 +3630,93 @@ The corresponding message is {{msg-mw|Rcnotefrom}}.', 'rcshowhideminor' => 'Option text in [[Special:RecentChanges]]. Parameters: -* $1 - the "show/hide" command, with the text taken from either {{msg-mw|Show}} or {{msg-mw|Hide}}', +* $1 - the "show/hide" command, with the text taken from either {{msg-mw|rcshowhideminor-show}} or {{msg-mw|rcshowhideminor-hide}}', +'rcshowhideminor-show' => '{{doc-actionlink}} +Option text in [[Special:RecentChanges]] in conjunction with {{msg-mw|rcshowhideminor}}. + +See also: +* {{msg-mw|rcshowhideminor-hide}} +{{Identical|Show}}', +'rcshowhideminor-hide' => '{{doc-actionlink}} +Option text in [[Special:RecentChanges]] in conjunction with {{msg-mw|rcshowhideminor}}. + +See also: +* {{msg-mw|rcshowhideminor-show}} +{{Identical|Hide}}', 'rcshowhidebots' => 'Option text in [[Special:RecentChanges]]. Parameters: -* $1 - the "show/hide" command, with the text taken from either {{msg-mw|Show}} or {{msg-mw|Hide}} +* $1 - the "show/hide" command, with the text taken from either {{msg-mw|rcshowhidebots-show}} or {{msg-mw|rcshowhidebots-hide}} {{Identical|$1 bots}}', +'rcshowhidebots-show' => '{{doc-actionlink}} +Option text in [[Special:RecentChanges]] in conjunction with {{msg-mw|rcshowhidebots}}. + +See also: +* {{msg-mw|rcshowhidebots-show}} +{{Identical|Show}}', +'rcshowhidebots-hide' => '{{doc-actionlink}} +Option text in [[Special:RecentChanges]] in conjunction with {{msg-mw|rcshowhidebots}}. + +See also: +* {{msg-mw|rcshowhidebots-hide}} +{{Identical|Hide}}', 'rcshowhideliu' => 'Option text in [[Special:RecentChanges]]. Parameters: * $1 - any one of the following messages: -** {{msg-mw|Show}} -** {{msg-mw|Hide}}', +** {{msg-mw|rcshowhideliu-show}} +** {{msg-mw|rcshowhideliu-hide}}', +'rcshowhideliu-show' => '{{doc-actionlink}} +Option text in [[Special:RecentChanges]] in conjunction with {{msg-mw|rcshowhideliu}}. + +See also: +* {{msg-mw|rcshowhideliu-hide}} +{{Identical|Show}}', +'rcshowhideliu-hide' => '{{doc-actionlink}} +Option text in [[Special:RecentChanges]] in conjunction with {{msg-mw|rcshowhideliu}}. + +See also: +* {{msg-mw|rcshowhideliu-show}} +{{Identical|Hide}}', 'rcshowhideanons' => 'Option text in [[Special:RecentChanges]]. Parameters: -* $1 - the "show/hide" command, with the text taken from either {{msg-mw|Show}} or {{msg-mw|Hide}} +* $1 - the "show/hide" command, with the text taken from either {{msg-mw|rcshowhideanons-show}} or {{msg-mw|showhideanons-hide}} {{Identical|Anonymous user}}', +'rcshowhideanons-show' => '{{doc-actionlink}} +Option text in [[Special:RecentChanges]] in conjunction with {{msg-mw|rcshowhideanons}}. + +See also: +* {{msg-mw|rcshowhideanons-hide}} +{{Identical|Hide}}', +'rcshowhideanons-hide' => '{{doc-actionlink}} +Option text in [[Special:RecentChanges]] in conjunction with {{msg-mw|rcshowhideanons}}. + +See also: +* {{msg-mw|rcshowhideanons-show}} +{{Identical|hide}}', 'rcshowhidepatr' => 'Option text in [[Special:RecentChanges]]. Parameters: -* $1 - the "show/hide" command, with the text taken from either {{msg-mw|Show}} or {{msg-mw|Hide}}', +* $1 - the "show/hide" command, with the text taken from either {{msg-mw|rcshowhidepatr-show}} or {{msg-mw|rcshowhidepatr-hide}}', +'rcshowhidepatr-show' => '{{doc-actionlink}} +Option text in [[Special:RecentChanges]] in conjunction with {{msg-mw|rcshowhidepatr}}. + +See also: +* {{msg-mw|rcshowhidepatr-hide}} +{{Identical|Show}}', +'rcshowhidepatr-hide' => '{{doc-actionlink}} +Option text in [[Special:RecentChanges]] in conjunction with {{msg-mw|rcshowhidepatr}}. + +See also: +* {{msg-mw|rcshowhidepatr-show}} +{{Identical|Hide}}', 'rcshowhidemine' => 'Option text in [[Special:RecentChanges]]. Parameters: -* $1 - the "show/hide" command, with the text taken from either {{msg-mw|Show}} or {{msg-mw|Hide}}', +* $1 - the "show/hide" command, with the text taken from either {{msg-mw|rcshowhidemine-show}} or {{msg-mw|rcshowhidemine-hide}}', +'rcshowhidemine-show' => '{{doc-actionlink}} +Option text in [[Special:RecentChanges]] in conjunction with {{msg-mw|rcshowhidemine}}. + +See also: +* {{msg-mw|rcshowhidemine-hide}} +{{Identical|show}}', +'rcshowhidemine-hide' => '{{doc-actionlink}} +Option text in [[Special:RecentChanges]] in conjunction with {{msg-mw|rcshowhidemine}}. + +See also: +* {{msg-mw|rcshowhidemine-show}} +{{Identical|hide}}', 'rclinks' => "Used on [[Special:RecentChanges]]. * \$1 - a list of different choices with number of pages to be shown.<br /> Example: \"''50{{int:pipe-separator}}100{{int:pipe-separator}}250{{int:pipe-separator}}500\". * \$2 - a list of clickable links with a number of days for which recent changes are to be displayed.<br /> Example: \"''1{{int:pipe-separator}}3{{int:pipe-separator}}7{{int:pipe-separator}}14{{int:pipe-separator}}30''\". @@ -9573,7 +9645,7 @@ See: [[w:Non-English usage of quotation marks|Non-English usage of quotation marks on Wikipedia]]. -Parameters: +Parameters: * $1 - text to be wrapped in quotation marks', # Multipage image navigation diff --git a/maintenance/language/messages.inc b/maintenance/language/messages.inc index 8b76a6b..1380dde 100644 --- a/maintenance/language/messages.inc +++ b/maintenance/language/messages.inc @@ -1318,11 +1318,23 @@ 'rcnotefrom', 'rclistfrom', 'rcshowhideminor', + 'rcshowhideminor-show', + 'rcshowhideminor-hide', 'rcshowhidebots', + 'rcshowhidebots-show', + 'rcshowhidebots-hide', 'rcshowhideliu', + 'rcshowhideliu-show', + 'rcshowhideliu-hide', 'rcshowhideanons', + 'rcshowhideanons-show', + 'rcshowhideanons-hide', 'rcshowhidepatr', + 'rcshowhidepatr-show', + 'rcshowhidepatr-hide', 'rcshowhidemine', + 'rcshowhidemine-show', + 'rcshowhidemine-hide', 'rclinks', 'diff', 'hist', -- To view, visit https://gerrit.wikimedia.org/r/109296 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ibbfc3cd0477b029c8f22a3c812a891ac2109d660 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Microchip08 <doug...@chippy.ch> Gerrit-Reviewer: Aaron Schulz <asch...@wikimedia.org> Gerrit-Reviewer: Arrbee <run...@gmail.com> Gerrit-Reviewer: Bartosz Dziewoński <matma....@gmail.com> Gerrit-Reviewer: KartikMistry <kartik.mis...@gmail.com> Gerrit-Reviewer: Microchip08 <doug...@chippy.ch> Gerrit-Reviewer: Nikerabbit <niklas.laxst...@gmail.com> Gerrit-Reviewer: Siebrand <siebr...@wikimedia.org> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits