Mooeypoo has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/365869 )
Change subject: RCFilters: Correct language for invert button ...................................................................... RCFilters: Correct language for invert button Bug: T166912 Change-Id: Iabbbe2c76d5dc51f2aa49646c84b8eba7bc692a1 --- M languages/i18n/en.json M languages/i18n/qqq.json M resources/Resources.php M resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterMenuHeaderWidget.js 4 files changed, 21 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/69/365869/1 diff --git a/languages/i18n/en.json b/languages/i18n/en.json index 4d51c9e..64f9b7b 100644 --- a/languages/i18n/en.json +++ b/languages/i18n/en.json @@ -1443,6 +1443,8 @@ "rcfilters-tag-prefix-namespace": ":$1", "rcfilters-tag-prefix-namespace-inverted": "<strong>:not</strong> $1", "rcfilters-tag-prefix-tags": "#$1", + "rcfilters-exclude-button-off": "Exclude selected", + "rcfilters-exclude-button-on": "Excluding selected", "rcfilters-view-tags": "Tagged edits", "rcfilters-view-namespaces-tooltip": "Filter results by namespace", "rcfilters-view-tags-tooltip": "Filter results using edit tags", diff --git a/languages/i18n/qqq.json b/languages/i18n/qqq.json index 44335fc..d98f8b0 100644 --- a/languages/i18n/qqq.json +++ b/languages/i18n/qqq.json @@ -1633,6 +1633,8 @@ "rcfilters-tag-prefix-namespace": "Prefix for the namespace tags in [[Special:RecentChanges]]. Namespace tags use a colon (:) as prefix. Please keep this format.\n\nParameters:\n* $1 - Filter name.", "rcfilters-tag-prefix-namespace-inverted": "Prefix for the namespace inverted tags in [[Special:RecentChanges]]. Namespace tags use a colon (:) as prefix. Please keep this format.\n\nParameters:\n* $1 - Filter name.\n{{Identical|Not}}", "rcfilters-tag-prefix-tags": "Prefix for the edit tags in [[Special:RecentChanges]]. Edit tags use a hash (#) as prefix. Please keep this format.\n\nParameters:\n* $1 - Tag display name.", + "rcfilters-exclude-button-off": "Title for the button that excludes selected namespaces, when it is not yet active.", + "rcfilters-exclude-button-on": "Title for the button that excludes selected namespaces, when it is not yet active.", "rcfilters-view-tags": "Title for the tags view in [[Special:RecentChanges]]\n{{Identical|Tag}}", "rcfilters-view-namespaces-tooltip": "Tooltip for the button that loads the namespace view in [[Special:RecentChanges]]", "rcfilters-view-tags-tooltip": "Tooltip for the button that loads the tags view in [[Special:RecentChanges]]", diff --git a/resources/Resources.php b/resources/Resources.php index a8cf91d..afc1c0e 100644 --- a/resources/Resources.php +++ b/resources/Resources.php @@ -1857,6 +1857,8 @@ 'rcfilters-tag-prefix-namespace', 'rcfilters-tag-prefix-namespace-inverted', 'rcfilters-tag-prefix-tags', + 'rcfilters-exclude-button-off', + 'rcfilters-exclude-button-on', 'rcfilters-view-tags', 'rcfilters-view-namespaces-tooltip', 'rcfilters-view-tags-tooltip', diff --git a/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterMenuHeaderWidget.js b/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterMenuHeaderWidget.js index d0ad8d5..da71d70 100644 --- a/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterMenuHeaderWidget.js +++ b/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterMenuHeaderWidget.js @@ -44,10 +44,10 @@ // Invert namespaces button this.invertNamespacesButton = new OO.ui.ToggleButtonWidget( { icon: '', - label: mw.msg( 'invert' ), classes: [ 'mw-rcfilters-ui-filterMenuHeaderWidget-invertNamespacesButton' ] } ); this.invertNamespacesButton.toggle( this.model.getCurrentView() === 'namespaces' ); + this.updateInvertButton( this.model.areNamespacesInverted() ); // Events this.backButton.connect( this, { click: 'onBackButtonClick' } ); @@ -127,7 +127,21 @@ * @param {boolean} isInverted Namespaces selection is inverted */ mw.rcfilters.ui.FilterMenuHeaderWidget.prototype.onModelInvertChange = function ( isInverted ) { + this.updateInvertButton( isInverted ); + }; + + /** + * Update the state of the invert button + * + * @param {boolean} isInverted Namespaces selection is inverted + */ + mw.rcfilters.ui.FilterMenuHeaderWidget.prototype.updateInvertButton = function ( isInverted ) { this.invertNamespacesButton.setActive( isInverted ); + this.invertNamespacesButton.setLabel( + isInverted ? + mw.msg( 'rcfilters-exclude-button-on' ) : + mw.msg( 'rcfilters-exclude-button-off' ) + ); }; mw.rcfilters.ui.FilterMenuHeaderWidget.prototype.onBackButtonClick = function () { -- To view, visit https://gerrit.wikimedia.org/r/365869 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iabbbe2c76d5dc51f2aa49646c84b8eba7bc692a1 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Mooeypoo <mor...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits