r44509 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r44508‎ | r44509 | r44510 >
Date:18:29, 12 December 2008
Author:demon
Status:resolved (Comments)
Tags:
Comment:
Remove these tooltips in favor of actually putting the information inline.
Modified paths:
  • /trunk/phase3/includes/specials/SpecialStatistics.php (modified) (history)
  • /trunk/phase3/languages/messages/MessagesEn.php (modified) (history)
  • /trunk/phase3/maintenance/language/messages.inc (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/language/messages.inc
@@ -1283,7 +1283,6 @@
12841284 'statistics-header-users',
12851285 'statistics-articles',
12861286 'statistics-pages',
1287 - 'statistics-pages-tooltip',
12881287 'statistics-files',
12891288 'statistics-edits',
12901289 'statistics-edits-average',
@@ -1292,7 +1291,6 @@
12931292 'statistics-jobqueue',
12941293 'statistics-users',
12951294 'statistics-users-active',
1296 - 'statistics-users-active-tooltip',
12971295 'statistics-mostpopular',
12981296 'statistics-footer',
12991297 ),
Index: trunk/phase3/includes/specials/SpecialStatistics.php
@@ -64,8 +64,7 @@
6565 ' class="mw-statistics-articles"' ) .
6666 formatRow( wfMsgExt( 'statistics-pages', array( 'parseinline' ) ),
6767 $wgLang->formatNum( $total ),
68 - ' class="mw-statistics-pages"',
69 - 'statistics-pages-tooltip' ) .
 68+ ' class="mw-statistics-pages"' ) .
7069 formatRow( wfMsgExt( 'statistics-files', array( 'parseinline' ) ),
7170 $wgLang->formatNum( $images ),
7271 ' class="mw-statistics-files"' ) .
@@ -89,8 +88,7 @@
9089 ' class="mw-statistics-users"' ) .
9190 formatRow( wfMsgExt( 'statistics-users-active', array( 'parseinline' ) ),
9291 $wgLang->formatNum( $activeUsers ),
93 - ' class="mw-statistics-users-active"',
94 - 'statistics-users-active-tooltip' );
 92+ ' class="mw-statistics-users-active"' );
9593
9694 # Statistic - usergroups
9795 foreach( $wgGroupPermissions as $group => $permissions ) {
@@ -182,14 +180,8 @@
183181 * @param float $number a number
184182 * @return string table row in HTML format
185183 */
186 -function formatRow( $text, $number, $trExtraParams = '', $tooltip = '' ) {
187 - global $wgStylePath;
 184+function formatRow( $text, $number, $trExtraParams = '' ) {
188185
189 - if( $tooltip ) {
190 - $tooltipText = wfMsg( $tooltip );
191 - $text = '<div class="mw-tooltip-icon" title="' . $tooltipText . '">' . $text . '<sup><a class="mw-tooptip-icon" title="' . $tooltipText . '"><img alt="' . $tooltipText . '" src="' . $wgStylePath . '/common/images/tooltip_icon.png" width="10" height="12" border="0" /></a></sup></div>';
192 - }
193 -
194186 return "<tr{$trExtraParams}>
195187 <td>" .
196188 $text .
Index: trunk/phase3/languages/messages/MessagesEn.php
@@ -2017,8 +2017,7 @@
20182018 'statistics-header-views' => 'View statistics',
20192019 'statistics-header-users' => 'User statistics',
20202020 'statistics-articles' => 'Content pages',
2021 -'statistics-pages' => 'Pages',
2022 -'statistics-pages-tooltip' => 'All pages in the wiki, including talk pages, redirects, etc.',
 2021+'statistics-pages' => 'Pages <small>(All pages in the wiki, including talk pages, redirects, etc.)</small>',
20232022 'statistics-files' => 'Uploaded files',
20242023 'statistics-edits' => 'Page edits since {{SITENAME}} was setup',
20252024 'statistics-edits-average' => 'Average edits per page',
@@ -2026,8 +2025,7 @@
20272026 'statistics-views-peredit' => 'Views per edit',
20282027 'statistics-jobqueue' => '[http://www.mediawiki.org/wiki/Manual:Job_queue Job queue] length',
20292028 'statistics-users' => 'Registered [[Special:ListUsers|users]]',
2030 -'statistics-users-active' => 'Active users',
2031 -'statistics-users-active-tooltip' => 'Users who have performed an action in the past month',
 2029+'statistics-users-active' => 'Active users <small>(Users who have performed an action in the last month)</small>',
20322030 'statistics-mostpopular' => 'Most viewed pages',
20332031 'statistics-footer' => '', # do not translate or duplicate this message to other languages
20342032

Follow-up revisions

RevisionCommit summaryAuthorDate
r44518Complete rewrite of Special:Statistics:...demon01:45, 13 December 2008

Comments

#Comment by Brion VIBBER (talk | contribs)   21:39, 12 December 2008

I might recommend putting details on a separate line or as a separate message; otherwise all customized and localized messaged with the statistic _name_ need to be updated to have the _detail_ added, and the formatting is hardcoded which is kind of ugly.

#Comment by P858snake (talk | contribs)   01:22, 14 December 2008

Note: this is in reference to bugzilla:16481 for anyone that is interested.

Status & tagging log