Index: trunk/phase3/skins/common/ajaxwatch.js |
— | — | @@ -9,22 +9,20 @@ |
10 | 10 | } |
11 | 11 | |
12 | 12 | wgAjaxWatch.setLinkText = function( $link, action ) { |
13 | | - if( action == 'watch' || action == 'unwatch' ) { |
| 13 | + if ( action == 'watch' || action == 'unwatch' ) { |
14 | 14 | // 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 ); |
19 | 17 | } |
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 ) ); |
22 | 20 | if ( action == 'watching' || action == 'unwatching' ) { |
23 | 21 | $link.addClass( 'loading' ); |
24 | 22 | } else { |
25 | 23 | $link.removeClass( 'loading' ); |
26 | 24 | } |
27 | 25 | } else { |
28 | | - $link.html( mediaWiki.msg.get( action + 'Msg' ) ); |
| 26 | + $link.html( mediaWiki.msg.get( action ) ); |
29 | 27 | } |
30 | 28 | }; |
31 | 29 | |
— | — | @@ -112,7 +110,7 @@ |
113 | 111 | if( $link.parents( 'li' ).attr( 'id' ) == 'ca-' + action ) { |
114 | 112 | $link.parents( 'li' ).attr( 'id', 'ca-' + otheraction ); |
115 | 113 | // update the link text with the new message |
116 | | - $link.text( mediaWiki.msg.get( otheraction + 'Msg' ) ); |
| 114 | + $link.text( mediaWiki.msg.get( otheraction ) ); |
117 | 115 | } |
118 | 116 | }; |
119 | 117 | return false; |