"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",
"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]]",
'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',
// 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' } );
* @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 () {