Merge "Send language when making API requests"

This commit is contained in:
jenkins-bot 2014-06-09 20:52:15 +00:00 committed by Gerrit Code Review
commit cda0a0c473

View file

@ -277,7 +277,10 @@ ve.init.mw.Target.static.name = 'mwTarget';
*/
ve.init.mw.Target.static.apiRequest = function ( data, settings ) {
var key, formData;
data = ve.extendObject( { 'format': 'json' }, data );
data = ve.extendObject( {
'format': 'json',
'uselang': mw.config.get( 'wgUserLanguage' )
}, data );
settings = ve.extendObject( {
'url': mw.util.wikiScript( 'api' ),
'dataType': 'json',