Index: trunk/phase3/resources/jquery/jquery.tablesorter.js |
— | — | @@ -405,15 +405,16 @@ |
406 | 406 | |
407 | 407 | function buildTransformTable() { |
408 | 408 | var digits = '0123456789,.'.split(''); |
409 | | - |
410 | | - if ( typeof wgSeparatorTransformTable == 'undefined' || ( wgSeparatorTransformTable[0] == '' && wgDigitTransformTable[2] == '' ) ) { |
| 409 | + var separatorTransformTable = mw.config.get( 'wgSeparatorTransformTable' ); |
| 410 | + var digitTransformTable = mw.config.get( 'wgDigitTransformTable' ); |
| 411 | + if ( separatorTransformTable == null || ( separatorTransformTable[0] == '' && digitTransformTable[2] == '' ) ) { |
411 | 412 | ts.transformTable = false; |
412 | 413 | } else { |
413 | 414 | ts.transformTable = {}; |
414 | 415 | |
415 | 416 | // Unpack the transform table |
416 | | - var ascii = wgSeparatorTransformTable[0].split( "\t" ).concat( wgDigitTransformTable[0].split( "\t" ) ); |
417 | | - var localised = wgSeparatorTransformTable[1].split( "\t" ).concat( wgDigitTransformTable[1].split( "\t" ) ); |
| 417 | + var ascii = separatorTransformTable[0].split( "\t" ).concat( digitTransformTable[0].split( "\t" ) ); |
| 418 | + var localised = separatorTransformTable[1].split( "\t" ).concat( digitTransformTable[1].split( "\t" ) ); |
418 | 419 | |
419 | 420 | // Construct regex for number identification |
420 | 421 | for ( var i = 0; i < ascii.length; i++ ) { |
— | — | @@ -438,9 +439,9 @@ |
439 | 440 | ]; |
440 | 441 | ts.dateRegex = []; |
441 | 442 | |
442 | | - for ( i = 1; i < 13; i++ ) { |
443 | | - ts.monthNames[0][i] = wgMonthNames[i].toLowerCase(); |
444 | | - ts.monthNames[1][i] = wgMonthNamesShort[i].toLowerCase().replace( '.', '' ); |
| 443 | + for ( var i = 1; i < 13; i++ ) { |
| 444 | + ts.monthNames[0][i] = mw.config.get( 'wgMonthNames' )[i].toLowerCase(); |
| 445 | + ts.monthNames[1][i] = mw.config.get( 'wgMonthNamesShort' )[i].toLowerCase().replace( '.', '' ); |
445 | 446 | r += $.escapeRE( ts.monthNames[0][i] ) + '|'; |
446 | 447 | r += $.escapeRE( ts.monthNames[1][i] ) + '|'; |
447 | 448 | } |
— | — | @@ -820,10 +821,10 @@ |
821 | 822 | } |
822 | 823 | } |
823 | 824 | //Resort array depending on preferences |
824 | | - if ( wgDefaultDateFormat == "mdy" ) { |
| 825 | + if ( mw.config.get( 'wgDefaultDateFormat' ) == "mdy" || mw.config.get('wgContentLanguage') == 'en' ) { |
825 | 826 | s.push( s.shift() ); |
826 | 827 | s.push( s.shift() ); |
827 | | - } else if ( wgDefaultDateFormat == "dmy" ) { |
| 828 | + } else if ( mw.config.get( 'wgDefaultDateFormat' ) == "dmy" ) { |
828 | 829 | var d = s.shift(); |
829 | 830 | s.push( s.shift() ); |
830 | 831 | s.push(d); |