From: Bartosz DziewoƄski Date: Tue, 13 Oct 2015 15:36:49 +0000 (+0200) Subject: mw.ForeignUpload: Provide an edit summary to help track these uploads X-Git-Tag: 1.31.0-rc.0~9417^2 X-Git-Url: http://git.cyclocoop.org/data/%24self?a=commitdiff_plain;h=a2a232c0e09d784c5218fb5ac8c0a1cb2997d0ad;p=lhc%2Fweb%2Fwiklou.git mw.ForeignUpload: Provide an edit summary to help track these uploads The summary is "Cross-wiki upload from xx.wikixedia.org". We don't know the content language of the foreign wiki, so it's not translateable. Bug: T115328 Change-Id: I4b36cad20ffe318f9a01126a5b9ed70f5d806b57 --- diff --git a/resources/src/mediawiki/mediawiki.ForeignUpload.js b/resources/src/mediawiki/mediawiki.ForeignUpload.js index 7b3a751c8a..61fb59f609 100644 --- a/resources/src/mediawiki/mediawiki.ForeignUpload.js +++ b/resources/src/mediawiki/mediawiki.ForeignUpload.js @@ -84,6 +84,12 @@ // actual API call methods to wait for the apiPromise to resolve // before continuing. mw.Upload.call( this, null ); + + if ( this.target !== 'local' ) { + // Keep these untranslated. We don't know the content language of the foreign wiki, best to + // stick to English in the text. + this.setComment( 'Cross-wiki upload from ' + location.host ); + } } OO.inheritClass( ForeignUpload, mw.Upload );