Document the block duration tooltip
authorAmir E. Aharoni <amir.aharoni@mail.huji.ac.il>
Sun, 21 Jul 2013 09:44:59 +0000 (12:44 +0300)
committerAmire80 <amir.aharoni@mail.huji.ac.il>
Mon, 11 Nov 2013 16:34:16 +0000 (16:34 +0000)
This is a follow-up to I31aef50196319be7355ad14657e67ca23fc15e20.

Change-Id: If0abba018fe59a289c2ae82e9e5b91459dd4baf6

includes/logging/LogPage.php

index cc473c1..bdae366 100644 (file)
@@ -262,7 +262,12 @@ class LogPage {
                                        // User suppression
                                        if ( preg_match( '/^(block|suppress)\/(block|reblock)$/', $key ) ) {
                                                if ( $skin ) {
-                                                       $params[1] = '<span class="blockExpiry" title="&lrm;' . htmlspecialchars( $params[1] ) . '">' .
+                                                       // Localize the duration, and add a tooltip
+                                                       // in English to help visitors from other wikis.
+                                                       // The lrm is needed to make sure that the number
+                                                       // is shown on the correct side of the tooltip text.
+                                                       $durationTooltip = '&lrm;' . htmlspecialchars( $params[1] );
+                                                       $params[1] = "<span class='blockExpiry' title='$durationTooltip'>" .
                                                                $wgLang->translateBlockExpiry( $params[1] ) . '</span>';
                                                } else {
                                                        $params[1] = $wgContLang->translateBlockExpiry( $params[1] );