https://bugzilla.wikimedia.org/show_bug.cgi?id=39284
Web browser: ---
Bug #: 39284
Summary: jquery.tablesorter RegExp() for currency is false
Product: MediaWiki
Version: 1.20-git
Platform: All
OS/Version: All
Status: UNCONFIRMED
Severity: major
Priority: Unprioritized
Component: JavaScript
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected], [email protected]
Classification: Unclassified
Mobile Platform: ---
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€
|}
--
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- 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