jenkins-bot has submitted this change and it was merged. Change subject: Remove M.message() ......................................................................
Remove M.message() And use mw.msg() everywhere. Change-Id: I94e149d5c3ee81a3f18a6e3743fc3b49d58f6a75 --- M javascripts/common/Drawer.js M javascripts/common/mf-application.js M javascripts/common/mf-notification.js M javascripts/modules/mf-cleanuptemplates.js M javascripts/modules/mf-languages.js M javascripts/modules/mf-tables.js M javascripts/modules/mf-watchstar.js M javascripts/specials/nearby.js 8 files changed, 10 insertions(+), 18 deletions(-) Approvals: Jdlrobson: Verified; Looks good to me, approved jenkins-bot: Verified diff --git a/javascripts/common/Drawer.js b/javascripts/common/Drawer.js index 67ebf89..7ed747e 100644 --- a/javascripts/common/Drawer.js +++ b/javascripts/common/Drawer.js @@ -3,7 +3,7 @@ var View = M.require( 'view' ), Drawer = View.extend( { defaults: { - cancelMessage: M.message( 'mobile-frontend-drawer-cancel' ) + cancelMessage: mw.msg( 'mobile-frontend-drawer-cancel' ) }, className: 'drawer position-fixed', diff --git a/javascripts/common/mf-application.js b/javascripts/common/mf-application.js index d152614..759c37c 100644 --- a/javascripts/common/mf-application.js +++ b/javascripts/common/mf-application.js @@ -59,13 +59,6 @@ } }; - /** - * @deprecated - */ - function message( name, arg1 ) { - return mw.msg( name, arg1 ); - } - // TODO: only apply to places that need it // http://www.quirksmode.org/blog/archives/2010/12/the_fifth_posit.html // https://github.com/Modernizr/Modernizr/issues/167 @@ -211,7 +204,6 @@ isLoggedIn: isLoggedIn, lockViewport: lockViewport, log: log, - message: message, on: on, prefix: 'mw-mf-', supportsGeoLocation: supportsGeoLocation, diff --git a/javascripts/common/mf-notification.js b/javascripts/common/mf-notification.js index 315749f..a487e87 100644 --- a/javascripts/common/mf-notification.js +++ b/javascripts/common/mf-notification.js @@ -38,8 +38,8 @@ } function notifyAuthenticatedUser() { - var msg = mw.message( 'mobile-frontend-logged-in-toast-notification', - mw.config.get( 'wgUserName' ) ).plain(); + var msg = mw.msg( 'mobile-frontend-logged-in-toast-notification', + mw.config.get( 'wgUserName' ) ); if ( window.location.search.indexOf( 'welcome=yes' ) > -1 ) { show( msg, 'toast' ); diff --git a/javascripts/modules/mf-cleanuptemplates.js b/javascripts/modules/mf-cleanuptemplates.js index bab5830..b233caf 100644 --- a/javascripts/modules/mf-cleanuptemplates.js +++ b/javascripts/modules/mf-cleanuptemplates.js @@ -21,13 +21,13 @@ overlay = new CleanupOverlay( { parent: parentOverlay, - heading: M.message( 'mobile-frontend-meta-data-issues-header' ), + heading: mw.msg( 'mobile-frontend-meta-data-issues-header' ), content: $tmp.html() } ); $( '<a class="mw-mf-cleanup">' ).click( function() { overlay.show(); - } ).text( M.message( 'mobile-frontend-meta-data-issues' ) ).insertBefore( $metadata.eq( 0 ) ); + } ).text( mw.msg( 'mobile-frontend-meta-data-issues' ) ).insertBefore( $metadata.eq( 0 ) ); $metadata.remove(); } diff --git a/javascripts/modules/mf-languages.js b/javascripts/modules/mf-languages.js index dd8be24..c3fede2 100644 --- a/javascripts/modules/mf-languages.js +++ b/javascripts/modules/mf-languages.js @@ -65,7 +65,7 @@ function createLanguagePage() { var $container = $( this ).data( 'languages' ), overlay; overlay = new LanguageOverlay( { - placeholder: M.message( 'mobile-frontend-language-site-choose' ), + placeholder: mw.msg( 'mobile-frontend-language-site-choose' ), variantHeader: $container.find( '#mw-mf-language-variant-header' ).html(), variantItems: $container.find( '#mw-mf-language-variant-selection' ).html(), header: $container.find( '#mw-mf-language-header' ).html(), diff --git a/javascripts/modules/mf-tables.js b/javascripts/modules/mf-tables.js index f31b59d..db46aed 100644 --- a/javascripts/modules/mf-tables.js +++ b/javascripts/modules/mf-tables.js @@ -39,7 +39,7 @@ content: $( '<div>').append( $container ).html() } ); overlay.show(); - } ).text( M.message( 'mobile-frontend-table', tableId ) ).appendTo( $tr ); + } ).text( mw.msg( 'mobile-frontend-table', tableId ) ).appendTo( $tr ); // make the vertical expando $tr = $( '<tr class="expandoVertical">' ).appendTo( $tc ); diff --git a/javascripts/modules/mf-watchstar.js b/javascripts/modules/mf-watchstar.js index 538a12c..2f65c7a 100644 --- a/javascripts/modules/mf-watchstar.js +++ b/javascripts/modules/mf-watchstar.js @@ -37,12 +37,12 @@ format: 'json', action: 'watch', title: title, token: token }, - msg = M.message( 'mobile-frontend-watchlist-add', title ), + msg = mw.msg( 'mobile-frontend-watchlist-add', title ), popupClass = 'watch-action toast'; if( unwatchflag ) { data.unwatch = true; - msg = M.message( 'mobile-frontend-watchlist-removed', title ); + msg = mw.msg( 'mobile-frontend-watchlist-removed', title ); } else { popupClass += ' watched'; } diff --git a/javascripts/specials/nearby.js b/javascripts/specials/nearby.js index cc03066..9ddc702 100644 --- a/javascripts/specials/nearby.js +++ b/javascripts/specials/nearby.js @@ -200,7 +200,7 @@ function init() { var $content = $( '#mw-mf-nearby' ).empty(); $( '<div class="content loading"> ').text( - mw.message( 'mobile-frontend-nearby-loading' ) ).appendTo( $content ); + mw.msg( 'mobile-frontend-nearby-loading' ) ).appendTo( $content ); navigator.geolocation.getCurrentPosition( function( geo ) { var lat = geo.coords.latitude, lng = geo.coords.longitude; curLocation = { latitude: lat, longitude: lng }; // save as json so it can be cached bug 48268 -- To view, visit https://gerrit.wikimedia.org/r/67938 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I94e149d5c3ee81a3f18a6e3743fc3b49d58f6a75 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: JGonera <jgon...@wikimedia.org> Gerrit-Reviewer: Jdlrobson <jrob...@wikimedia.org> Gerrit-Reviewer: jenkins-bot _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits