http://www.mediawiki.org/wiki/Special:Code/MediaWiki/73556
Revision: 73556
Author: tparscal
Date: 2010-09-22 18:30:32 +0000 (Wed, 22 Sep 2010)
Log Message:
-----------
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: trunk/phase3/skins/common/ajaxwatch.js
===================================================================
--- trunk/phase3/skins/common/ajaxwatch.js 2010-09-22 18:23:54 UTC (rev
73555)
+++ trunk/phase3/skins/common/ajaxwatch.js 2010-09-22 18:30:32 UTC (rev
73556)
@@ -9,22 +9,20 @@
}
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 @@
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;
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs