Allow loading redirects in Common languages

Bug: 49847
Change-Id: Ia2380a77ebad789a2f70a7a88a1bb9970199b1c5
This commit is contained in:
Amir E. Aharoni
2013-06-19 17:00:59 -07:00
committed by Niklas Laxström
parent 20033e4fbf
commit b6698228d4
2 changed files with 55 additions and 5 deletions

View File

@@ -63,4 +63,26 @@
prefs.set( prefName, undefined );
prefs.save();
} );
QUnit.test( '-- Common languages', 1, function ( assert ) {
var i, foundTagalog, languagesInPH;
// Bug 49847
foundTagalog = false;
languagesInPH = mw.uls.getFrequentLanguageList( 'PH' );
for ( i = 0; i < languagesInPH.length; i++ ) {
if ( $.uls.data.isRedirect( languagesInPH[i] ) === 'tl' ||
languagesInPH[i] === 'tl'
) {
foundTagalog = true;
break;
}
}
assert.ok(
foundTagalog,
'Tagalog is one of the languages presented to users in the Philippines.'
);
} );
}( jQuery, mediaWiki ) );