Jdlrobson has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/53689


Change subject: Rebrand DonateImage as Uploads
......................................................................

Rebrand DonateImage as Uploads

This makes it more consistent with the link label in the
left main menu

Change-Id: Ib2e29c708922221cfcb5aeb71eb4a85dfcde04de
---
M MobileFrontend.alias.php
M MobileFrontend.i18n.php
M MobileFrontend.php
M includes/MobileFrontend.hooks.php
M includes/skins/SkinMobile.php
M includes/skins/UserLoginAndCreateTemplate.php
R includes/specials/SpecialUploads.php
R javascripts/specials/uploads.js
R less/specials/uploads.less
R stylesheets/specials/uploads.css
R tests/js/specials/uploads.js
11 files changed, 17 insertions(+), 26 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend 
refs/changes/89/53689/1

diff --git a/MobileFrontend.alias.php b/MobileFrontend.alias.php
index 08e5088..1818653 100644
--- a/MobileFrontend.alias.php
+++ b/MobileFrontend.alias.php
@@ -12,7 +12,7 @@
 $specialPageAliases['en'] = array(
        'MobileFeedback' => array( 'MobileFeedback' ),
        'MobileOptions' => array( 'MobileOptions' ),
-       'DonateImage' => array( 'DonateImage' ),
+       'Uploads' => array( 'Uploads' ),
        'MobileDiff' => array( 'MobileDiff' ),
        'MobileMenu' => array( 'MobileMenu' ),
        'Nearby' => array( 'Nearby' ),
@@ -28,7 +28,6 @@
 $specialPageAliases['de'] = array(
        'MobileFeedback' => array( 'Mobile_Rückmeldung' ),
        'MobileOptions' => array( 'Mobile_Optionen' ),
-       'DonateImage' => array( 'Bild_spenden' ),
        'MobileDiff' => array( 'Mobiler_Unterschied' ),
        'MobileMenu' => array( 'Mobiles_Menü' ),
        'Nearby' => array( 'In_der_Nähe' ),
@@ -56,7 +55,6 @@
 $specialPageAliases['ko'] = array(
        'MobileFeedback' => array( '모바일피드백' ),
        'MobileOptions' => array( '모바일설정' ),
-       'DonateImage' => array( '그림기부' ),
        'MobileDiff' => array( '모바일차이점' ),
        'MobileMenu' => array( '모바일메뉴' ),
        'Nearby' => array( '근처' ),
@@ -71,7 +69,6 @@
 $specialPageAliases['mk'] = array(
        'MobileFeedback' => array( 'МислењеМобилен' ),
        'MobileOptions' => array( 'МобилниПоставки' ),
-       'DonateImage' => array( 'ПодариСлика' ),
        'MobileDiff' => array( 'МобилнаРазлика' ),
        'MobileMenu' => array( 'МобилноМени' ),
 );
@@ -86,7 +83,6 @@
 $specialPageAliases['nl'] = array(
        'MobileFeedback' => array( 'MobieleTerugkoppeling' ),
        'MobileOptions' => array( 'MobieleVoorkeuren' ),
-       'DonateImage' => array( 'AfbeeldingDoneren' ),
        'MobileDiff' => array( 'MobielVerschillen' ),
        'MobileMenu' => array( 'MobielMenu' ),
        'Nearby' => array( 'InDeBuurt' ),
@@ -94,7 +90,6 @@
 
 /** Polish (polski) */
 $specialPageAliases['pl'] = array(
-       'DonateImage' => array( 'Prześlij_zdjęcie' ),
        'Nearby' => array( 'W_pobliżu' ),
 );
 
@@ -108,7 +103,6 @@
 $specialPageAliases['vi'] = array(
        'MobileFeedback' => array( 'Phản_hồi_di_động' ),
        'MobileOptions' => array( 'Tùy_chọn_di_động' ),
-       'DonateImage' => array( 'Đóng_góp_hình_ảnh', 'Đóng_góp_hình', 
'Đóng_góp_ảnh' ),
        'MobileDiff' => array( 'So_sánh_di_động' ),
        'MobileMenu' => array( 'Trình_đơn_di_động' ),
        'Nearby' => array( 'Kề_bên' ),
@@ -118,7 +112,6 @@
 $specialPageAliases['zh-hans'] = array(
        'MobileFeedback' => array( '移动版反馈' ),
        'MobileOptions' => array( '移动版选项' ),
-       'DonateImage' => array( '捐赠图像' ),
        'MobileDiff' => array( '移动版差异' ),
        'MobileMenu' => array( '移动版菜单' ),
        'Nearby' => array( '附近' ),
@@ -128,7 +121,6 @@
 $specialPageAliases['zh-hant'] = array(
        'MobileFeedback' => array( '手機版意見' ),
        'MobileOptions' => array( '手機版選項' ),
-       'DonateImage' => array( '捐贈圖像' ),
        'MobileDiff' => array( '手機版差異' ),
        'MobileMenu' => array( '手機版選單' ),
        'Nearby' => array( '附近' ),
diff --git a/MobileFrontend.i18n.php b/MobileFrontend.i18n.php
index 0b3be89..f28c307 100644
--- a/MobileFrontend.i18n.php
+++ b/MobileFrontend.i18n.php
@@ -171,12 +171,11 @@
        // image donation
        'mobile-frontend-donate-image-login' => 'You must be logged in to see 
your uploads.',
        'mobile-frontend-photo-upload-generic' => 'Donate an image',
-       'mobile-frontend-donate-image-title' => 'Donate an image',
+       'mobile-frontend-donate-image-title' => 'Uploads',
        'mobile-frontend-donate-image-summary' => 'Photos bring pages on 
{{SITENAME}} to life.
 There are many pages which have no photos due to a severe lack of freely 
licensed photos.
 Help bring these pages to life by donating your images that you are willing to 
give away and could be of use to the wider {{SITENAME}} editing community.',
        'mobile-frontend-donate-image-heading' => 'Your recent contributions',
-       'mobile-frontend-donate-image-page-title' => 'Upload',
        'mobile-frontend-donate-image-anon' => 'A [[Special:UserLogin|user 
account]] is required to view the uploads page',
        'mobile-frontend-listed-image-no-description' => 'No description',
        'mobile-frontend-donate-photo-upload-success' => 'Success! Your image 
can now be used on {{SITENAME}}!',
@@ -508,14 +507,14 @@
        'mobile-frontend-nearby-noresults' => 'Message shown when nothing is 
nearby',
        'mobile-frontend-nearby-refresh' => 'Text of toast notification message 
shown when user moved and the list can be refreshed.',
        'mobile-frontend-nearby-error' => 'Text of generic error message when 
querying geodata api',
-       'mobile-frontend-donate-image-login' => 'Title for 
[[Special:UserLogin]] when being redirected to Special:DonateImage',
-       'mobile-frontend-photo-upload-generic' => 'Label on donate interface on 
Special:DonateImage.
+       'mobile-frontend-donate-image-login' => 'Title for 
[[Special:UserLogin]] when being redirected to Special:Uploads',
+       'mobile-frontend-photo-upload-generic' => 'Label on donate interface on 
Special:Uploads.
 {{Identical|Donate an image}}',
-       'mobile-frontend-donate-image-title' => 'Title for Special:DonateImage.
+       'mobile-frontend-donate-image-title' => 'Title for Special:Uploads.
 {{Identical|Donate an image}}',
        'mobile-frontend-donate-image-summary' => 'Explanation of purpose of 
page and importance of participation.',
        'mobile-frontend-donate-image-heading' => 'heading for a list of recent 
contributions',
-       'mobile-frontend-donate-image-page-title' => 'Heading for the 
Special:DonateImage page.
+       'mobile-frontend-donate-image-page-title' => 'Heading for the 
Special:Uploads page.
 {{Identical|Upload}}',
        'mobile-frontend-donate-image-anon' => 'Message shown to user who 
visits the donate image page without a user account',
        'mobile-frontend-listed-image-no-description' => 'What to show when no 
description available',
diff --git a/MobileFrontend.php b/MobileFrontend.php
index 573a344..c8132e3 100644
--- a/MobileFrontend.php
+++ b/MobileFrontend.php
@@ -50,7 +50,7 @@
 
        'MFResourceLoaderModule' => 'modules/MFResourceLoaderModule',
 
-       'SpecialDonateImage' => 'specials/SpecialDonateImage',
+       'SpecialUploads' => 'specials/SpecialUploads',
        'SpecialMobileDiff' => 'specials/SpecialMobileDiff',
        'SpecialMobileFeedback' => 'specials/SpecialMobileFeedback',
        'SpecialMobileOptions' => 'specials/SpecialMobileOptions',
@@ -99,7 +99,7 @@
 $wgHooks['UserLoginForm'][] = 'MobileFrontendHooks::onUserLoginForm';
 $wgHooks['UserCreateForm'][] = 'MobileFrontendHooks::onUserCreateForm';
 
-$wgSpecialPages['DonateImage'] = 'SpecialDonateImage';
+$wgSpecialPages['Uploads'] = 'SpecialUploads';
 $wgSpecialPages['MobileDiff'] = 'SpecialMobileDiff';
 $wgSpecialPages['MobileFeedback'] = 'SpecialMobileFeedback';
 $wgSpecialPages['MobileOptions'] = 'SpecialMobileOptions';
@@ -490,7 +490,7 @@
                'javascripts/specials/userlogin.js',
        ),
 );
-$wgResourceModules['mobile.donateimage.scripts'] = 
$wgMFMobileSpecialPageResourceScriptBoilerplate + array(
+$wgResourceModules['mobile.uploads.scripts'] = 
$wgMFMobileSpecialPageResourceScriptBoilerplate + array(
        'messages' => array(
                'mobile-frontend-photo-upload-generic',
                'mobile-frontend-donate-photo-upload-success',
@@ -499,12 +499,12 @@
                'mobile-frontend-listed-image-no-description',
        ),
        'scripts' => array(
-               'javascripts/specials/donateimage.js',
+               'javascripts/specials/uploads.js',
        ),
 );
-$wgResourceModules['mobile.donateimage.styles'] = 
$wgMFMobileSpecialPageResourceBoilerplate + array(
+$wgResourceModules['mobile.uploads.styles'] = 
$wgMFMobileSpecialPageResourceBoilerplate + array(
        'styles' => array(
-               'stylesheets/specials/donateimage.css',
+               'stylesheets/specials/uploads.css',
        ),
 );
 $wgResourceModules['mobile.mobilediff.styles'] = 
$wgMFMobileSpecialPageResourceBoilerplate + array(
diff --git a/includes/MobileFrontend.hooks.php 
b/includes/MobileFrontend.hooks.php
index 8eb85ee..cf6647b 100644
--- a/includes/MobileFrontend.hooks.php
+++ b/includes/MobileFrontend.hooks.php
@@ -196,7 +196,7 @@
                                'javascripts/modules/mf-watchstar.js', 
'tests/js/test_mf-watchstar.js',
                                'javascripts/modules/mf-last-modified.js', 
'tests/js/test_mf-last-modified.js',
 
-                               'javascripts/specials/donateimage.js', 
'tests/js/specials/donateimage.js',
+                               'javascripts/specials/uploads.js', 
'tests/js/specials/uploads.js',
                                ),
                                'dependencies' => array( ),
                                'localBasePath' => dirname( dirname( __FILE__ ) 
),
diff --git a/includes/skins/SkinMobile.php b/includes/skins/SkinMobile.php
index 0a43a51..fe5f904 100644
--- a/includes/skins/SkinMobile.php
+++ b/includes/skins/SkinMobile.php
@@ -108,7 +108,7 @@
                $ctx = MobileContext::singleton();
                $returnToTitle = $title->getPrefixedText();
 
-               $donateTitle = SpecialPage::getTitleFor( 'DonateImage' );
+               $donateTitle = SpecialPage::getTitleFor( 'Uploads' );
                if ( $this->getUser()->isLoggedIn() ) {
                        $donateUrl = $donateTitle->getLocalUrl();
                } else {
diff --git a/includes/skins/UserLoginAndCreateTemplate.php 
b/includes/skins/UserLoginAndCreateTemplate.php
index a89da4e..dc28077 100644
--- a/includes/skins/UserLoginAndCreateTemplate.php
+++ b/includes/skins/UserLoginAndCreateTemplate.php
@@ -78,7 +78,7 @@
                        $returnto = '';
                }
                $returntoQuery = $req->getVal( 'returntoquery' );
-               if ( $returnto == 'DonateImage' ) {
+               if ( $returnto == 'Uploads' ) {
                        $key = 'mobile-frontend-donate-image-login';
                } elseif ( strstr( $returntoQuery, 'article_action=watch' ) ) {
                        $key = 'mobile-frontend-watch-login';
diff --git a/includes/specials/SpecialDonateImage.php 
b/includes/specials/SpecialUploads.php
similarity index 96%
rename from includes/specials/SpecialDonateImage.php
rename to includes/specials/SpecialUploads.php
index dad873f..a3aca7c 100644
--- a/includes/specials/SpecialDonateImage.php
+++ b/includes/specials/SpecialUploads.php
@@ -1,9 +1,9 @@
 <?php
 
-class SpecialDonateImage extends UnlistedSpecialPage {
+class SpecialUploads extends UnlistedSpecialPage {
 
        public function __construct() {
-               parent::__construct( 'DonateImage' );
+               parent::__construct( 'Uploads' );
        }
 
        public function execute( $par = '' ) {
diff --git a/javascripts/specials/donateimage.js 
b/javascripts/specials/uploads.js
similarity index 100%
rename from javascripts/specials/donateimage.js
rename to javascripts/specials/uploads.js
diff --git a/less/specials/donateimage.less b/less/specials/uploads.less
similarity index 100%
rename from less/specials/donateimage.less
rename to less/specials/uploads.less
diff --git a/stylesheets/specials/donateimage.css 
b/stylesheets/specials/uploads.css
similarity index 100%
rename from stylesheets/specials/donateimage.css
rename to stylesheets/specials/uploads.css
diff --git a/tests/js/specials/donateimage.js b/tests/js/specials/uploads.js
similarity index 100%
rename from tests/js/specials/donateimage.js
rename to tests/js/specials/uploads.js

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib2e29c708922221cfcb5aeb71eb4a85dfcde04de
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson <[email protected]>

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

Reply via email to