r109087 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r109086‎ | r109087 | r109088 >
Date:00:21, 17 January 2012
Author:jeroendedauw
Status:reverted
Tags:
Comment:
attempt to fix compat issue
Modified paths:
  • /trunk/extensions/EducationProgram/resources/ep.api.js (modified) (history)

Diff [purge]

Index: trunk/extensions/EducationProgram/resources/ep.api.js
@@ -6,6 +6,22 @@
77 * @author Jeroen De Dauw <jeroendedauw at gmail dot com>
88 */
99
 10+if ( typeof mw.language.gender === 'undefined' ) {
 11+ mw.language.gender = function( gender, forms ) {
 12+ if ( !forms || forms.length === 0 ) {
 13+ return '';
 14+ }
 15+ forms = mw.language.preConvertPlural( forms, 2 );
 16+ if ( gender === 'male' ) {
 17+ return forms[0];
 18+ }
 19+ if ( gender === 'female' ) {
 20+ return forms[1];
 21+ }
 22+ return ( forms.length === 3 ) ? forms[2] : forms[0];
 23+ };
 24+}
 25+
1026 window.educationProgram = new( function() {
1127
1228 // TODO: move to own file

Status & tagging log