mediawiki.ForeignStructuredUpload: Always use '|1=' for description templates
authorSteinsplitter <steinsplitter@wikipedia.de>
Sun, 6 Dec 2015 07:21:13 +0000 (07:21 +0000)
committerBartosz Dziewoński <matma.rex@gmail.com>
Sun, 6 Dec 2015 13:20:55 +0000 (13:20 +0000)
'|1=' should be always used, following the standard on Commons.

Follow-up to 56af60ab91e0b74af9e416b11fa487e15097f5bc.

Bug: T119691
Change-Id: Ied787ecb91aaae3f643c9d013b8982ddabea8142

resources/src/mediawiki/mediawiki.ForeignStructuredUpload.js

index 5e79039..0117cea 100644 (file)
         * @return {string}
         */
        ForeignStructuredUpload.prototype.getDescriptions = function () {
-               var i, desc, hasEquals, templateCalls = [];
+               var i, desc, templateCalls = [];
 
                for ( i = 0; i < this.descriptions.length; i++ ) {
                        desc = this.descriptions[ i ];
-                       hasEquals = desc.text.indexOf( '=' ) !== -1;
-                       templateCalls.push( '{{' + desc.language + ( hasEquals ? '|1=' : '|' ) + desc.text + '}}' );
+                       templateCalls.push( '{{' + desc.language + '|1=' + desc.text + '}}' );
                }
 
                return templateCalls.join( '\n' );