https://bugzilla.wikimedia.org/show_bug.cgi?id=56038

       Web browser: ---
            Bug ID: 56038
           Summary: [Regression] Tablesorter broken for abbreviated months
           Product: MediaWiki
           Version: unspecified
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: Unprioritized
         Component: JavaScript
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected],
                    [email protected]
    Classification: Unclassified
   Mobile Platform: ---

The script for sortable tables is broken if a date contains an abbreviated
month, see the example (tested on de.wikipedia)

{|class="wikitable sortable"
! data-sort-type="date" | date1 !! data-sort-type="date" | date2
|-
| 1. Jan.2012 || 1. Jan. 2012
|-
| 1. Apr.2011 || 1. Apr. 2011
|}

The first column sorts randomly, only the second one is correct. I tracked this
down to

> jQuery.tablesorter.dateRegex[1]
<
/^\s*(\d{1,2})[\,\.\-\/'\s]+(januar|januars|jan\.|februar|februars|feb\.|märz|märzes|mär\.|april|aprils|apr\.|mai|mais|mai|juni|junis|jun\.|juli|julis|jul\.|august|augusts|aug\.|september|septembers|sep\.|oktober|oktobers|okt\.|november|novembers|nov\.|dezember|dezembers|dez\.)[\,\.\-\/'\s]+(\d{2,4})\s*$/i

Note the \. after the abbreviations, which shouldn't be there (otherwise the
expected separator to the year is missing).

https://git.wikimedia.org/blob/mediawiki%2Fcore.git/5bf45af50e6049ded2915f360fb1ed914f839286/resources%2Fjquery%2Fjquery.tablesorter.js#L484

is supposed to remove it, but it does so for the wrong month forms, namely for
the genitives instead of the abbrevs.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to