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

Change subject: Add link to alternative upload methods in #contentSub
......................................................................


Add link to alternative upload methods in #contentSub

Bug: T104009
Change-Id: I49f3282d5acf119f8bb58ca8bfb6b32a9d4521b6
---
M UploadWizard.config.php
M UploadWizardHooks.php
M i18n/en.json
M i18n/qqq.json
M resources/ui/uw.ui.Wizard.js
5 files changed, 15 insertions(+), 0 deletions(-)

Approvals:
  Bartosz Dziewoński: Looks good to me, approved
  Siebrand: Looks good to me, but someone else must approve
  Steinsplitter: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/UploadWizard.config.php b/UploadWizard.config.php
index 36ae3d7..134b36f 100644
--- a/UploadWizard.config.php
+++ b/UploadWizard.config.php
@@ -641,6 +641,9 @@
        // @codingStandardsIgnoreEnd
        'altUploadForm' => '',
 
+       // Wiki page that lists alternative ways to upload
+       'alternativeUploadToolsPage' => 'Commons:Upload_tools',
+
        // Is titleBlacklist API even available?
        'useTitleBlacklistApi' => array_key_exists( 'titleblacklist', 
$wgAPIModules ),
 
diff --git a/UploadWizardHooks.php b/UploadWizardHooks.php
index a915da9..1f4d472 100644
--- a/UploadWizardHooks.php
+++ b/UploadWizardHooks.php
@@ -417,6 +417,7 @@
                                'mwe-upwiz-unparseable-title',
                                'mwe-upwiz-subhead-bugs',
                                'mwe-upwiz-subhead-alt-upload',
+                               'mwe-upwiz-subhead-alternatives',
                                'mwe-upwiz-feedback-prompt',
                                'mwe-upwiz-feedback-note',
                                'mwe-upwiz-feedback-subject',
diff --git a/i18n/en.json b/i18n/en.json
index 6f7e3a4..64cb775 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -300,6 +300,7 @@
        "mwe-upwiz-unparseable-title": "This title is invalid. Make sure to 
remove characters like square brackets, colons, comparison operators, pipes and 
curly brackets.",
        "mwe-upwiz-subhead-bugs": "[$1 Known issues]",
        "mwe-upwiz-subhead-alt-upload": "Back to the old form",
+       "mwe-upwiz-subhead-alternatives": "Alternative upload methods",
        "mwe-upwiz-feedback-prompt": "Leave feedback",
        "mwe-upwiz-feedback-title": "Leave feedback about Upload Wizard",
        "mwe-upwiz-feedback-blacklist-report-prompt": "[$1 Send Feedback]",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index f51876b..16f496a 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -323,6 +323,7 @@
        "mwe-upwiz-unparseable-title": "Used as error message. More information 
about page titles [[:mw:Manual:Page title|at MediaWiki.org]].",
        "mwe-upwiz-subhead-bugs": "Unused at this time. Parameters:\n* $1 - 
full URL\n{{Identical|Known issue}}",
        "mwe-upwiz-subhead-alt-upload": "Used as a link in the sub-header. Will 
go to an alternate upload form.",
+       "mwe-upwiz-subhead-alternatives": "Used as a link in the sub-header. 
Will go to a page that lists upload tools.",
        "mwe-upwiz-feedback-prompt": "Used as a link in the 
sub-header.\n{{Identical|Leave feedback}}",
        "mwe-upwiz-feedback-title": "Used as title for the dialog box.",
        "mwe-upwiz-feedback-blacklist-report-prompt": "Parameters:\n* $1 - full 
URL\n{{Identical|Send feedback}}",
diff --git a/resources/ui/uw.ui.Wizard.js b/resources/ui/uw.ui.Wizard.js
index a6c4a62..565fee7 100644
--- a/resources/ui/uw.ui.Wizard.js
+++ b/resources/ui/uw.ui.Wizard.js
@@ -58,6 +58,15 @@
                        $( '#contentSub' ).append( this.$feedbackLink );
                }
 
+               if ( config.alternativeUploadToolsPage ) {
+                       this.$alternativeUploads = $( '<a>' )
+                               .addClass( 'contentSubLink' )
+                               .prop( 'href', new mw.Title( 
config.alternativeUploadToolsPage ).getUrl() )
+                               .msg( 'mwe-upwiz-subhead-alternatives' );
+
+                       $( '#contentSub' ).append( this.$alternativeUploads );
+               }
+
                if ( config.altUploadForm ) {
                        this.initAltUploadForm( config.altUploadForm );
                }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I49f3282d5acf119f8bb58ca8bfb6b32a9d4521b6
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/UploadWizard
Gerrit-Branch: master
Gerrit-Owner: Prtksxna <[email protected]>
Gerrit-Reviewer: Bartosz Dziewoński <[email protected]>
Gerrit-Reviewer: Jforrester <[email protected]>
Gerrit-Reviewer: MarkTraceur <[email protected]>
Gerrit-Reviewer: Prtksxna <[email protected]>
Gerrit-Reviewer: Siebrand <[email protected]>
Gerrit-Reviewer: Steinsplitter <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to