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

Change subject: Get captcha text in user language
......................................................................


Get captcha text in user language

Bug: T116910
Change-Id: Ib1f61d5cafa007b2a8dc9b22cc703fcb29d06959
---
M modules/flow/dm/api/mw.flow.dm.APIHandler.js
M modules/styles/errors.less
2 files changed, 6 insertions(+), 6 deletions(-)

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



diff --git a/modules/flow/dm/api/mw.flow.dm.APIHandler.js 
b/modules/flow/dm/api/mw.flow.dm.APIHandler.js
index 1080edb..8fc1567 100644
--- a/modules/flow/dm/api/mw.flow.dm.APIHandler.js
+++ b/modules/flow/dm/api/mw.flow.dm.APIHandler.js
@@ -27,7 +27,8 @@
                this.setCurrentRevision( config.currentRevision );
 
                this.requestParams = $.extend( {
-                       action: 'flow'
+                       action: 'flow',
+                       uselang: mw.config.get( 'wgUserLanguage' )
                }, config.requestParams );
        };
 
@@ -91,7 +92,7 @@
                                gcllimit: 'max'
                        };
 
-               return ( new mw.Api() ).get( params )
+               return ( new mw.Api() ).get( $.extend( {}, this.requestParams, 
params ) )
                        .then( function ( response ) {
                                return OO.getProp( response, 'query', 'pages' );
                        } );
@@ -180,7 +181,7 @@
 
                this.addCaptcha( params, captcha );
 
-               return ( new mw.Api() ).postWithToken( 'edit', params )
+               return ( new mw.Api() ).postWithToken( 'edit', $.extend( {}, 
this.requestParams, params ) )
                        .then( function ( data ) {
                                return data.flow.reply.workflow;
                        } );
@@ -197,7 +198,6 @@
         */
        mw.flow.dm.APIHandler.prototype.saveNewTopic = function ( title, 
content, format, captcha ) {
                var params = {
-                       action: 'flow',
                        submodule: 'new-topic',
                        page: this.page,
                        nttopic: title,
@@ -207,7 +207,7 @@
 
                this.addCaptcha( params, captcha );
 
-               return ( new mw.Api() ).postWithToken( 'edit', params )
+               return ( new mw.Api() ).postWithToken( 'edit', $.extend( {}, 
this.requestParams, params ) )
                        .then( function ( response ) {
                                return OO.getProp( response.flow, 'new-topic', 
'committed', 'topiclist', 'topic-id' );
                        } )
@@ -251,7 +251,6 @@
 
                this.addCaptcha( params, captcha );
 
-               // return ( new mw.Api() ).postWithToken( 'edit', params )
                xhr = this.postEdit( 'edit-header', params )
                        .then( function ( data ) {
                                return OO.getProp( data.flow, 'edit-header', 
'committed', 'header', 'header-revision-id' );
diff --git a/modules/styles/errors.less b/modules/styles/errors.less
index 7419e61..160464c 100644
--- a/modules/styles/errors.less
+++ b/modules/styles/errors.less
@@ -2,6 +2,7 @@
 .flow-errors.errorbox {
        display: block; // overwrites core .errorbox's display: inline-block
        margin: 1em 0 0;
+       direction: ltr;
 
        .mw-warning-with-logexcerpt {
                border: none;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib1f61d5cafa007b2a8dc9b22cc703fcb29d06959
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Mooeypoo <[email protected]>
Gerrit-Reviewer: Catrope <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to