jenkins-bot has submitted this change and it was merged.
Change subject: Pass uselang=user to the API instead of figuring it out client
side
......................................................................
Pass uselang=user to the API instead of figuring it out client side
Change-Id: I09add693567af577c14c646d2b6b943716e0522e
---
M modules/overlay/ext.echo.overlay.js
M modules/special/ext.echo.special.js
2 files changed, 5 insertions(+), 7 deletions(-)
Approvals:
Alex Monk: Looks good to me, approved
jenkins-bot: Verified
diff --git a/modules/overlay/ext.echo.overlay.js
b/modules/overlay/ext.echo.overlay.js
index ecb0a5e..ccdac82 100644
--- a/modules/overlay/ext.echo.overlay.js
+++ b/modules/overlay/ext.echo.overlay.js
@@ -3,8 +3,7 @@
'use strict';
// backwards compatibility <= MW 1.21
- var getUrl = mw.util.getUrl || mw.util.wikiGetlink,
- useLang = mw.config.get( 'wgUserLanguage' );
+ var getUrl = mw.util.getUrl || mw.util.wikiGetlink;
function EchoOverlay( apiResultNotifications ) {
this.api = mw.echo.overlay.api;
@@ -87,7 +86,7 @@
data = {
action: 'echomarkread',
token: mw.user.tokens.get( 'editToken'
),
- uselang: useLang
+ uselang: 'user'
};
if ( id ) {
// If id is given mark that as read
otherwise use all unread messages
@@ -469,7 +468,7 @@
notformat: 'flyout',
notlimit: this.notificationLimit,
notprop: 'index|list|count',
- uselang: useLang
+ uselang: 'user'
};
return this.api.get( apiData ).then( function ( result
) {
diff --git a/modules/special/ext.echo.special.js
b/modules/special/ext.echo.special.js
index 89b8527..1d5726e 100644
--- a/modules/special/ext.echo.special.js
+++ b/modules/special/ext.echo.special.js
@@ -1,6 +1,5 @@
( function ( $, mw ) {
'use strict';
- var useLang = mw.config.get( 'wgUserLanguage' );
mw.echo.special = {
@@ -71,7 +70,7 @@
notprop: 'index|list',
notcontinue: this.notcontinue,
notlimit: mw.config.get(
'wgEchoDisplayNum' ),
- uselang: useLang
+ uselang: 'user'
};
api.get( apiData ).done( function ( result ) {
@@ -138,7 +137,7 @@
action: 'echomarkread',
list: unread.join( '|' ),
token: mw.user.tokens.get( 'editToken' ),
- uselang: useLang
+ uselang: 'user'
} ).done( function ( result ) {
// update the badge if the link is enabled
if ( result.query.echomarkread.count !==
undefined &&
--
To view, visit https://gerrit.wikimedia.org/r/216598
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I09add693567af577c14c646d2b6b943716e0522e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: Legoktm <[email protected]>
Gerrit-Reviewer: Alex Monk <[email protected]>
Gerrit-Reviewer: Legoktm <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits