Index: trunk/phase3/includes/SpecialLog.php |
— | — | @@ -408,7 +408,7 @@ |
409 | 409 | } |
410 | 410 | } |
411 | 411 | |
412 | | - $action = LogPage::actionText( $s->log_type, $s->log_action, $title, $this->skin, $paramArray, true, true ); |
| 412 | + $action = LogPage::actionText( $s->log_type, $s->log_action, $title, $this->skin, $paramArray, true ); |
413 | 413 | $out = "<li>$time $userLink $action $comment $revert</li>\n"; |
414 | 414 | return $out; |
415 | 415 | } |
Index: trunk/phase3/includes/LogPage.php |
— | — | @@ -138,7 +138,7 @@ |
139 | 139 | /** |
140 | 140 | * @static |
141 | 141 | */ |
142 | | - static function actionText( $type, $action, $title = NULL, $skin = NULL, $params = array(), $filterWikilinks=false, $translate=false ) { |
| 142 | + static function actionText( $type, $action, $title = NULL, $skin = NULL, $params = array(), $filterWikilinks=false ) { |
143 | 143 | global $wgLang, $wgContLang, $wgLogActions; |
144 | 144 | |
145 | 145 | $key = "$type/$action"; |
— | — | @@ -199,8 +199,10 @@ |
200 | 200 | } else { |
201 | 201 | array_unshift( $params, $titleLink ); |
202 | 202 | if ( $key == 'block/block' ) { |
203 | | - if ( $translate ) { |
204 | | - $params[1] = $wgLang->translateBlockExpiry( $params[1] ); |
| 203 | + if ( $skin ) { |
| 204 | + $params[1] = '<span title="' . htmlspecialchars( $params[1] ). '">' . $wgLang->translateBlockExpiry( $params[1] ) . '</span>'; |
| 205 | + } else { |
| 206 | + $params[1] = $wgContLang->translateBlockExpiry( $params[1] ); |
205 | 207 | } |
206 | 208 | $params[2] = isset( $params[2] ) |
207 | 209 | ? self::formatBlockFlags( $params[2] ) |
Index: trunk/phase3/languages/Language.php |
— | — | @@ -1382,11 +1382,10 @@ |
1383 | 1383 | /** |
1384 | 1384 | * For translaing of expiry times |
1385 | 1385 | * @param string The validated block time in English |
1386 | | - * @param $forContent, avoid html? |
1387 | 1386 | * @return Somehow translated block time |
1388 | 1387 | * @see LanguageFi.php for example implementation |
1389 | 1388 | */ |
1390 | | - function translateBlockExpiry( $str, $forContent=false ) { |
| 1389 | + function translateBlockExpiry( $str ) { |
1391 | 1390 | |
1392 | 1391 | $scBlockExpiryOptions = $this->getMessageFromDB( 'ipboptions' ); |
1393 | 1392 | |
— | — | @@ -1399,10 +1398,7 @@ |
1400 | 1399 | continue; |
1401 | 1400 | list($show, $value) = explode(":", $option); |
1402 | 1401 | if ( strcmp ( $str, $value) == 0 ) { |
1403 | | - if ( $forContent ) |
1404 | | - return htmlspecialchars($str) . htmlspecialchars( trim( $show ) ); |
1405 | | - else |
1406 | | - return '<span title="' . htmlspecialchars($str). '">' . htmlspecialchars( trim( $show ) ) . '</span>'; |
| 1402 | + return htmlspecialchars( trim( $show ) ); |
1407 | 1403 | } |
1408 | 1404 | } |
1409 | 1405 | |
Index: trunk/phase3/languages/classes/LanguageFi.php |
— | — | @@ -139,11 +139,7 @@ |
140 | 140 | $final .= ' ' . $item; |
141 | 141 | } |
142 | 142 | |
143 | | - if ( $forContent ) { |
144 | | - return htmlspecialchars( trim( $final ) ); |
145 | | - } else { |
146 | | - return '<span class="blockexpiry" title="' . htmlspecialchars($str). '">”' . trim( $final ) . '”</span>'; |
147 | | - } |
| 143 | + return htmlspecialchars( trim( $final ) ); |
148 | 144 | } |
149 | 145 | |
150 | 146 | } |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -32,6 +32,8 @@ |
33 | 33 | getUserPermissionsErrors. |
34 | 34 | * Login and signup forms are now more correct for right-to-left languages. |
35 | 35 | * Fix inconsistent section edit link size for some browsers. |
| 36 | +* (bug 5387) Block log items on RecentChanges don't make use of possible |
| 37 | + translations |
36 | 38 | |
37 | 39 | === API changes in 1.12 === |
38 | 40 | |