Revert "Pass uselang=user to the API instead of figuring it out client side"

This breaks pages using ?uselang=xx where "xx" is not
the user's language.

This reverts commit 0919b01e75.

Bug: T103935
Change-Id: I219810451b991cef88bac62cf880bfda6f98e930
This commit is contained in:
Legoktm 2015-06-26 00:13:28 +00:00 committed by Kunal Mehta
parent bc2c65bbc6
commit 2257dd2a56
2 changed files with 7 additions and 4 deletions

View file

@ -2,6 +2,8 @@
( function ( $, mw ) {
'use strict';
var useLang = mw.config.get( 'wgUserLanguage' );
function EchoOverlay( apiResultNotifications ) {
this.api = mw.echo.overlay.api;
// set internal properties
@ -82,7 +84,7 @@
if ( this.unread.length ) {
data = {
action: 'echomarkread',
uselang: 'user'
uselang: useLang
};
if ( id ) {
// If id is given mark that as read otherwise use all unread messages
@ -458,7 +460,7 @@
notformat: 'flyout',
notlimit: this.notificationLimit,
notprop: 'index|list|count',
uselang: 'user'
uselang: useLang
};
return this.api.get( apiData ).then( function ( result ) {

View file

@ -1,5 +1,6 @@
( function ( $, mw ) {
'use strict';
var useLang = mw.config.get( 'wgUserLanguage' );
mw.echo.special = {
@ -67,7 +68,7 @@
notprop: 'index|list',
notcontinue: this.notcontinue,
notlimit: mw.config.get( 'wgEchoDisplayNum' ),
uselang: 'user'
uselang: useLang
};
api.get( apiData ).done( function ( result ) {
@ -129,7 +130,7 @@
api.postWithToken( 'edit', {
action: 'echomarkread',
list: unread.join( '|' ),
uselang: 'user'
uselang: useLang
} ).done( function ( result ) {
// update the badge if the link is enabled
if ( result.query.echomarkread.count !== undefined &&