From ede62194d7ae1104a5d9d1ddb28b20b6eac72bcc Mon Sep 17 00:00:00 2001 From: Trevor Parscal Date: Wed, 22 Sep 2010 18:30:32 +0000 Subject: [PATCH] Removed extra "Msg" string being appended to message names, which was a remanant of the old code. This fixes bug #25251 --- skins/common/ajaxwatch.js | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/skins/common/ajaxwatch.js b/skins/common/ajaxwatch.js index 5394851460..9ee5c08209 100644 --- a/skins/common/ajaxwatch.js +++ b/skins/common/ajaxwatch.js @@ -9,22 +9,20 @@ if ( typeof wgAjaxWatch === 'undefined' || !wgAjaxWatch ) { } wgAjaxWatch.setLinkText = function( $link, action ) { - if( action == 'watch' || action == 'unwatch' ) { + if ( action == 'watch' || action == 'unwatch' ) { // save the accesskey from the title - var keyCommand = $link.attr( 'title' ).match( /\[.*?\]$/ ) - ? $link.attr( 'title' ).match( /\[.*?\]$/ )[0] - : ''; - $link.attr( 'title', mediaWiki.msg.get( 'tooltip-ca-' + action + 'Msg') + ' ' + keyCommand ); + var keyCommand = $link.attr( 'title' ).match( /\[.*?\]$/ ) ? $link.attr( 'title' ).match( /\[.*?\]$/ )[0] : ''; + $link.attr( 'title', mediaWiki.msg.get( 'tooltip-ca-' + action ) + ' ' + keyCommand ); } - if( $link.data( 'icon' ) ) { - $link.attr( 'alt', mediaWiki.msg.get( action + 'Msg' ) ); + if ( $link.data( 'icon' ) ) { + $link.attr( 'alt', mediaWiki.msg.get( action ) ); if ( action == 'watching' || action == 'unwatching' ) { $link.addClass( 'loading' ); } else { $link.removeClass( 'loading' ); } } else { - $link.html( mediaWiki.msg.get( action + 'Msg' ) ); + $link.html( mediaWiki.msg.get( action ) ); } }; @@ -112,7 +110,7 @@ $( document ).ready( function() { if( $link.parents( 'li' ).attr( 'id' ) == 'ca-' + action ) { $link.parents( 'li' ).attr( 'id', 'ca-' + otheraction ); // update the link text with the new message - $link.text( mediaWiki.msg.get( otheraction + 'Msg' ) ); + $link.text( mediaWiki.msg.get( otheraction ) ); } }; return false; -- 2.20.1