From: Trevor Parscal Date: Wed, 27 Oct 2010 00:16:32 +0000 (+0000) Subject: Mostly reverted r75487, making use of a new version of mediaWiki.msg. X-Git-Tag: 1.31.0-rc.0~34280 X-Git-Url: http://git.cyclocoop.org/%28?a=commitdiff_plain;h=786b93d37ded003d2630476e8c64bd403287e718;p=lhc%2Fweb%2Fwiklou.git Mostly reverted r75487, making use of a new version of mediaWiki.msg. --- diff --git a/resources/mediawiki/mediawiki.js b/resources/mediawiki/mediawiki.js index b52a3eb831..59035415ac 100644 --- a/resources/mediawiki/mediawiki.js +++ b/resources/mediawiki/mediawiki.js @@ -142,7 +142,7 @@ window.mediaWiki = new ( function( $ ) { Message.prototype.toString = function() { if ( !this.map.exists( this.key ) ) { // Return if key does not exist - return '<' + key + '>'; + return '<' + this.key + '>'; } var text = this.map.get( this.key ); var parameters = this.parameters; @@ -246,7 +246,7 @@ window.mediaWiki = new ( function( $ ) { * replacement */ this.msg = function( key, parameters ) { - return mediaWiki.message.apply( mediaWiki.message, arguments ); + return mediaWiki.message.apply( mediaWiki.message, arguments ).toString(); }; /** diff --git a/skins/common/ajaxwatch.js b/skins/common/ajaxwatch.js index e051229b41..a1682f084c 100644 --- a/skins/common/ajaxwatch.js +++ b/skins/common/ajaxwatch.js @@ -12,17 +12,17 @@ wgAjaxWatch.setLinkText = function( $link, action ) { 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.message( 'tooltip-ca-' + action ) + ' ' + keyCommand ); + $link.attr( 'title', mediaWiki.msg( 'tooltip-ca-' + action ) + ' ' + keyCommand ); } if ( $link.data( 'icon' ) ) { - $link.attr( 'alt', mediaWiki.message( action ) ); + $link.attr( 'alt', mediaWiki.msg( action ) ); if ( action == 'watching' || action == 'unwatching' ) { $link.addClass( 'loading' ); } else { $link.removeClass( 'loading' ); } } else { - $link.html( mediaWiki.message( action ) ); + $link.html( mediaWiki.msg( action ) ); } }; @@ -110,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.message( otheraction ) ); + $link.text( mediaWiki.msg( otheraction ) ); } }; return false; diff --git a/skins/common/wikibits.js b/skins/common/wikibits.js index 1ae7f62c71..b01f30984e 100644 --- a/skins/common/wikibits.js +++ b/skins/common/wikibits.js @@ -156,7 +156,7 @@ window.showTocToggle = function() { toggleLink.href = '#'; addClickHandler( toggleLink, function( evt ) { toggleToc(); return killEvt( evt ); } ); - toggleLink.appendChild( document.createTextNode( mediaWiki.message( 'hidetoc' ) ) ); + toggleLink.appendChild( document.createTextNode( mediaWiki.msg( 'hidetoc' ) ) ); outerSpan.appendChild( document.createTextNode( '[' ) ); outerSpan.appendChild( toggleLink ); @@ -198,12 +198,12 @@ window.toggleToc = function() { var toggleLink = document.getElementById( 'togglelink' ); if ( toc && toggleLink && toc.style.display == 'none' ) { - changeText( toggleLink, mediaWiki.message( 'hidetoc' ) ); + changeText( toggleLink, mediaWiki.msg( 'hidetoc' ) ); toc.style.display = 'block'; document.cookie = "hidetoc=0"; tocmain.className = 'toc'; } else { - changeText( toggleLink, mediaWiki.message( 'showtoc' ) ); + changeText( toggleLink, mediaWiki.msg( 'showtoc' ) ); toc.style.display = 'none'; document.cookie = "hidetoc=1"; tocmain.className = 'toc tochidden';