Removed extra "Msg" string being appended to message names, which was a remanant...
authorTrevor Parscal <tparscal@users.mediawiki.org>
Wed, 22 Sep 2010 18:30:32 +0000 (18:30 +0000)
committerTrevor Parscal <tparscal@users.mediawiki.org>
Wed, 22 Sep 2010 18:30:32 +0000 (18:30 +0000)
skins/common/ajaxwatch.js

index 5394851..9ee5c08 100644 (file)
@@ -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;