Index: trunk/phase3/maintenance/language/messages.inc |
— | — | @@ -863,8 +863,10 @@ |
864 | 864 | 'statistics', |
865 | 865 | 'sitestats', |
866 | 866 | 'userstats', |
867 | | - 'sitestatstext', |
868 | | - 'userstatstext', |
| 867 | + 'sitestats-text', |
| 868 | + 'sitestats-views', |
| 869 | + 'sitestats-jobs', |
| 870 | + 'userstats-text', |
869 | 871 | 'statistics-mostpopular', |
870 | 872 | 'statistics-footer', |
871 | 873 | ), |
Index: trunk/phase3/includes/SpecialStatistics.php |
— | — | @@ -31,31 +31,39 @@ |
32 | 32 | echo "total=$total;good=$good;views=$views;edits=$edits;users=$users;admins=$admins;images=$images;jobs=$numJobs\n"; |
33 | 33 | return; |
34 | 34 | } else { |
| 35 | + global $wgDisableCounters, $wgMiserMode, $wgUser, $wgLang, $wgContLang; |
| 36 | + |
35 | 37 | $text = '==' . wfMsg( 'sitestats' ) . "==\n" ; |
36 | | - $text .= wfMsgExt( 'sitestatstext', array ( 'parsemag' ), |
| 38 | + $text .= wfMsgExt( 'sitestats-text', array ( 'parsemag' ), |
37 | 39 | $wgLang->formatNum( $total ), |
38 | 40 | $wgLang->formatNum( $good ), |
39 | | - $wgLang->formatNum( $views ), |
40 | 41 | $wgLang->formatNum( $edits ), |
41 | 42 | $wgLang->formatNum( sprintf( '%.2f', $total ? $edits / $total : 0 ) ), |
42 | | - $wgLang->formatNum( sprintf( '%.2f', $edits ? $views / $edits : 0 ) ), |
43 | | - $wgLang->formatNum( $numJobs ), |
44 | 43 | $wgLang->formatNum( $images ) |
45 | 44 | ); |
46 | 45 | |
| 46 | + if( !$wgDisableCounters && !$wgMiserMode ) { |
| 47 | + $text .= '<p>' . wfMsgExt( 'sitestats-views', array ( 'parsemag' ), |
| 48 | + $wgLang->formatNum( $views ), |
| 49 | + $wgLang->formatNum( sprintf( '%.2f', $edits ? $views / $edits : 0 ) ) |
| 50 | + ) . '</p>'; |
| 51 | + } |
| 52 | + |
| 53 | + $text .= '<p>' . wfMsgExt( 'sitestats-jobs', array ( 'parsemag' ), |
| 54 | + $wgLang->formatNum( $numJobs ) |
| 55 | + ) . '</p>'; |
| 56 | + |
47 | 57 | $text .= "\n==" . wfMsg( 'userstats' ) . "==\n"; |
48 | 58 | |
49 | | - $text .= wfMsgExt( 'userstatstext', array ( 'parsemag' ), |
| 59 | + $text .= wfMsgExt( 'userstats-text', array ( 'parsemag' ), |
50 | 60 | $wgLang->formatNum( $users ), |
51 | 61 | $wgLang->formatNum( $admins ), |
52 | | - '[[' . wfMsgForContent( 'grouppage-sysop' ) . ']]', # TODO somehow remove, kept for backwards compatibility |
53 | 62 | $wgLang->formatNum( sprintf( '%.2f', $admins / $users * 100 ) ), |
54 | 63 | User::makeGroupLinkWiki( 'sysop' ) |
55 | 64 | ); |
56 | 65 | |
57 | 66 | $wgOut->addWikiText( $text ); |
58 | 67 | |
59 | | - global $wgDisableCounters, $wgMiserMode, $wgUser, $wgLang, $wgContLang; |
60 | 68 | if( !$wgDisableCounters && !$wgMiserMode ) { |
61 | 69 | $page = $dbr->tableName( 'page' ); |
62 | 70 | $sql = "SELECT page_namespace, page_title, page_counter FROM {$page} WHERE page_is_redirect = 0 AND page_counter > 0 ORDER BY page_counter DESC"; |
— | — | @@ -74,11 +82,11 @@ |
75 | 83 | $dbr->freeResult( $res ); |
76 | 84 | } |
77 | 85 | } |
78 | | - |
| 86 | + |
79 | 87 | $footer = wfMsg( 'statistics-footer' ); |
80 | 88 | if( !wfEmptyMsg( 'statistics-footer', $footer ) && $footer != '' ) |
81 | 89 | $wgOut->addWikiText( $footer ); |
82 | | - |
| 90 | + |
83 | 91 | } |
84 | 92 | } |
85 | 93 | ?> |
Index: trunk/phase3/languages/messages/MessagesEn.php |
— | — | @@ -1449,21 +1449,18 @@ |
1450 | 1450 | 'statistics' => 'Statistics', |
1451 | 1451 | 'sitestats' => '{{SITENAME}} statistics', |
1452 | 1452 | 'userstats' => 'User statistics', |
1453 | | -'sitestatstext' => "There {{PLURAL:$1|is '''1''' page|are '''$1''' total pages}} in the database. |
| 1453 | +'sitestats-text' => "There {{PLURAL:$1|is '''1''' page|are '''$1''' total pages}} in the database. |
1454 | 1454 | This includes \"talk\" pages, pages about {{SITENAME}}, minimal \"stub\" |
1455 | 1455 | pages, redirects, and others that probably don't qualify as content pages. |
1456 | 1456 | Excluding those, there {{PLURAL:$2|is '''1''' page that is a|are '''$2''' pages that are}} probably legitimate |
1457 | 1457 | content {{PLURAL:$2|page|pages}}. |
1458 | 1458 | |
1459 | | -'''$8''' {{PLURAL:$8|file|files}} have been uploaded. |
| 1459 | +'''$5''' {{PLURAL:$5|file|files}} have been uploaded. |
1460 | 1460 | |
1461 | | -There have been a total of '''$3''' {{PLURAL:$3|page view|page views}}, and '''$4''' {{PLURAL:$4|page edit|page edits}} |
1462 | | -since {{SITENAME}} was setup. |
1463 | | -That comes to '''$5''' average edits per page, and '''$6''' views per edit. |
1464 | | - |
1465 | | -The [http://meta.wikimedia.org/wiki/Help:Job_queue job queue] length is '''$7'''.", |
1466 | | -'userstatstext' => "There {{PLURAL:$1|is '''1''' registered user|are '''$1''' registered users}}, of which |
1467 | | -'''$2''' (or '''$4%''') {{PLURAL:$2|has|have}} $5 rights.", |
| 1461 | +There have been a total '''$3''' {{PLURAL:$3|page edit|page edits}} since {{SITENAME}} was setup. That comes to '''$4''' average edits per page.", |
| 1462 | +'sitestats-views' => "There have been a total of '''$1''' {{PLURAL:$1|page view|page views}} and '''$2''' views per edit.", |
| 1463 | +'sitestats-jobs' => "The [http://meta.wikimedia.org/wiki/Help:Job_queue job queue] length is '''$1'''.", |
| 1464 | +'userstats-text' => "There {{PLURAL:$1|is '''1''' registered user|are '''$1''' registered users}}, of which '''$2''' (or '''$3%''') {{PLURAL:$2|has|have}} $4 rights.", |
1468 | 1465 | 'statistics-mostpopular' => 'Most viewed pages', |
1469 | 1466 | 'statistics-footer' => '', |
1470 | 1467 | |
Index: trunk/phase3/languages/messages/MessagesDe.php |
— | — | @@ -1065,20 +1065,18 @@ |
1066 | 1066 | 'statistics' => 'Statistik', |
1067 | 1067 | 'sitestats' => 'Seitenstatistik', |
1068 | 1068 | 'userstats' => 'Benutzerstatistik', |
1069 | | -'sitestatstext' => "Es gibt insgesamt '''$1''' {{PLURAL:$1|Seite|Seiten}} in der Datenbank. |
| 1069 | +'sitestats-text' => "Es gibt insgesamt '''$1''' {{PLURAL:$1|Seite|Seiten}} in der Datenbank. |
1070 | 1070 | Das schliesst Diskussionsseiten, Seiten über {{SITENAME}}, kleine Seiten, Weiterleitungen und andere Seiten ein, |
1071 | 1071 | die eventuell nicht als Seiten gewertet werden können. |
1072 | 1072 | |
1073 | 1073 | Diese ausgenommen gibt es '''$2''' {{PLURAL:$2|Seite|Seiten}}, die als Seite gewertet werden {{PLURAL:$2|kann|können}}. |
1074 | 1074 | |
1075 | | -Insgesamt {{PLURAL:$8|wurde '''1''' Datei|wurden '''$8''' Dateien}} hochgeladen. |
| 1075 | +Es {{PLURAL:$5|wurde bisher '''1''' Datei|wurden bisher '''$5''' Dateien}} hochgeladen. |
1076 | 1076 | |
1077 | | -Insgesamt gab es '''$3''' {{PLURAL:$3|Seitenabruf|Seitenabrufe}} und '''$4''' {{PLURAL:$4|Seitenbearbeitung|Seitenbearbeitungen}} seit {{SITENAME}} eingerichtet wurde. |
1078 | | -Daraus ergeben sich '''$5''' Bearbeitungen pro Seite und '''$6''' Seitenabrufe pro Bearbeitung. |
1079 | | - |
1080 | | -Länge der [http://meta.wikimedia.org/wiki/Help:Job_queue „Job queue“]: '''$7'''", |
1081 | | -'userstatstext' => "Es gibt '''$1''' {{PLURAL:$1|registrierten|registrierte}} [[Special:Listusers|Benutzer]]. |
1082 | | -Davon {{PLURAL:$2|hat|haben}} '''$2''' (=$4%) $5-Rechte.", |
| 1077 | +Seit Einrichtung von {{SITENAME}} gab es '''$3''' {{PLURAL:$3|Seitenbearbeitung|Seitenbearbeitungen}}. Daraus ergeben sich '''$4''' Bearbeitungen pro Seite.", |
| 1078 | +'sitestats-views' => "Insgesamt gab es '''$1''' {{PLURAL:$1|Seitenabruf|Seitenabrufe}} und damit '''$2''' Seitenabrufe pro Bearbeitung.", |
| 1079 | +'sitestats-jobs' => "Länge der [http://meta.wikimedia.org/wiki/Help:Job_queue „Job queue“]: '''$1'''", |
| 1080 | +'userstats-text' => "Es gibt '''$1''' {{PLURAL:$1|registrierten|registrierte}} [[Special:Listusers|Benutzer]]. Davon {{PLURAL:$2|hat|haben}} '''$2''' (='''$3%''') $4-Rechte.", |
1083 | 1081 | 'statistics-mostpopular' => 'Meist besuchte Seiten', |
1084 | 1082 | |
1085 | 1083 | 'disambiguations' => 'Begriffsklärungsseiten', |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -262,6 +262,8 @@ |
263 | 263 | * Fix fallback implementation of mb_strlen so it works and isn't insanely |
264 | 264 | slow for large strings, since it's used for page edit lengths |
265 | 265 | * (bug 8815) Setting password in initUser() breaks LdapAuthentication plugin |
| 266 | +* (bug 5619) Split statistics messages for brighter output if $wgDisableCounters |
| 267 | + or $wgMiserMode are true |
266 | 268 | |
267 | 269 | == Languages updated == |
268 | 270 | |