r73556 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r73555‎ | r73556 | r73557 >
Date:18:30, 22 September 2010
Author:tparscal
Status:ok
Tags:
Comment:
Removed extra "Msg" string being appended to message names, which was a remanant of the old code. This fixes bug #25251
Modified paths:
  • /trunk/phase3/skins/common/ajaxwatch.js (modified) (history)

Diff [purge]

Index: trunk/phase3/skins/common/ajaxwatch.js
@@ -9,22 +9,20 @@
1010 }
1111
1212 wgAjaxWatch.setLinkText = function( $link, action ) {
13 - if( action == 'watch' || action == 'unwatch' ) {
 13+ if ( action == 'watch' || action == 'unwatch' ) {
1414 // save the accesskey from the title
15 - var keyCommand = $link.attr( 'title' ).match( /\[.*?\]$/ )
16 - ? $link.attr( 'title' ).match( /\[.*?\]$/ )[0]
17 - : '';
18 - $link.attr( 'title', mediaWiki.msg.get( 'tooltip-ca-' + action + 'Msg') + ' ' + keyCommand );
 15+ var keyCommand = $link.attr( 'title' ).match( /\[.*?\]$/ ) ? $link.attr( 'title' ).match( /\[.*?\]$/ )[0] : '';
 16+ $link.attr( 'title', mediaWiki.msg.get( 'tooltip-ca-' + action ) + ' ' + keyCommand );
1917 }
20 - if( $link.data( 'icon' ) ) {
21 - $link.attr( 'alt', mediaWiki.msg.get( action + 'Msg' ) );
 18+ if ( $link.data( 'icon' ) ) {
 19+ $link.attr( 'alt', mediaWiki.msg.get( action ) );
2220 if ( action == 'watching' || action == 'unwatching' ) {
2321 $link.addClass( 'loading' );
2422 } else {
2523 $link.removeClass( 'loading' );
2624 }
2725 } else {
28 - $link.html( mediaWiki.msg.get( action + 'Msg' ) );
 26+ $link.html( mediaWiki.msg.get( action ) );
2927 }
3028 };
3129
@@ -112,7 +110,7 @@
113111 if( $link.parents( 'li' ).attr( 'id' ) == 'ca-' + action ) {
114112 $link.parents( 'li' ).attr( 'id', 'ca-' + otheraction );
115113 // update the link text with the new message
116 - $link.text( mediaWiki.msg.get( otheraction + 'Msg' ) );
 114+ $link.text( mediaWiki.msg.get( otheraction ) );
117115 }
118116 };
119117 return false;

Status & tagging log