Index: trunk/extensions/ContributionReporting/ContributionReporting.php |
— | — | @@ -38,6 +38,10 @@ |
39 | 39 | $wgSpecialPages['ContributionTotal'] = 'ContributionTotal'; |
40 | 40 | $wgSpecialPages['ContributionStatistics'] = 'SpecialContributionStatistics'; |
41 | 41 | $wgSpecialPages['FundraiserStatistics'] = 'SpecialFundraiserStatistics'; |
| 42 | +$wgSpecialPageGroups['ContributionHistory'] = 'contribution'; |
| 43 | +$wgSpecialPageGroups['ContributionTotal'] = 'contribution'; |
| 44 | +$wgSpecialPageGroups['ContributionStatistics'] = 'contribution'; |
| 45 | +$wgSpecialPageGroups['FundraiserStatistics'] = 'contribution'; |
42 | 46 | |
43 | 47 | // Shortcut to this extension directory |
44 | 48 | $dir = dirname( __FILE__ ) . '/'; |
Index: trunk/extensions/ContributionReporting/ContributionReporting.i18n.php |
— | — | @@ -49,7 +49,12 @@ |
50 | 50 | 'contribstats-max' => 'Maximum (USD)', |
51 | 51 | 'contribstats-percentage-ytd' => 'Percentage (YTD)', |
52 | 52 | 'contribstats-total-ytd' => 'Total (YTD)', |
53 | | - |
| 53 | + 'contribstats-value-exactly' => 'Exactly $1', |
| 54 | + 'contribstats-value-under' => 'Under $1', |
| 55 | + 'contribstats-value-from' => 'From $1 - $2', |
| 56 | + 'contribstats-value-over' => 'Over $1', |
| 57 | + 'contribstats-percentage' => '$1%', |
| 58 | + |
54 | 59 | // Fundraiser statistics |
55 | 60 | 'fundraiserstatistics' => 'Fundraiser statistics', |
56 | 61 | 'fundraiserstats-date' => 'Date', |
— | — | @@ -63,6 +68,8 @@ |
64 | 69 | 'fundraiserstats-tab-contributions' => 'Number of contributions', |
65 | 70 | 'fundraiserstats-tab-averages' => 'Averages (USD)', |
66 | 71 | 'fundraiserstats-tab-maximums' => 'Maximums (USD)', |
| 72 | + |
| 73 | + 'specialpages-group-contribution' => 'Contributions/Fundraiser', |
67 | 74 | ); |
68 | 75 | |
69 | 76 | /** Message documentation (Message documentation) |
Index: trunk/extensions/ContributionReporting/ContributionStatistics_body.php |
— | — | @@ -244,12 +244,12 @@ |
245 | 245 | $factor = $numContributions > 0 ? 100.0 / $numContributions : 0; |
246 | 246 | |
247 | 247 | $list = array( |
248 | | - 'Exactly 30.00' => array( 30 ), |
249 | | - 'Exactly 75.00' => array( 75 ), |
250 | | - 'Exactly 100.00' => array( 100 ), |
251 | | - 'Under 99.00' => array( 0, 99.99 ), |
252 | | - 'From 100.00 - 999.99' => array( 100, 999.99 ), |
253 | | - 'Over 1000.00' => array( 1000, 999999999999.99 ), |
| 248 | + wfMsg( 'contribstats-value-exactly', $wgLang->formatNum( 30 ) ) => array( 30 ), |
| 249 | + wfMsg( 'contribstats-value-exactly', $wgLang->formatNum( 75 ) ) => array( 75 ), |
| 250 | + wfMsg( 'contribstats-value-exactly', $wgLang->formatNum( 100 ) ) => array( 100 ), |
| 251 | + wfMsg( 'contribstats-value-under', $wgLang->formatNum( 99.99 ) ) => array( 0, 99.99 ), |
| 252 | + wfMsg( 'contribstats-value-from', $wgLang->formatNum( 100 ), $wgLang->formatNum( 999.99 ) ) => array( 100, 999.99 ), |
| 253 | + wfMsg( 'contribstats-value-over', $wgLang->formatNum( 1000 ) ) => array( 1000, 999999999999.99 ), |
254 | 254 | ); |
255 | 255 | foreach( $list as $label => $range ) { |
256 | 256 | $data = array(); |
— | — | @@ -260,9 +260,12 @@ |
261 | 261 | } |
262 | 262 | $htmlOut .= Xml::tags( 'tr', null, |
263 | 263 | Xml::element( 'td', array( 'align' => 'left' ), $label ) . |
264 | | - Xml::element( 'td', array( 'align' => 'right' ), $data[0] ) . |
265 | | - Xml::element( 'td', array( 'align' => 'right' ), round( $data[0] * $factor, 2 ) . '%' ) . |
266 | | - Xml::element( 'td', array( 'align' => 'right' ), isset( $range[1] ) ? round( $data[1], 2 ) : '-' ) |
| 264 | + Xml::element( 'td', array( 'align' => 'right' ), |
| 265 | + $wgLang->formatNum( $data[0] ) ) . |
| 266 | + Xml::element( 'td', array( 'align' => 'right' ), |
| 267 | + wfMsg( 'contribstats-percentage', $wgLang->formatNum( round( $data[0] * $factor, 2 ) ) ) ) . |
| 268 | + Xml::element( 'td', array( 'align' => 'right' ), |
| 269 | + isset( $range[1] ) ? $wgLang->formatNum( round( $data[1], 2 ) ) : '-' ) |
267 | 270 | ); |
268 | 271 | } |
269 | 272 | |