Index: trunk/extensions/UploadWizard/UploadWizardTutorial.php |
— | — | @@ -16,9 +16,6 @@ |
17 | 17 | // imagemap coordinates of the "helpdesk" button at the bottom, which is supposed to be clickable. |
18 | 18 | const HELPDESK_BUTTON_COORDS = "27, 1319, 691, 1384"; |
19 | 19 | |
20 | | - // link to help desk within commons tutorial |
21 | | - const HELPDESK_URL = 'http://commons.wikimedia.org/wiki/Help_desk'; |
22 | | - |
23 | 20 | // id of imagemap used in tutorial |
24 | 21 | const IMAGEMAP_ID = 'tutorialMap'; |
25 | 22 | |
— | — | @@ -95,6 +92,17 @@ |
96 | 93 | * @return {String} HTML representing the image, with clickable helpdesk button |
97 | 94 | */ |
98 | 95 | public static function getImageHtml( $thumb ) { |
| 96 | + |
| 97 | + $helpDeskUrl = wfMsg( 'mwe-upwiz-help-desk-url' ); |
| 98 | + |
| 99 | + // Per convention, we may be either using an absolute URL or a wiki page title in this UI message |
| 100 | + if( preg_match( '/^(?:' . wfUrlProtocols() . ')/', $helpDeskUrl )) { |
| 101 | + $helpDeskHref = $helpDeskUrl; |
| 102 | + } else { |
| 103 | + $helpDeskTitle = Title::newFromText( $helpDeskUrl ); |
| 104 | + $helpDeskHref = $helpDeskTitle ? $helpDeskTitle->getLocalURL() : '#'; |
| 105 | + } |
| 106 | + |
99 | 107 | // here we use the not-yet-forgotten HTML imagemap to add a clickable area to the tutorial image. |
100 | 108 | // we could do more special effects with hovers and images and such, not to mention SVG scripting, |
101 | 109 | // but we aren't sure what we want yet... |
— | — | @@ -108,7 +116,7 @@ |
109 | 117 | $area = Html::element( 'area', array( |
110 | 118 | 'shape' => 'rect', |
111 | 119 | 'coords' => self::HELPDESK_BUTTON_COORDS, |
112 | | - 'href' => self::HELPDESK_URL, |
| 120 | + 'href' => $helpDeskHref, |
113 | 121 | 'alt' => $areaAltText, |
114 | 122 | 'title' => $areaAltText |
115 | 123 | ) ); |
Index: trunk/extensions/UploadWizard/UploadWizard.i18n.php |
— | — | @@ -64,6 +64,7 @@ |
65 | 65 | 'mwe-upwiz-tutorial-error-file-missing' => 'Sorry, we could not find any files for the tutorial that is supposed to go here. Please contact the system administrators.', |
66 | 66 | 'mwe-upwiz-tutorial-error-cannot-transform' => 'Sorry, we could not get a scaled image of the tutorial to fit this screen. This may be a temporary problem with Wikimedia Commons; try again later.', |
67 | 67 | 'mwe-upwiz-help-desk' => 'Help Desk', |
| 68 | + 'mwe-upwiz-help-desk-url' => 'Help Desk', |
68 | 69 | 'mwe-upwiz-add-file-n' => 'Add another file', |
69 | 70 | 'mwe-upwiz-add-file-0-free' => 'Select a media file to donate', |
70 | 71 | 'mwe-upwiz-transport-started' => 'Starting...', |