Last modified: 2012-08-23 22:19:43 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T41284, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 39284 - jquery.tablesorter RegExp() for currency is false
jquery.tablesorter RegExp() for currency is false
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
JavaScript (Other open bugs)
1.20.x
All All
: Unprioritized major with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-08-12 12:17 UTC by Matthias
Modified: 2012-08-23 22:19 UTC (History)
3 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Matthias 2012-08-12 12:17:11 UTC
Folow line is from  jquery.tablesorter.js  function cacheRegexs() currency: 
Line 465:   new RegExp( /^[£$€?.]/)

The ? and . is not a currency character. Use RegExp( /^[£$€¥¢]/) instead or RegExp( /^[\u00a2\u00a3$\u20ac\u00a4\u00a5]/) for [cents pound dollar euro yen currency].

For enhancement leave the ^ so that RegExp( /[£$€¥¢]/) or RegExp( /[\u00a2\u00a3$\u20ac\u00a4\u00a5]/) find the currency character also at end. In many languages, so in German, is the currency character at end: 10,50 €

In German Wikipedia the bug produces a unsortable column. If the year not set in template {{dts|20|07|}} a sortkey "?-07-2020. Juli" is used and sorting to currency gives in all rows 0 at digit-sortkey - this is unsortable. (see: [[w:de:Vorlage_Diskussion:Dts#Vorlage_ohne_Jahr_nutzlos]] )

here is table to test it:
{| class="wikitable sortable" 
! dts !! key !! 3 !! 4
|- 
|{{dts|19|8|}}
| ?-08-19
| $ 15.00
| 15.00 €
|-
|{{dts|28|07|}}
| ?-07-28
| $ 10
| 10 €
|- 
|{{dts|23|7|}}
| ?-07-23
| $3.50
| 3.50€
|}
Comment 1 Matthias 2012-08-12 12:22:06 UTC
*** This bug has been confirmed by popular vote. ***
Comment 2 Derk-Jan Hartman 2012-08-23 22:19:43 UTC
https://gerrit.wikimedia.org/r/21285

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links