jenkins-bot has submitted this change and it was merged.

Change subject: gM is deprecated use mw.msg instead
......................................................................


gM is deprecated use mw.msg instead

Change-Id: I4cb085345f8d489b6fdb97e5ad96b2f5b44de0c9
---
M UploadWizardPage.js
M resources/jquery/jquery.removeCtrl.js
M resources/jquery/jquery.showThumbCtrl.js
M resources/mw.ConfirmCloseWindow.js
M resources/mw.ErrorDialog.js
M resources/mw.FlickrChecker.js
M resources/mw.GroupProgressBar.js
M resources/mw.LanguageUpWiz.js
M resources/mw.UploadWizard.js
M resources/mw.UploadWizardDeed.js
M resources/mw.UploadWizardDescription.js
M resources/mw.UploadWizardDetails.js
M resources/mw.UploadWizardLicenseInput.js
M resources/mw.UploadWizardUpload.js
M resources/mw.UploadWizardUploadInterface.js
M resources/mw.UploadWizardUtil.js
M resources/mw.units.js
M test/jasmine/spec/mediawiki.parser2.spec.js
18 files changed, 124 insertions(+), 133 deletions(-)

Approvals:
  Siebrand: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/UploadWizardPage.js b/UploadWizardPage.js
index bb44420..85d51a1 100644
--- a/UploadWizardPage.js
+++ b/UploadWizardPage.js
@@ -22,14 +22,6 @@
 };
 
 $( document ).ready( function () {
-       // add "magic" to Language template parser for keywords
-       var options = { magic: { 'SITENAME' : mw.config.get( 'wgSiteName' ) } };
-
-       // these functions may exist already, but we want them to also know 
about our magic
-       // (the interface for this needs to change; add magic on the fly?)
-       window.gM = mw.jqueryMsg.getMessageFunction( options );
-       $.fn.msg = mw.jqueryMsg.getPlugin( options );
-
        // show page.
        mw.UploadWizardPage();
 } );
diff --git a/resources/jquery/jquery.removeCtrl.js 
b/resources/jquery/jquery.removeCtrl.js
index bc28664..c05e88c 100644
--- a/resources/jquery/jquery.removeCtrl.js
+++ b/resources/jquery/jquery.removeCtrl.js
@@ -3,9 +3,9 @@
  */
 ( function ( $j ) {
        $j.fn.removeCtrl = function( msgKey, tooltipMsgKey, callback ) {
-               var msg = (msgKey === null) ? '' : gM( msgKey );
+               var msg = (msgKey === null) ? '' : mw.msg( msgKey );
                return $j( '<div class="mwe-upwiz-remove-ctrl ui-corner-all" 
/>' )
-                       .attr( 'title', gM( tooltipMsgKey ) )
+                       .attr( 'title', mw.msg( tooltipMsgKey ) )
                        .click( callback )
                        .hover( function() { $j( this ).addClass( 'hover' ); },
                                function() { $j( this ).removeClass( 'hover' ); 
} )
diff --git a/resources/jquery/jquery.showThumbCtrl.js 
b/resources/jquery/jquery.showThumbCtrl.js
index 792e0ef..b22cf4e 100644
--- a/resources/jquery/jquery.showThumbCtrl.js
+++ b/resources/jquery/jquery.showThumbCtrl.js
@@ -3,9 +3,9 @@
  */
 ( function ( $j ) {
        $j.fn.showThumbCtrl = function( msgKey, tooltipMsgKey, callback ) {
-               var msg = (msgKey === null) ? '' : gM( msgKey );
+               var msg = (msgKey === null) ? '' : mw.msg( msgKey );
                return $j( '<div class="mwe-upwiz-show-thumb-ctrl 
ui-corner-all" />' )
-                       .attr( 'title', gM( tooltipMsgKey ) )
+                       .attr( 'title', mw.msg( tooltipMsgKey ) )
                        .click( function() { $j( this ).removeClass( 'hover' 
).addClass( 'disabled' ).unbind( 'mouseenter mouseover mouseleave mouseout 
mouseup mousedown' ); callback(); } )
                        .hover( function() { $j( this ).addClass( 'hover' ); },
                                function() { $j( this ).removeClass( 'hover' ); 
} )
diff --git a/resources/mw.ConfirmCloseWindow.js 
b/resources/mw.ConfirmCloseWindow.js
index 63911f7..33608d2 100644
--- a/resources/mw.ConfirmCloseWindow.js
+++ b/resources/mw.ConfirmCloseWindow.js
@@ -23,7 +23,7 @@
                }
 
                var defaults = {
-                       message: function() { return gM( 'mwe-prevent-close' ); 
},
+                       message: function() { return mw.msg( 
'mwe-prevent-close' ); },
                        test: function() { return true; }
                };
                options = $.extend( defaults, options );
diff --git a/resources/mw.ErrorDialog.js b/resources/mw.ErrorDialog.js
index d1fd9d0..8fe40e0 100644
--- a/resources/mw.ErrorDialog.js
+++ b/resources/mw.ErrorDialog.js
@@ -16,7 +16,7 @@
 
                        // Set up buttons for dialog box. We have to do it the 
hard way since the json keys are localized
                        _this.buttons = {};
-                       _this.buttons[ gM( 'mwe-upwiz-errordialog-ok' ) ] = 
function() { _this.ok(); };
+                       _this.buttons[ mw.msg( 'mwe-upwiz-errordialog-ok' ) ] = 
function() { _this.ok(); };
 
                        this.$dialog =
                                $( '<div style="position:relative;"></div>' 
).append(
@@ -29,7 +29,7 @@
                                ).dialog({
                                        width: 600,
                                        autoOpen: false,
-                                       title: gM( 
'mwe-upwiz-errordialog-title' ),
+                                       title: mw.msg( 
'mwe-upwiz-errordialog-title' ),
                                        modal: true,
                                        buttons: _this.buttons
                                });
diff --git a/resources/mw.FlickrChecker.js b/resources/mw.FlickrChecker.js
index 647505a..568e2e7 100644
--- a/resources/mw.FlickrChecker.js
+++ b/resources/mw.FlickrChecker.js
@@ -68,7 +68,7 @@
                var fileName, imageContainer, sourceURL;
 
                $j( '#mwe-upwiz-select-flickr' ).button( {
-                       label: gM( 'mwe-upwiz-select-flickr' ),
+                       label: mw.msg( 'mwe-upwiz-select-flickr' ),
                        disabled: true
                } );
                $.getJSON( _this.apiUrl, {
@@ -318,9 +318,9 @@
 
                // Set the license message to show the user.
                if ( licenseValue == 'invalid' ) {
-                       licenseMessage = gM( 
'mwe-upwiz-license-external-invalid', 'Flickr', licenseName );
+                       licenseMessage = mw.msg( 
'mwe-upwiz-license-external-invalid', 'Flickr', licenseName );
                } else {
-                       licenseMessage = gM( 'mwe-upwiz-license-external', 
'Flickr', licenseName );
+                       licenseMessage = mw.msg( 'mwe-upwiz-license-external', 
'Flickr', licenseName );
                }
                var license = {
                        licenseName: licenseName,
diff --git a/resources/mw.GroupProgressBar.js b/resources/mw.GroupProgressBar.js
index e319bb8..4c2f3dc 100644
--- a/resources/mw.GroupProgressBar.js
+++ b/resources/mw.GroupProgressBar.js
@@ -138,15 +138,15 @@
                        if (t.hours === 0) {
                                if (t.minutes === 0) {
                                        if (t.seconds === 0) {
-                                               timeString = gM( 
'mwe-upwiz-finished' );
+                                               timeString = mw.msg( 
'mwe-upwiz-finished' );
                                        } else {
-                                               timeString = gM( 
'mwe-upwiz-secs-remaining', t.seconds );
+                                               timeString = mw.msg( 
'mwe-upwiz-secs-remaining', t.seconds );
                                        }
                                } else {
-                                       timeString = gM( 
'mwe-upwiz-mins-secs-remaining', t.minutes, t.seconds );
+                                       timeString = mw.msg( 
'mwe-upwiz-mins-secs-remaining', t.minutes, t.seconds );
                                }
                        } else {
-                               timeString = gM( 
'mwe-upwiz-hrs-mins-secs-remaining', t.hours, t.minutes, t.seconds );
+                               timeString = mw.msg( 
'mwe-upwiz-hrs-mins-secs-remaining', t.hours, t.minutes, t.seconds );
                        }
                        _this.$selector.find( '.mwe-upwiz-etr' ).html( 
timeString );
                }
@@ -178,7 +178,7 @@
        showCount: function( count ) {
                this.$selector
                        .find( '.mwe-upwiz-count' )
-                       .html( gM( 'mwe-upwiz-upload-count', [ count, 
this.uploads.length - this.countEmpties() ] ) );
+                       .html( mw.msg( 'mwe-upwiz-upload-count', count, 
this.uploads.length - this.countEmpties() ) );
        },
 
        countEmpties: function () {
diff --git a/resources/mw.LanguageUpWiz.js b/resources/mw.LanguageUpWiz.js
index 7bafb9d..e0de24d 100644
--- a/resources/mw.LanguageUpWiz.js
+++ b/resources/mw.LanguageUpWiz.js
@@ -103,7 +103,7 @@
                $select.attr( 'name', name );
                if ( code === mw.LanguageUpWiz.UNKNOWN ) {
                        // n.b. MediaWiki LanguageHandler has ability to add 
custom label for 'Unknown'; possibly as pseudo-label
-                       $select.prepend( $j( '<option>' ).attr( 'value', 
mw.LanguageUpWiz.UNKNOWN ).append( gM( 'mwe-upwiz-code-unknown' )) );
+                       $select.prepend( $j( '<option>' ).attr( 'value', 
mw.LanguageUpWiz.UNKNOWN ).append( mw.msg( 'mwe-upwiz-code-unknown' )) );
                        $select.val( mw.LanguageUpWiz.UNKNOWN );
                }
 
diff --git a/resources/mw.UploadWizard.js b/resources/mw.UploadWizard.js
index 595defc..ea403e9 100644
--- a/resources/mw.UploadWizard.js
+++ b/resources/mw.UploadWizard.js
@@ -146,7 +146,7 @@
                                        // check if there is an upload at all 
(should never happen)
                                        if ( _this.uploads.length === 0 ) {
                                                $j( '<div></div>' )
-                                                       .html( gM( 
'mwe-upwiz-file-need-file' ) )
+                                                       .html( mw.msg( 
'mwe-upwiz-file-need-file' ) )
                                                        .dialog({
                                                                width: 500,
                                                                zIndex: 200000,
@@ -285,11 +285,11 @@
                        // Add a friendly "Here's how to get it back" tooltip 
for users who check the "Skip next time" checkbox
                        $j( '#mwe-upwiz-skip ').tipsy( {
                                title: function() {
-                                       return gM(
+                                       return mw.msg(
                                                
'mwe-upwiz-tooltip-skiptutorial',
                                                mw.util.wikiGetlink( 
'Special:Preferences' ) + '#mw-prefsection-uploads',
-                                               gM( 'prefs-uploads' ),
-                                               gM( 'prefs-upwiz-interface' )
+                                               mw.msg( 'prefs-uploads' ),
+                                               mw.msg( 'prefs-upwiz-interface' 
)
                                        );
                                },
                                delayIn: 0,
@@ -322,11 +322,11 @@
                        '<button id="mwe-upwiz-upload-add-flickr" 
class="ui-helper-center-fix" type="submit"></button></form></div>';
                $j( '#mwe-upwiz-add-file-container, 
#mwe-upwiz-upload-ctrl-flickr-container' ).hide();
                // Add placeholder text to the Flickr URL input field
-               $flickr_input.attr( 'placeholder', gM( 
'mwe-upwiz-flickr-input-placeholder' ) ).placeholder();
+               $flickr_input.attr( 'placeholder', mw.msg( 
'mwe-upwiz-flickr-input-placeholder' ) ).placeholder();
                // Insert form into the page
                $j( '#mwe-upwiz-files' ).prepend( flickr_add );
                // Add disclaimer
-               var $disclaimer = gM( 'mwe-upwiz-flickr-disclaimer1' ) + 
'<br/>' + gM( 'mwe-upwiz-flickr-disclaimer2' );
+               var $disclaimer = mw.msg( 'mwe-upwiz-flickr-disclaimer1' ) + 
'<br/>' + mw.msg( 'mwe-upwiz-flickr-disclaimer2' );
                $disclaimer = $( '<div id="mwe-upwiz-flickr-disclaimer"></div>' 
).html( $disclaimer );
                $j( '#mwe-upwiz-upload-add-flickr-container' ).append( 
$disclaimer );
                // Insert input field into the form and set up submit action
@@ -336,7 +336,7 @@
                        return false;
                } );
                // Set up the submit button
-               $j( '#mwe-upwiz-upload-add-flickr' ).button( { label: gM( 
'mwe-upwiz-add-flickr' ) } );
+               $j( '#mwe-upwiz-upload-add-flickr' ).button( { label: mw.msg( 
'mwe-upwiz-add-flickr' ) } );
        },
 
        /**
@@ -588,7 +588,7 @@
                                        upload.start();
                                },
                                function() {
-                                       $j().notify( gM( 
'mwe-upwiz-files-complete' ) );
+                                       $j().notify( mw.msg( 
'mwe-upwiz-files-complete' ) );
                                        _this.showNext( 'file', 'stashed' );
                                }
                        );
@@ -730,7 +730,7 @@
        startProgressBar: function () {
                $j( '#mwe-upwiz-progress' ).show();
                this.progressBar = new mw.GroupProgressBar( 
'#mwe-upwiz-progress',
-                       gM( 'mwe-upwiz-uploading' ),
+                       mw.msg( 'mwe-upwiz-uploading' ),
                        this.uploads,
                        [ 'stashed' ],
                        [ 'error' ],
@@ -780,13 +780,13 @@
                } );
 
                this.allowCloseWindow = mw.confirmCloseWindow( {
-                       message: function() { return gM( 
'mwe-upwiz-prevent-close', _this.uploads.length ); },
+                       message: function() { return mw.msg( 
'mwe-upwiz-prevent-close', _this.uploads.length ); },
                        test: function() { return !_this.isComplete() && 
_this.uploads.length > 0; }
                } );
 
                $j( '#mwe-upwiz-progress' ).show();
                this.progressBar = new mw.GroupProgressBar( 
'#mwe-upwiz-progress',
-                       gM( 'mwe-upwiz-uploading' ),
+                       mw.msg( 'mwe-upwiz-uploading' ),
                        _this.uploads,
                        [ 'stashed' ],
                        [ 'error' ],
@@ -809,7 +809,7 @@
                                upload.start();
                        },
                        function() {
-                               $j().notify( gM( 'mwe-upwiz-files-complete' ) );
+                               $j().notify( mw.msg( 'mwe-upwiz-files-complete' 
) );
                                _this.showNext( 'file', 'stashed' );
                        }
                );
@@ -926,7 +926,7 @@
                        if ( mw.UploadWizard.config.enableMultipleFiles === 
true ) {
                                // changes the initial centered invitation 
button to something like "add another file"
                                _this.$addFile = this.$addFile || $j( 
'#mwe-upwiz-add-file' );
-                               _this.$addFile.button( 'option', 'label', gM( 
'mwe-upwiz-add-file-n' ) );
+                               _this.$addFile.button( 'option', 'label', 
mw.msg( 'mwe-upwiz-add-file-n' ) );
                                $j( '#mwe-upwiz-add-file, 
#mwe-upwiz-upload-ctrl-flickr' ).addClass( 'mwe-upwiz-add-files-n' );
                                _this.$addFileContainer = 
this.$addFileContainer || $j( '#mwe-upwiz-add-file-container' );
                                _this.$addFileContainer.removeClass( 
'mwe-upwiz-add-files-0' );
@@ -975,7 +975,7 @@
                        this.flickrInterfaceDestroy();
 
                        // changes the button back from "add another file" to 
the initial centered invitation button
-                       $j( '#mwe-upwiz-add-file' ).button( 'option', 'label', 
gM( 'mwe-upwiz-add-file-0-free' ) );
+                       $j( '#mwe-upwiz-add-file' ).button( 'option', 'label', 
mw.msg( 'mwe-upwiz-add-file-0-free' ) );
                        $j( '#mwe-upwiz-upload-ctr-divide' ).show();
                        // changes the button back from "add more files from 
flickr" to the initial text
                        $j( '#mwe-upwiz-upload-ctrl-flickr' ).button( 'option', 
'label', mw.msg( 'mwe-upwiz-add-file-flickr' ) );
@@ -1188,12 +1188,12 @@
                                $j( '<div class="mwe-upwiz-data"></div>' )
                                        .append(
                                                $j('<p/>').append(
-                                                       gM( 
'mwe-upwiz-thanks-wikitext' ),
+                                                       mw.msg( 
'mwe-upwiz-thanks-wikitext' ),
                                                        $j( '<br />' ),
                                                        
_this.makeReadOnlyInput( thumbWikiText )
                                                ),
                                                $j('<p/>').append(
-                                                       gM( 
'mwe-upwiz-thanks-url' ),
+                                                       mw.msg( 
'mwe-upwiz-thanks-url' ),
                                                        $j( '<br />' ),
                                                        
_this.makeReadOnlyInput( upload.imageinfo.descriptionurl )
                                                )
@@ -1278,7 +1278,7 @@
                $filenameList.append( $j( '<li></li>' ).append( 
upload.title.getMain() ) );
        } );
        var buttons = {};
-       buttons[ gM( 'mwe-upwiz-remove', uploads.length ) ] = function() {
+       buttons[ mw.msg( 'mwe-upwiz-remove', uploads.length ) ] = function() {
                $j.each( uploads, function( i, upload ) {
                        if ( upload === undefined ) {
                                return;
@@ -1287,7 +1287,7 @@
                } );
                $j( this ).dialog( 'close' );
        };
-       buttons[ gM( 'mwe-upwiz-cancel', uploads.length ) ] = function() {
+       buttons[ mw.msg( 'mwe-upwiz-cancel', uploads.length ) ] = function() {
                $j( this ).dialog( 'close' );
        };
 
@@ -1402,7 +1402,7 @@
                        contentSource = fn;
                        html = true;
                } else {
-                       attrs = { 'title': gM( 'mwe-upwiz-tooltip-' + key ) };
+                       attrs = { 'title': mw.msg( 'mwe-upwiz-tooltip-' + key ) 
};
                        contentSource = 'title';
                }
                return this.append(
diff --git a/resources/mw.UploadWizardDeed.js b/resources/mw.UploadWizardDeed.js
index f61da0a..55a2475 100644
--- a/resources/mw.UploadWizardDeed.js
+++ b/resources/mw.UploadWizardDeed.js
@@ -190,7 +190,7 @@
                        // if one changes all the others change (keyup event)
                        $formFields.find( '.mwe-upwiz-sign' )
                                .attr( {
-                                       title: gM( 'mwe-upwiz-tooltip-sign' ),
+                                       title: mw.msg( 'mwe-upwiz-tooltip-sign' 
),
                                        value: mw.config.get(  'wgUserName' )
                                } )
                                .keyup( function() {
@@ -221,9 +221,9 @@
 
                        var messages = {
                                author2: {
-                                       required: gM( 
'mwe-upwiz-error-signature-blank' ),
-                                       minlength: gM( 
'mwe-upwiz-error-signature-too-short', mw.UploadWizard.config[  
'minAuthorLength'  ] ),
-                                       maxlength: gM( 
'mwe-upwiz-error-signature-too-long', mw.UploadWizard.config[  
'maxAuthorLength'  ] )
+                                       required: mw.msg( 
'mwe-upwiz-error-signature-blank' ),
+                                       minlength: mw.msg( 
'mwe-upwiz-error-signature-too-short', mw.UploadWizard.config[  
'minAuthorLength'  ] ),
+                                       maxlength: mw.msg( 
'mwe-upwiz-error-signature-too-long', mw.UploadWizard.config[  
'maxAuthorLength'  ] )
                                }
                        };
 
@@ -240,9 +240,9 @@
                                };
 
                                messages.author = {
-                                       required: gM( 
'mwe-upwiz-error-signature-blank' ),
-                                       minlength: gM( 
'mwe-upwiz-error-signature-too-short', mw.UploadWizard.config[  
'minAuthorLength'  ] ),
-                                       maxlength: gM( 
'mwe-upwiz-error-signature-too-long', mw.UploadWizard.config[  
'maxAuthorLength'  ] )
+                                       required: mw.msg( 
'mwe-upwiz-error-signature-blank' ),
+                                       minlength: mw.msg( 
'mwe-upwiz-error-signature-too-short', mw.UploadWizard.config[  
'minAuthorLength'  ] ),
+                                       maxlength: mw.msg( 
'mwe-upwiz-error-signature-too-long', mw.UploadWizard.config[  
'maxAuthorLength'  ] )
                                };
                        }
 
@@ -297,11 +297,11 @@
                                $j( '<div 
class="mwe-upwiz-source-thirdparty-custom-multiple-intro" />' ),
                                $j( '<label for="source" generated="true" 
class="mwe-validator-error" style="display:block;" />' ),
                                $j( '<div class="mwe-upwiz-thirdparty-fields" 
/>' )
-                                       .append( $j( '<label for="source" />' 
).text( gM( 'mwe-upwiz-source' ) ).addHint( 'source' ),
+                                       .append( $j( '<label for="source" />' 
).text( mw.msg( 'mwe-upwiz-source' ) ).addHint( 'source' ),
                                                 _this.sourceInput ),
                                $j( '<label for="author" generated="true" 
class="mwe-validator-error" style="display:block;" />' ),
                                $j( '<div class="mwe-upwiz-thirdparty-fields" 
/>' )
-                                       .append( $j( '<label for="author" />' 
).text( gM( 'mwe-upwiz-author' ) ).addHint( 'author' ),
+                                       .append( $j( '<label for="author" />' 
).text( mw.msg( 'mwe-upwiz-author' ) ).addHint( 'author' ),
                                                 _this.authorInput ),
                                $j( '<div class="mwe-upwiz-thirdparty-license" 
/>' )
                                        .append( $j( '<div></div>' ).msg( 
'mwe-upwiz-source-thirdparty-cases', _this.uploadCount ) )
@@ -319,14 +319,14 @@
                                },
                                messages: {
                                        source: {
-                                               required: gM( 
'mwe-upwiz-error-blank' ),
-                                               minlength: gM( 
'mwe-upwiz-error-too-short', mw.UploadWizard.config[  'minSourceLength'  ] ),
-                                               maxlength: gM( 
'mwe-upwiz-error-too-long', mw.UploadWizard.config[  'maxSourceLength'  ] )
+                                               required: mw.msg( 
'mwe-upwiz-error-blank' ),
+                                               minlength: mw.msg( 
'mwe-upwiz-error-too-short', mw.UploadWizard.config[  'minSourceLength'  ] ),
+                                               maxlength: mw.msg( 
'mwe-upwiz-error-too-long', mw.UploadWizard.config[  'maxSourceLength'  ] )
                                        },
                                        author: {
-                                               required: gM( 
'mwe-upwiz-error-blank' ),
-                                               minlength: gM( 
'mwe-upwiz-error-too-short', mw.UploadWizard.config[  'minAuthorLength'  ] ),
-                                               maxlength: gM( 
'mwe-upwiz-error-too-long', mw.UploadWizard.config[  'maxAuthorLength'  ] )
+                                               required: mw.msg( 
'mwe-upwiz-error-blank' ),
+                                               minlength: mw.msg( 
'mwe-upwiz-error-too-short', mw.UploadWizard.config[  'minAuthorLength'  ] ),
+                                               maxlength: mw.msg( 
'mwe-upwiz-error-too-long', mw.UploadWizard.config[  'maxAuthorLength'  ] )
                                        }
                                }
                        } );
@@ -384,7 +384,7 @@
                   +    '<span class="mwe-upwiz-deed-header">'
                   +      '<input id="' + id +'" name="' + _this.name + '" 
type="radio" value="' + deed.name + ' /">'
                   +      '<label for="' + id + '" class="mwe-upwiz-deed-name">'
-                  +        gM( 'mwe-upwiz-source-' + deed.name, 
_this.uploads.length )
+                  +        mw.msg( 'mwe-upwiz-source-' + deed.name, 
_this.uploads.length )
                   +      '</label>'
                   +    '</span>'
                   +  '</div>'
@@ -448,7 +448,7 @@
                        _this.hideError();
                } else {
                        if ( _this.deed === mw.UploadWizardNullDeed ) {
-                               _this.showError( gM( 
'mwe-upwiz-deeds-need-deed', _this.uploads.length ) );
+                               _this.showError( mw.msg( 
'mwe-upwiz-deeds-need-deed', _this.uploads.length ) );
                                $j( _this ).bind( 'chooseDeed', function() {
                                        _this.hideError();
                                } );
diff --git a/resources/mw.UploadWizardDescription.js 
b/resources/mw.UploadWizardDescription.js
index 82a4a11..1b6ef4b 100644
--- a/resources/mw.UploadWizardDescription.js
+++ b/resources/mw.UploadWizardDescription.js
@@ -20,7 +20,7 @@
                fieldnameDiv.requiredFieldLabel();
        }
 
-       fieldnameDiv.append( gM( 'mwe-upwiz-desc' ) ).addHint( 'description' );
+       fieldnameDiv.append( mw.msg( 'mwe-upwiz-desc' ) ).addHint( 
'description' );
 
        // Logic copied from MediaWiki:UploadForm.js
        // Per request from Portuguese and Brazilian users, treat Brazilian 
Portuguese as Portuguese.
@@ -35,7 +35,7 @@
        $j(_this.languageMenu).addClass( 'mwe-upwiz-desc-lang-select' );
 
        _this.input = $j( '<textarea name="' + _this.id  + '" rows="2" 
cols="36" class="mwe-upwiz-desc-lang-text"></textarea>' )
-                               .attr( 'title', gM( 
'mwe-upwiz-tooltip-description' ) )
+                               .attr( 'title', mw.msg( 
'mwe-upwiz-tooltip-description' ) )
                                .growTextArea();
 
        if ( initialValue !== undefined ) {
@@ -100,9 +100,9 @@
                        maxlength: mw.UploadWizard.config[  
'maxDescriptionLength'  ],
                        required: required,
                        messages: {
-                               required: gM( 'mwe-upwiz-error-blank' ),
-                               minlength: gM( 'mwe-upwiz-error-too-short', 
mw.UploadWizard.config[  'minDescriptionLength'  ] ),
-                               maxlength: gM( 'mwe-upwiz-error-too-long', 
mw.UploadWizard.config[  'maxDescriptionLength'  ] )
+                               required: mw.msg( 'mwe-upwiz-error-blank' ),
+                               minlength: mw.msg( 'mwe-upwiz-error-too-short', 
mw.UploadWizard.config[  'minDescriptionLength'  ] ),
+                               maxlength: mw.msg( 'mwe-upwiz-error-too-long', 
mw.UploadWizard.config[  'maxDescriptionLength'  ] )
                        }
                } );
        }
diff --git a/resources/mw.UploadWizardDetails.js 
b/resources/mw.UploadWizardDetails.js
index 65956f4..e93b02a 100644
--- a/resources/mw.UploadWizardDetails.js
+++ b/resources/mw.UploadWizardDetails.js
@@ -34,7 +34,7 @@
        _this.descriptionsDiv = $j( '<div 
class="mwe-upwiz-details-descriptions"></div>' );
 
        _this.descriptionAdder = $j( '<a class="mwe-upwiz-more-options"/>' )
-                                       .html( gM( 'mwe-upwiz-desc-add-0' ) )
+                                       .html( mw.msg( 'mwe-upwiz-desc-add-0' ) 
)
                                        .click( function( ) { 
_this.addDescription(); } );
 
        var descriptionAdderDiv =
@@ -92,7 +92,7 @@
        _this.copyrightInfoFieldset = $j('<fieldset class="mwe-fieldset 
mwe-upwiz-copyright-info"></fieldset>')
                .hide()
                .append(
-                       $j( '<legend class="mwe-legend">' ).append( gM( 
'mwe-upwiz-copyright-info' ) ),
+                       $j( '<legend class="mwe-legend">' ).append( mw.msg( 
'mwe-upwiz-copyright-info' ) ),
                        _this.deedDiv
                );
 
@@ -105,7 +105,7 @@
        var categoriesHinter = function() { return categoriesHint; };
        $categoriesDiv
                .find( '.mwe-upwiz-details-fieldname' )
-               .append( gM( 'mwe-upwiz-categories' ) )
+               .append( mw.msg( 'mwe-upwiz-categories' ) )
                .addHint( 'mwe-upwiz-categories-hint', categoriesHinter );
        var categoriesId = 'categories' + _this.upload.index;
        $categoriesDiv.find( '.mwe-upwiz-details-input' )
@@ -127,7 +127,7 @@
        var dateInputDiv = $j( '<div class="mwe-upwiz-details-fieldname-input 
ui-helper-clearfix"></div>' )
                .append(
                        dateErrorDiv,
-                       $j( '<div class="mwe-upwiz-details-fieldname"></div>' 
).append( gM( 'mwe-upwiz-date-created' ) ).requiredFieldLabel().addHint( 'date' 
),
+                       $j( '<div class="mwe-upwiz-details-fieldname"></div>' 
).append( mw.msg( 'mwe-upwiz-date-created' ) ).requiredFieldLabel().addHint( 
'date' ),
                        $j( '<div class="mwe-upwiz-details-input"></div>' 
).append( _this.dateInput ) );
 
        var moreDetailsCtrlDiv = $j( '<div 
class="mwe-upwiz-details-more-options"></div>' );
@@ -139,7 +139,7 @@
                .growTextArea();
 
        var otherInformationDiv = $j('<div></div>')
-               .append( $j( '<div class="mwe-upwiz-details-more-label"></div>' 
).append( gM( 'mwe-upwiz-other' ) ).addHint( 'other' ) )
+               .append( $j( '<div class="mwe-upwiz-details-more-label"></div>' 
).append( mw.msg( 'mwe-upwiz-other' ) ).addHint( 'other' ) )
                .append( _this.otherInformationInput );
 
        /* Altitude is not yet supported by any of the geo tools deployed on 
WMF sites */
@@ -156,18 +156,18 @@
        //_this.altInput.val( mw.UploadWizard.config.defaultAlt );
 
        var latDiv = $j( '<div class="mwe-location-lat"></div>' )
-               .append( $j ( '<div class="mwe-location-lat-label"></div>' 
).append( gM( 'mwe-upwiz-location-lat' )  ) )
+               .append( $j ( '<div class="mwe-location-lat-label"></div>' 
).append( mw.msg( 'mwe-upwiz-location-lat' )  ) )
                .append( _this.latInput );
        var lonDiv = $j( '<div class="mwe-location-lon"></div>' )
-               .append( $j ( '<div class="mwe-location-lon-label"></div>' 
).append( gM( 'mwe-upwiz-location-lon' )  ) )
+               .append( $j ( '<div class="mwe-location-lon-label"></div>' 
).append( mw.msg( 'mwe-upwiz-location-lon' )  ) )
                .append( _this.lonInput );
        //var altDiv = $j( '<div class="mwe-location-alt"></div>' )
-       //      .append( $j ( '<div class="mwe-location-alt-label"></div>' 
).append( gM( 'mwe-upwiz-location-alt' )  ) )
+       //      .append( $j ( '<div class="mwe-location-alt-label"></div>' 
).append( mw.msg( 'mwe-upwiz-location-alt' )  ) )
        //      .append( _this.altInput );
 
        var locationDiv = $j( '<div class="mwe-location 
mwe-upwiz-details-fieldname-input ui-helper-clearfix"></div>' )
                .append( $j ('<div class="mwe-location-label"></div>' )
-               .append( gM( 'mwe-upwiz-location' ) )
+               .append( mw.msg( 'mwe-upwiz-location' ) )
                .addHint( 'location' ) )
                .append(
                        $j( '<div class="mwe-upwiz-details-input-error"><label 
class="mwe-validator-error" for="' + latId + '" generated="true"/></div>' ),
@@ -270,8 +270,8 @@
                required: true,
                /* dateISO: true, */
                messages: {
-                       required: gM( 'mwe-upwiz-error-blank' )
-                       /* dateISO: gM( 'mwe-upwiz-error-date' ) */
+                       required: mw.msg( 'mwe-upwiz-error-blank' )
+                       /* dateISO: mw.msg( 'mwe-upwiz-error-date' ) */
                }
        } );
 
@@ -302,7 +302,7 @@
                _this.idFieldInput.rules( "add", {
                        required: true,
                        messages: {
-                               required: gM( 'mwe-upwiz-error-blank' )
+                               required: mw.msg( 'mwe-upwiz-error-blank' )
                        }
                } );
        }
@@ -311,8 +311,8 @@
                min: -90,
                max: 90,
                messages: {
-                       min: gM( 'mwe-upwiz-error-latitude' ),
-                       max: gM( 'mwe-upwiz-error-latitude' )
+                       min: mw.msg( 'mwe-upwiz-error-latitude' ),
+                       max: mw.msg( 'mwe-upwiz-error-latitude' )
                }
        } );
 
@@ -320,8 +320,8 @@
                min: -180,
                max: 180,
                messages: {
-                       min: gM( 'mwe-upwiz-error-longitude' ),
-                       max: gM( 'mwe-upwiz-error-longitude' )
+                       min: mw.msg( 'mwe-upwiz-error-longitude' ),
+                       max: mw.msg( 'mwe-upwiz-error-longitude' )
                }
        } );
 
@@ -331,7 +331,7 @@
        _this.altInput.rules( "add", {
                number: true,
                messages: {
-                       number: gM( 'mwe-upwiz-error-altitude' )
+                       number: mw.msg( 'mwe-upwiz-error-altitude' )
                }
        } );
        */
@@ -355,7 +355,7 @@
                        .rules( "add", {
                                required: true,
                                messages: {
-                                       required: gM( 'mwe-upwiz-error-blank' )
+                                       required: mw.msg( 
'mwe-upwiz-error-blank' )
                                }
                        } );
        } else {
@@ -368,11 +368,11 @@
                                titleThumbnail: true,
                                titleExtension: true,
                                messages: {
-                                       required: gM( 'mwe-upwiz-error-blank' ),
-                                       titleBadchars: gM( 
'mwe-upwiz-error-title-badchars' ),
-                                       titleSenselessimagename: gM( 
'mwe-upwiz-error-title-senselessimagename' ),
-                                       titleThumbnail: gM( 
'mwe-upwiz-error-title-thumbnail' ),
-                                       titleExtension: gM( 
'mwe-upwiz-error-title-extension' )
+                                       required: mw.msg( 
'mwe-upwiz-error-blank' ),
+                                       titleBadchars: mw.msg( 
'mwe-upwiz-error-title-badchars' ),
+                                       titleSenselessimagename: mw.msg( 
'mwe-upwiz-error-title-senselessimagename' ),
+                                       titleThumbnail: mw.msg( 
'mwe-upwiz-error-title-thumbnail' ),
+                                       titleExtension: mw.msg( 
'mwe-upwiz-error-title-extension' )
                                }
                        } );
        }
@@ -392,10 +392,10 @@
        _this.$catinput.mwCoolCats( {
                api: _this.upload.api,
                hiddenCats: hiddenCats,
-               buttontext: gM( 'mwe-upwiz-categories-add' ),
+               buttontext: mw.msg( 'mwe-upwiz-categories-add' ),
                cats: mw.UploadWizard.config.defaultCategories === undefined ? 
[] : mw.UploadWizard.config.defaultCategories,
                missingCatsWikiText: missingCatsWikiText,
-               willbeaddedtext: gM( 'mwe-upwiz-category-will-be-added' ),
+               willbeaddedtext: mw.msg( 'mwe-upwiz-category-will-be-added' ),
                onnewcat: function () {
                        _this.updateCopyMsgs();
                }
@@ -561,9 +561,9 @@
                        var cb = 'mwe-upwiz-copy-' + v;
                        var copyMetadataMsg;
                        if ( v === 'description' || v === 'categories' ) {
-                               copyMetadataMsg = gM( cb, 1 );
+                               copyMetadataMsg = mw.msg( cb, 1 );
                        } else {
-                               copyMetadataMsg = gM( cb );
+                               copyMetadataMsg = mw.msg( cb );
                        }
                        copyMetadataDiv.append( $j( '<input type="checkbox" 
name="' + cb + '" id="' + cb + '" checked />' ) );
                        copyMetadataDiv.append( $j( '<label for="' + cb + '">' 
+ copyMetadataMsg + '</label>' ) );
@@ -623,10 +623,10 @@
                for ( var mx in msgs ) {
                        var msg = msgs[mx];
                        var $lbl = $( 'label[for="' + msg.title + '"]' );
-                       $lbl.text( gM( msg.title, msg.counter() ) );
+                       $lbl.text( mw.msg( msg.title, msg.counter() ) );
                }
                $lbl = $( '.mwe-upwiz-details-copy-metadata a', _this.$form );
-               $lbl.text( gM( 'mwe-upwiz-copy-metadata', 
_this.upload.wizard.uploads.length - 1 ) );
+               $lbl.text( mw.msg( 'mwe-upwiz-copy-metadata', 
_this.upload.wizard.uploads.length - 1 ) );
        },
 
        /**
@@ -756,14 +756,14 @@
                if ( ! result.unique.isUnique ) {
                        // result is NOT unique
                        if ( result.href ) {
-                               errHtml = gM( 
'mwe-upwiz-fileexists-replace-on-page', titleString, $j( '<a />' ).attr( { 
href: result.href, target: '_blank' } ) );
+                               errHtml = mw.message( 
'mwe-upwiz-fileexists-replace-on-page', titleString, $j( '<a />' ).attr( { 
href: result.href, target: '_blank' } ) ).parse();
                        } else {
-                               errHtml = gM( 
'mwe-upwiz-fileexists-replace-no-link', titleString );
+                               errHtml = mw.msg( 
'mwe-upwiz-fileexists-replace-no-link', titleString );
                        }
 
                        $errorEl.html( errHtml ).show();
                } else {
-                       errHtml = gM( 'mwe-upwiz-blacklisted', titleString );
+                       errHtml = mw.msg( 'mwe-upwiz-blacklisted', titleString 
);
 
                        $errorEl.html( errHtml );
 
@@ -790,8 +790,8 @@
                                        
'mwe-upwiz-feedback-blacklist-report-prompt',
                                        function() {
                                                feedback.launch( {
-                                                       message: gM( 
'mwe-upwiz-feedback-blacklist-line-intro', result.blacklist.blacklistLine ),
-                                                       subject: gM( 
'mwe-upwiz-feedback-blacklist-subject', titleString )
+                                                       message: mw.msg( 
'mwe-upwiz-feedback-blacklist-line-intro', result.blacklist.blacklistLine ),
+                                                       subject: mw.msg( 
'mwe-upwiz-feedback-blacklist-subject', titleString )
                                                } );
                                                return false;
                                        }
@@ -810,7 +810,7 @@
        recountDescriptions: function() {
                var _this = this;
                // if there is some maximum number of descriptions, deal with 
that here
-               $j( _this.descriptionAdder ).html( gM( 'mwe-upwiz-desc-add-' + 
( _this.descriptions.length === 0 ? '0' : 'n' )  )  );
+               $j( _this.descriptionAdder ).html( mw.msg( 
'mwe-upwiz-desc-add-' + ( _this.descriptions.length === 0 ? '0' : 'n' )  )  );
        },
 
 
@@ -878,7 +878,7 @@
                var _this = this;
                var args = Array.prototype.slice.call( arguments  ); // copies 
arguments into a real array
                var msg = 'mwe-upwiz-upload-error-' + args[0];
-               $j( _this.errorDiv ).append( $j( '<p 
class="mwe-upwiz-upload-error">' + gM( msg, args.slice( 1 ) ) + '</p>' ) );
+               $j( _this.errorDiv ).append( $j( '<p 
class="mwe-upwiz-upload-error">' + mw.msg( msg, args.slice( 1 ) ) + '</p>' ) );
                // apply a error style to entire did
                $j( _this.div ).addClass( 'mwe-upwiz-upload-error' );
                $j( _this.dataDiv ).hide();
@@ -1244,7 +1244,7 @@
                $('form', _this.containerDiv).submit();
 
                _this.upload.state = 'submitting-details';
-               _this.setStatus( gM( 'mwe-upwiz-submitting-details' ) );
+               _this.setStatus( mw.msg( 'mwe-upwiz-submitting-details' ) );
                _this.showIndicator( 'progress' );
 
                var firstPoll = ( new Date() ).getTime();
@@ -1305,21 +1305,21 @@
                                _this.upload.detailsProgress = 1.0;
                                _this.upload.state = 'complete';
                                _this.showIndicator( 'uploaded' );
-                               _this.setStatus( gM( 'mwe-upwiz-published' ) );
+                               _this.setStatus( mw.msg( 'mwe-upwiz-published' 
) );
                        } else if ( wasDeleted === true ) {
                                params.ignorewarnings = 1;
                                _this.upload.api.postWithEditToken( params, ok, 
err );
                        } else if ( result && result.upload.warnings ) {
                                if ( warnings['thumb'] ) {
-                                       _this.recoverFromError( _this.titleId, 
gM( 'mwe-upwiz-error-title-thumbnail' ) );
+                                       _this.recoverFromError( _this.titleId, 
mw.msg( 'mwe-upwiz-error-title-thumbnail' ) );
                                } else if ( warnings['badfilename'] ) {
-                                       _this.recoverFromError( _this.titleId, 
gM( 'mwe-upwiz-error-title-badchars' ) );
+                                       _this.recoverFromError( _this.titleId, 
mw.msg( 'mwe-upwiz-error-title-badchars' ) );
                                } else if ( warnings['bad-prefix'] ) {
-                                       _this.recoverFromError( _this.titleId, 
gM( 'mwe-upwiz-error-title-senselessimagename' ) );
+                                       _this.recoverFromError( _this.titleId, 
mw.msg( 'mwe-upwiz-error-title-senselessimagename' ) );
                                } else if ( warnings['exists'] || 
warnings['exists-normalized'] ) {
-                                       _this.recoverFromError( _this.titleId, 
gM( 'mwe-upwiz-api-warning-exists', _this.upload.title.getUrl() ) );
+                                       _this.recoverFromError( _this.titleId, 
mw.msg( 'mwe-upwiz-api-warning-exists', _this.upload.title.getUrl() ) );
                                } else if ( warnings['duplicate'] ) {
-                                       _this.recoverFromError( _this.titleId, 
gM( 'mwe-upwiz-upload-error-duplicate' ) );
+                                       _this.recoverFromError( _this.titleId, 
mw.msg( 'mwe-upwiz-upload-error-duplicate' ) );
                                } else if ( warnings['duplicate-archive'] ) {
                                        if ( 
_this.upload.ignoreWarning['duplicate-archive'] ) {
                                                // We already told the 
interface to ignore this warning, so
@@ -1328,7 +1328,7 @@
                                                
_this.upload.api.postWithEditToken( params, ok, err );
                                        } else {
                                                // This should _never_ happen, 
but just in case....
-                                               _this.recoverFromError( 
_this.titleId, gM( 'mwe-upwiz-upload-error-duplicate-archive' ) );
+                                               _this.recoverFromError( 
_this.titleId, mw.msg( 'mwe-upwiz-upload-error-duplicate-archive' ) );
                                        }
                                } else {
                                        var warningsKeys = [];
@@ -1336,7 +1336,7 @@
                                                warningsKeys.push( key );
                                        } );
                                        _this.upload.state = 'error';
-                                       _this.recoverFromError( _this.titleId, 
gM( 'api-error-unknown-warning', warningsKeys.join( ', ' ) ) );
+                                       _this.recoverFromError( _this.titleId, 
mw.msg( 'api-error-unknown-warning', warningsKeys.join( ', ' ) ) );
                                }
                        } else {
                                err( 'details-info-missing', result );
@@ -1381,7 +1381,7 @@
         * @param {Mixed} result from ajax call
         */
        processError: function( code, result ) {
-               var statusLine = gM( 'api-error-unclassified' );
+               var statusLine = mw.msg( 'api-error-unclassified' );
                var titleErrorMap = {
                        'senselessimagename': 'senselessimagename',
                        'fileexists-shared-forbidden': 
'fileexists-shared-forbidden',
@@ -1393,23 +1393,23 @@
                };
                if ( result && result.error && result.error.code ) {
                        if ( titleErrorMap[code] ) {
-                               this.recoverFromError( this.titleId, gM( 
'mwe-upwiz-error-title-' + titleErrorMap[code] ) );
+                               this.recoverFromError( this.titleId, mw.msg( 
'mwe-upwiz-error-title-' + titleErrorMap[code] ) );
                                return;
                        } else {
                                statusKey = 'api-error-' + code;
                                if ( code === 'filetype-banned' && 
result.error.blacklisted ) {
                                        var comma = mw.msg( 'comma-separator' );
                                        code = 'filetype-banned-type';
-                                       statusLine = gM( 
'api-error-filetype-banned-type', [
+                                       statusLine = mw.msg( 
'api-error-filetype-banned-type',
                                                result.error.blacklisted.join( 
comma ),
                                                result.error.allowed.join( 
comma ),
                                                result.error.allowed.length,
                                                result.error.blacklisted.length
-                                       ]);
+                                       );
                                } else if ( result.error.info ) {
-                                       statusLine = gM( statusKey, 
result.error.info );
+                                       statusLine = mw.msg( statusKey, 
result.error.info );
                                } else {
-                                       statusLine = gM( statusKey, '[no error 
info]' );
+                                       statusLine = mw.msg( statusKey, '[no 
error info]' );
                                }
                        }
                }
diff --git a/resources/mw.UploadWizardLicenseInput.js 
b/resources/mw.UploadWizardLicenseInput.js
index e7ca992..a0672d7 100644
--- a/resources/mw.UploadWizardLicenseInput.js
+++ b/resources/mw.UploadWizardLicenseInput.js
@@ -265,7 +265,7 @@
                                } );
 
                var $button = $j( '<span></span>' )
-                               .button( { label: gM( 
'mwe-upwiz-license-custom-preview' ) } )
+                               .button( { label: mw.msg( 
'mwe-upwiz-license-custom-preview' ) } )
                                .css( { 'width': '8em' } )
                                .click( function() { _this.showPreview( 
$textarea.val() ); } );
 
diff --git a/resources/mw.UploadWizardUpload.js 
b/resources/mw.UploadWizardUpload.js
index dd6667e..46c4d3d 100644
--- a/resources/mw.UploadWizardUpload.js
+++ b/resources/mw.UploadWizardUpload.js
@@ -94,7 +94,7 @@
                        $j('#mwe-upwiz-stepdiv-file .mwe-upwiz-buttons').hide();
                        _this.wizard.startProgressBar();
                        _this.wizard.allowCloseWindow = mw.confirmCloseWindow( {
-                               message: function() { return gM( 
'mwe-upwiz-prevent-close', _this.wizard.uploads.length ); },
+                               message: function() { return mw.msg( 
'mwe-upwiz-prevent-close', _this.wizard.uploads.length ); },
                                test: function() { return 
!_this.wizard.isComplete() && _this.wizard.uploads.length > 0; }
                        } );
                }
@@ -230,7 +230,7 @@
                                                _this.setError( warnCode, 
_this.duplicateErrorInfo( warnCode, result.upload.warnings[warnCode] ) );
                                                var $override = $( '<a></a>' )
                                                        .attr( 'href', 
'javascript:' )
-                                                       .text( gM( 
'mwe-upwiz-override' ) )
+                                                       .text( mw.msg( 
'mwe-upwiz-override' ) )
                                                        .click( ( function ( 
theCode ) {
                                                                
this.removeErrors( theCode );
                                                        } ).bind( this, 
warnCode ) );
@@ -244,7 +244,7 @@
                                                code = 'unknown-warning';
                                                if ( typeof 
result.upload.warnings[warnCode] === 'string' ) {
                                                        // tack the original 
error code onto the warning info
-                                                       info = warnCode + gM( 
'colon-separator' ) + result.upload.warnings[warnCode];
+                                                       info = warnCode + 
mw.msg( 'colon-separator' ) + result.upload.warnings[warnCode];
                                                } else {
                                                        info = 
result.upload.warnings[warnCode];
                                                }
@@ -301,7 +301,7 @@
                                        width : 500,
                                        zIndex : 200000,
                                        autoOpen : true,
-                                       title : gM( 'api-error-' + code + 
'-popup-title', duplicates.length ),
+                                       title : mw.msg( 'api-error-' + code + 
'-popup-title', duplicates.length ),
                                        modal : true
                                } );
                        e.preventDefault();
@@ -555,7 +555,7 @@
        showMaxSizeWarning: function( size, maxSize ) {
                var buttons = [
                        {
-                               text: gM( 'mwe-upwiz-file-too-large-ok' ),
+                               text: mw.msg( 'mwe-upwiz-file-too-large-ok' ),
                                click: function() {
                                        $( this ).dialog( "close" );
                                }
@@ -571,7 +571,7 @@
                                width: 500,
                                zIndex: 200000,
                                autoOpen: true,
-                               title: gM( 'mwe-upwiz-file-too-large' ),
+                               title: mw.msg( 'mwe-upwiz-file-too-large' ),
                                modal: true,
                                buttons: buttons
                        } );
@@ -585,7 +585,7 @@
        showTooManyFilesWarning: function( filesIgnored ) {
                var buttons = [
                        {
-                               text: gM( 'mwe-upwiz-too-many-files-ok' ),
+                               text: mw.msg( 'mwe-upwiz-too-many-files-ok' ),
                                click: function() {
                                        $( this ).dialog( "close" );
                                }
@@ -602,7 +602,7 @@
                                width: 500,
                                zIndex: 200000,
                                autoOpen: true,
-                               title: gM( 'mwe-upwiz-too-many-files' ),
+                               title: mw.msg( 'mwe-upwiz-too-many-files' ),
                                modal: true,
                                buttons: buttons
                        } );
@@ -1158,7 +1158,7 @@
                                                'minWidth': 
mw.UploadWizard.config[ 'largeThumbnailWidth' ],
                                                'minHeight': 
mw.UploadWizard.config[ 'largeThumbnailMaxHeight' ],
                                                'autoOpen': true,
-                                               'title': gM( 
'mwe-upwiz-image-preview' ),
+                                               'title': mw.msg( 
'mwe-upwiz-image-preview' ),
                                                'modal': true,
                                                'resizable': false
                                        } );
diff --git a/resources/mw.UploadWizardUploadInterface.js 
b/resources/mw.UploadWizardUploadInterface.js
index 1491cee..0d32cd1 100644
--- a/resources/mw.UploadWizardUploadInterface.js
+++ b/resources/mw.UploadWizardUploadInterface.js
@@ -461,7 +461,7 @@
        },
 
        showUnparseableFilenameError: function( filename ) {
-               this.showFilenameError( gM( 'mwe-upwiz-unparseable-filename', 
filename ) );
+               this.showFilenameError( mw.msg( 
'mwe-upwiz-unparseable-filename', filename ) );
        },
 
        showBadExtensionError: function( filename, extension ) {
@@ -652,7 +652,7 @@
                var _this = this;
                var args = Array.prototype.slice.call( arguments ); // copies 
arguments into a real array
                var msg = 'mwe-upwiz-upload-error-' + args[0];
-               $j( _this.errorDiv ).append( $j( '<p 
class="mwe-upwiz-upload-error">' + gM( msg, args.slice( 1 ) ) + '</p>') );
+               $j( _this.errorDiv ).append( $j( '<p 
class="mwe-upwiz-upload-error">' + mw.msg( msg, args.slice( 1 ) ) + '</p>') );
                // apply a error style to entire did
                $j( _this.div ).addClass( 'mwe-upwiz-upload-error' );
                $j( _this.errorDiv ).show();
diff --git a/resources/mw.UploadWizardUtil.js b/resources/mw.UploadWizardUtil.js
index aba4890..f51b1df 100644
--- a/resources/mw.UploadWizardUtil.js
+++ b/resources/mw.UploadWizardUtil.js
@@ -15,9 +15,9 @@
        makeToggler: function ( toggleDiv, moreDiv, msg ) {
                var actualMsg;
                if ( typeof msg === 'object' ) {
-                       actualMsg = gM.apply( this, msg );
+                       actualMsg = mw.msg.apply( this, msg );
                } else {
-                       actualMsg = gM( msg );
+                       actualMsg = mw.msg( msg );
                }
                var $toggleLink = $j( '<a>' )
                        .addClass( 'mwe-upwiz-toggler mwe-upwiz-more-options' )
diff --git a/resources/mw.units.js b/resources/mw.units.js
index d114762..b5b2cfe 100644
--- a/resources/mw.units.js
+++ b/resources/mw.units.js
@@ -19,7 +19,7 @@
                                size /= 1024.0;
                                i++;
                        }
-                       return gM( scaleMsgKeys[i], size.toFixed( i > 1 ? 2 : 0 
) );
+                       return mw.msg( scaleMsgKeys[i], size.toFixed( i > 1 ? 2 
: 0 ) );
                }
        };
 
diff --git a/test/jasmine/spec/mediawiki.parser2.spec.js 
b/test/jasmine/spec/mediawiki.parser2.spec.js
index ce023ad..e9771fe 100644
--- a/test/jasmine/spec/mediawiki.parser2.spec.js
+++ b/test/jasmine/spec/mediawiki.parser2.spec.js
@@ -489,11 +489,10 @@
 
        describe( "easy message interface functions", function() {
                it( "should allow a global that returns strings", function() {
-                       var gM = mediaWiki.language.parser.getMessageFunction();
                        // passing this through jQuery and back to string, 
because browsers may have subtle differences, like the case of tag names.
                        // a surrounding <SPAN> is needed for html() to work 
right
                        var expectedHtml = $j( '<span>Complex <a 
href="http://example.com/foo";>linking</a> behaviour.</span>' ).html();
-                       var result = gM( 'en_link_replace', 
'http://example.com/foo', 'linking' );
+                       var result = mw.msg( 'en_link_replace', 
'http://example.com/foo', 'linking' );
                        expect( typeof result ).toEqual( 'string' );
                        expect( result ).toEqual( expectedHtml );
                } );

-- 
To view, visit https://gerrit.wikimedia.org/r/48635
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I4cb085345f8d489b6fdb97e5ad96b2f5b44de0c9
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/UploadWizard
Gerrit-Branch: master
Gerrit-Owner: J <[email protected]>
Gerrit-Reviewer: J <[email protected]>
Gerrit-Reviewer: MarkTraceur <[email protected]>
Gerrit-Reviewer: Mdale <[email protected]>
Gerrit-Reviewer: Nischayn22 <[email protected]>
Gerrit-Reviewer: Siebrand <[email protected]>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to