BryanDavis has uploaded a new change for review.
https://gerrit.wikimedia.org/r/100517
Change subject: Allow applicants to specify 3 wikis
......................................................................
Allow applicants to specify 3 wikis
Not spending much effort on the UI at this point due to changes expected
to follow to convert input from free form text to select list.
Bug: 58225
Change-Id: Ie268ff9d281c1ebfcd185af701657cd07e3b620a
---
A data/db/migrations/20131209-01-three-projects.mysql
M data/db/schema.mysql
M data/i18n/en.php
M data/templates/apply.html
M src/Wikimania/Scholarship/Forms/Apply.php
M src/Wikimania/Scholarship/Lang.php
6 files changed, 26 insertions(+), 4 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/wikimedia/wikimania-scholarships
refs/changes/17/100517/1
diff --git a/data/db/migrations/20131209-01-three-projects.mysql
b/data/db/migrations/20131209-01-three-projects.mysql
new file mode 100644
index 0000000..7fc7d2c
--- /dev/null
+++ b/data/db/migrations/20131209-01-three-projects.mysql
@@ -0,0 +1,10 @@
+ALTER TABLE scholarships
+ MODIFY COLUMN project VARCHAR(255) DEFAULT NULL;
+
+ALTER TABLE scholarships
+ ADD COLUMN project2 VARCHAR(255) DEFAULT NULL
+ AFTER project;
+
+ALTER TABLE scholarships
+ ADD COLUMN project3 VARCHAR(255) DEFAULT NULL
+ AFTER project2;
diff --git a/data/db/schema.mysql b/data/db/schema.mysql
index f1ccde0..848af64 100644
--- a/data/db/schema.mysql
+++ b/data/db/schema.mysql
@@ -44,7 +44,9 @@
, future TEXT
, englishAbility TEXT
, username VARCHAR(64) DEFAULT NULL
- , project TEXT
+ , project VARCHAR(255) DEFAULT NULL
+ , project2 VARCHAR(255) DEFAULT NULL
+ , project3 VARCHAR(255) DEFAULT NULL
, projectlangs TEXT
, involvement TEXT
, contribution TEXT
diff --git a/data/i18n/en.php b/data/i18n/en.php
index 1adf5a1..8469212 100644
--- a/data/i18n/en.php
+++ b/data/i18n/en.php
@@ -52,6 +52,8 @@
'form-participation' => "Participation in the Wikimedia projects",
'form-username' => "Username on your primary Wikimedia project: ",
'form-primary-project' => "Primary Wikimedia project (Wikipedia,
Wikimedia Commons, etc.): ",
+ 'form-secondary-project' => "Secondary Wikimedia project (Wikipedia,
Wikimedia Commons, etc.): ",
+ 'form-tertiary-project' => "Tertiary Wikimedia project (Wikipedia,
Wikimedia Commons, etc.): ",
'form-lang-version' => "Which language version(s) of the Wikimedia
projects do you use the most? ",
'form-extent-explain' => "In the space below, please explain the extent
and nature of your participation in the Wikimedia projects (Are you a chapter
member? An administrator? A longtime editor? An editor on featured articles? A
frequent contributor of high quality images? Etc.)",
'form-contrib-explain' => "In the space below, please explain the
extent and nature of your participation in other free knowledge, free software,
collaborative and/or educational initiatives other than the Wikimedia
projects.",
diff --git a/data/templates/apply.html b/data/templates/apply.html
index eb73b57..d8deb2d 100644
--- a/data/templates/apply.html
+++ b/data/templates/apply.html
@@ -81,6 +81,8 @@
<ul class="appform">
{{ forms.text( ctx, 'form-username', 'username' ) }}
{{ forms.text( ctx, 'form-primary-project', 'project' ) }}
+ {{ forms.text( ctx, 'form-secondary-project', 'project2' ) }}
+ {{ forms.text( ctx, 'form-tertiary-project', 'project3' ) }}
{{ forms.text( ctx, 'form-lang-version', 'projectlangs' ) }}
{{ forms.textArea( ctx, 'form-extent-explain', 'involvement', {
'required':true } ) }}
{{ forms.textArea( ctx, 'form-contrib-explain', 'contribution', {
'required':true } ) }}
diff --git a/src/Wikimania/Scholarship/Forms/Apply.php
b/src/Wikimania/Scholarship/Forms/Apply.php
index 67ad90b..207772c 100644
--- a/src/Wikimania/Scholarship/Forms/Apply.php
+++ b/src/Wikimania/Scholarship/Forms/Apply.php
@@ -65,6 +65,8 @@
$this->expectString( 'username' );
$this->expectString( 'project' );
+ $this->expectString( 'project2' );
+ $this->expectString( 'project3' );
$this->expectString( 'projectlangs' );
$this->expectString( 'involvement', array( 'required' => true )
);
$this->expectString( 'contribution', array( 'required' => true
) );
@@ -120,8 +122,8 @@
'haspassport', 'nationality', 'airport', 'languages',
'dob', 'sex',
'occupation', 'areaofstudy',
- 'username', 'project', 'projectlangs', 'involvement',
'contribution',
- 'englishAbility',
+ 'username', 'project', 'project2', 'project3',
'projectlangs',
+ 'involvement', 'contribution', 'englishAbility',
'wm05', 'wm06', 'wm07', 'wm08', 'wm09', 'wm10', 'wm11',
'wm12', 'wm13',
'presentation', 'presentationTopic', 'howheard', 'why',
diff --git a/src/Wikimania/Scholarship/Lang.php
b/src/Wikimania/Scholarship/Lang.php
index 5620182..e02054a 100644
--- a/src/Wikimania/Scholarship/Lang.php
+++ b/src/Wikimania/Scholarship/Lang.php
@@ -101,8 +101,12 @@
if ( isset( $this->messages[$this->lang][$key] ) ) {
return $this->messages[$this->lang][$key];
- } else {
+ } elseif ( isset( $this->messages['en'][$key] ) ) {
return $this->messages['en'][$key];
+
+ } else {
+ // FIXME: log missing translation
+ return $key;
}
}
--
To view, visit https://gerrit.wikimedia.org/r/100517
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie268ff9d281c1ebfcd185af701657cd07e3b620a
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/wikimania-scholarships
Gerrit-Branch: master
Gerrit-Owner: BryanDavis <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits