From: Raimond Spekking Date: Tue, 18 Nov 2008 09:36:19 +0000 (+0000) Subject: Add hints for maximum values of some user preferences. X-Git-Tag: 1.31.0-rc.0~44286 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_ecrire%28%22sites_tous%22%29%20.%20%22?a=commitdiff_plain;h=e554f0b4ae1314fbe316c1c7d3974b5bb3ea4003;p=lhc%2Fweb%2Fwiklou.git Add hints for maximum values of some user preferences. --- diff --git a/includes/specials/SpecialPreferences.php b/includes/specials/SpecialPreferences.php index ef45939ca7..36ddacd304 100644 --- a/includes/specials/SpecialPreferences.php +++ b/includes/specials/SpecialPreferences.php @@ -1003,41 +1003,58 @@ class PreferencesForm { $wgOut->addHTML( '' ); # Recent changes - $wgOut->addHTML( '
' . wfMsgHtml( 'prefs-rc' ) . '' ); - - $rc = ''; - $rc .= ''; - $rc .= ''; - $rc .= ''; - $rc .= ''; - $rc .= ''; - $rc .= '
' . Xml::label( wfMsg( 'recentchangesdays' ), 'wpRecentDays' ) . '' . Xml::input( 'wpRecentDays', 3, $this->mRecentDays, array( 'id' => 'wpRecentDays' ) ) . '
' . Xml::label( wfMsg( 'recentchangescount' ), 'wpRecent' ) . '' . Xml::input( 'wpRecent', 3, $this->mRecent, array( 'id' => 'wpRecent' ) ) . '
'; - $wgOut->addHTML( $rc ); - - $wgOut->addHTML( '
' ); + global $wgRCMaxAge; + $wgOut->addHTML( + Xml::fieldset( wfMsg( 'prefs-rc' ) ) . + Xml::openElement( 'table' ) . + ' + ' . + Xml::label( wfMsg( 'recentchangesdays' ), 'wpRecentDays' ) . + ' + ' . + Xml::input( 'wpRecentDays', 3, $this->mRecentDays, array( 'id' => 'wpRecentDays' ) ) . ' ' . + wfMsgExt( 'recentchangesdays-max', 'parsemag', + $wgLang->formatNum( ceil( $wgRCMaxAge / ( 3600 * 24 ) ) ) ) . + ' + + ' . + Xml::label( wfMsg( 'recentchangescount' ), 'wpRecent' ) . + ' + ' . + Xml::input( 'wpRecent', 3, $this->mRecent, array( 'id' => 'wpRecent' ) ) . + ' + ' . + Xml::closeElement( 'table' ) . + '
' + ); $toggles[] = 'hideminor'; if( $wgRCShowWatchingUsers ) $toggles[] = 'shownumberswatching'; $toggles[] = 'usenewrc'; - $wgOut->addHTML( $this->getToggles( $toggles ) ); - $wgOut->addHTML( '
' ); + $wgOut->addHTML( + $this->getToggles( $toggles ) . + Xml::closeElement( 'fieldset' ) + ); # Watchlist - $wgOut->addHTML( '
' . wfMsgHtml( 'prefs-watchlist' ) . '' ); - - $wgOut->addHTML( wfInputLabel( wfMsg( 'prefs-watchlist-days' ), 'wpWatchlistDays', 'wpWatchlistDays', 3, $this->mWatchlistDays ) ); - $wgOut->addHTML( '

' ); - - $wgOut->addHTML( $this->getToggle( 'extendwatchlist' ) ); - $wgOut->addHTML( wfInputLabel( wfMsg( 'prefs-watchlist-edits' ), 'wpWatchlistEdits', 'wpWatchlistEdits', 3, $this->mWatchlistEdits ) ); - $wgOut->addHTML( '

' ); - - $wgOut->addHTML( $this->getToggles( array( 'watchlisthideminor', 'watchlisthidebots', 'watchlisthideown', 'watchlisthideanons', 'watchlisthideliu' ) ) ); + $wgOut->addHTML( + Xml::fieldset( wfMsg( 'prefs-watchlist' ) ) . + Xml::inputLabel( wfMsg( 'prefs-watchlist-days' ), 'wpWatchlistDays', 'wpWatchlistDays', 3, $this->mWatchlistDays ) . ' ' . + wfMsgHTML( 'prefs-watchlist-days-max' ) . + '

' . + $this->getToggle( 'extendwatchlist' ) . + Xml::inputLabel( wfMsg( 'prefs-watchlist-edits' ), 'wpWatchlistEdits', 'wpWatchlistEdits', 3, $this->mWatchlistEdits ) . ' ' . + wfMsgHTML( 'prefs-watchlist-edits-max' ) . + '

' . + $this->getToggles( array( 'watchlisthideminor', 'watchlisthidebots', 'watchlisthideown', 'watchlisthideanons', 'watchlisthideliu' ) ) + ); - if( $wgUser->isAllowed( 'createpage' ) || $wgUser->isAllowed( 'createtalk' ) ) + if( $wgUser->isAllowed( 'createpage' ) || $wgUser->isAllowed( 'createtalk' ) ) { $wgOut->addHTML( $this->getToggle( 'watchcreations' ) ); + } + foreach( array( 'edit' => 'watchdefault', 'move' => 'watchmoves', 'delete' => 'watchdeletion' ) as $action => $toggle ) { if( $wgUser->isAllowed( $action ) ) $wgOut->addHTML( $this->getToggle( $toggle ) ); @@ -1047,7 +1064,7 @@ class PreferencesForm { $this->mUsedToggles['watchmoves'] = true; $this->mUsedToggles['watchdeletion'] = true; - $wgOut->addHTML( '
' ); + $wgOut->addHTML( Xml::closeElement( 'fieldset' ) ); # Search $mwsuggest = $wgEnableMWSuggest ? diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index ac851f0a4b..7416515ba2 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -1539,7 +1539,9 @@ please see math/README to configure.', 'prefs-rc' => 'Recent changes', 'prefs-watchlist' => 'Watchlist', 'prefs-watchlist-days' => 'Days to show in watchlist:', +'prefs-watchlist-days-max' => '(maximum 7 days)', 'prefs-watchlist-edits' => 'Maximum number of changes to show in expanded watchlist:', +'prefs-watchlist-edits-max'=> '(maximum number: 1000)', 'prefs-misc' => 'Misc', 'saveprefs' => 'Save', 'resetprefs' => 'Clear unsaved changes', @@ -1555,6 +1557,7 @@ please see math/README to configure.', 'contextchars' => 'Context per line:', 'stub-threshold' => 'Threshold for stub link formatting (bytes):', 'recentchangesdays' => 'Days to show in recent changes:', +'recentchangesdays-max' => '(maximum $1 {{PLURAL:$1|day|days}})', 'recentchangescount' => 'Number of edits to show in recent changes, history and log pages:', 'savedprefs' => 'Your preferences have been saved.', 'timezonelegend' => 'Time zone', diff --git a/maintenance/language/messages.inc b/maintenance/language/messages.inc index cff5467052..9d037bf4dc 100644 --- a/maintenance/language/messages.inc +++ b/maintenance/language/messages.inc @@ -858,7 +858,9 @@ $wgMessageStructure = array( 'prefs-rc', 'prefs-watchlist', 'prefs-watchlist-days', + 'prefs-watchlist-days-max', 'prefs-watchlist-edits', + 'prefs-watchlist-edits-max', 'prefs-misc', 'saveprefs', 'resetprefs', @@ -874,6 +876,7 @@ $wgMessageStructure = array( 'contextchars', 'stub-threshold', 'recentchangesdays', + 'recentchangesdays-max', 'recentchangescount', 'savedprefs', 'timezonelegend',