* Removing span from Language::translateBlockExpiry.
* Adding span conditionally in LogPage::actionText, and using appropriate language (interface and content).
* Removing translate parameter from LogPage::actionText: no longer needed, always translate.
getUserPermissionsErrors.
* Login and signup forms are now more correct for right-to-left languages.
* Fix inconsistent section edit link size for some browsers.
+* (bug 5387) Block log items on RecentChanges don't make use of possible
+ translations
=== API changes in 1.12 ===
/**
* @static
*/
- static function actionText( $type, $action, $title = NULL, $skin = NULL, $params = array(), $filterWikilinks=false, $translate=false ) {
+ static function actionText( $type, $action, $title = NULL, $skin = NULL, $params = array(), $filterWikilinks=false ) {
global $wgLang, $wgContLang, $wgLogActions;
$key = "$type/$action";
} else {
array_unshift( $params, $titleLink );
if ( $key == 'block/block' ) {
- if ( $translate ) {
- $params[1] = $wgLang->translateBlockExpiry( $params[1] );
+ if ( $skin ) {
+ $params[1] = '<span title="' . htmlspecialchars( $params[1] ). '">' . $wgLang->translateBlockExpiry( $params[1] ) . '</span>';
+ } else {
+ $params[1] = $wgContLang->translateBlockExpiry( $params[1] );
}
$params[2] = isset( $params[2] )
? self::formatBlockFlags( $params[2] )
}
}
- $action = LogPage::actionText( $s->log_type, $s->log_action, $title, $this->skin, $paramArray, true, true );
+ $action = LogPage::actionText( $s->log_type, $s->log_action, $title, $this->skin, $paramArray, true );
$out = "<li>$time $userLink $action $comment $revert</li>\n";
return $out;
}
/**
* For translaing of expiry times
* @param string The validated block time in English
- * @param $forContent, avoid html?
* @return Somehow translated block time
* @see LanguageFi.php for example implementation
*/
- function translateBlockExpiry( $str, $forContent=false ) {
+ function translateBlockExpiry( $str ) {
$scBlockExpiryOptions = $this->getMessageFromDB( 'ipboptions' );
continue;
list($show, $value) = explode(":", $option);
if ( strcmp ( $str, $value) == 0 ) {
- if ( $forContent )
- return htmlspecialchars($str) . htmlspecialchars( trim( $show ) );
- else
- return '<span title="' . htmlspecialchars($str). '">' . htmlspecialchars( trim( $show ) ) . '</span>';
+ return htmlspecialchars( trim( $show ) );
}
}
$final .= ' ' . $item;
}
- if ( $forContent ) {
- return htmlspecialchars( trim( $final ) );
- } else {
- return '<span class="blockexpiry" title="' . htmlspecialchars($str). '">”' . trim( $final ) . '”</span>';
- }
+ return htmlspecialchars( trim( $final ) );
}
}