Index: trunk/phase3/maintenance/language/messages.inc |
— | — | @@ -581,7 +581,7 @@ |
582 | 582 | 'copyrightwarning', |
583 | 583 | 'copyrightwarning2', |
584 | 584 | 'editpage-tos-summary', |
585 | | - 'longpagewarning', |
| 585 | + 'longpage-hint', |
586 | 586 | 'longpageerror', |
587 | 587 | 'readonlywarning', |
588 | 588 | 'protectedpagewarning', |
Index: trunk/phase3/maintenance/language/messageTypes.inc |
— | — | @@ -168,6 +168,7 @@ |
169 | 169 | 'editpage-tos-summary', |
170 | 170 | 'addsection-preload', |
171 | 171 | 'addsection-editintro', |
| 172 | + 'longpage-hint', |
172 | 173 | ); |
173 | 174 | |
174 | 175 | /** Optional messages, which may be translated only if changed in the target language. */ |
Index: trunk/phase3/includes/EditPage.php |
— | — | @@ -1457,13 +1457,16 @@ |
1458 | 1458 | } |
1459 | 1459 | |
1460 | 1460 | if ( $this->tooBig || $this->kblength > $wgMaxArticleSize ) { |
1461 | | - $wgOut->addHTML( "<div class='error' id='mw-edit-longpageerror'>\n" ); |
1462 | | - $wgOut->addWikiMsg( 'longpageerror', $wgLang->formatNum( $this->kblength ), $wgLang->formatNum( $wgMaxArticleSize ) ); |
1463 | | - $wgOut->addHTML( "</div>\n" ); |
1464 | | - } elseif ( $this->kblength > 29 ) { |
1465 | | - $wgOut->addHTML( "<div id='mw-edit-longpagewarning'>\n" ); |
1466 | | - $wgOut->addWikiMsg( 'longpagewarning', $wgLang->formatNum( $this->kblength ) ); |
1467 | | - $wgOut->addHTML( "</div>\n" ); |
| 1461 | + $wgOut->wrapWikiMsg( "<div class='error' id='mw-edit-longpageerror'>\n$1\n</div>", |
| 1462 | + array( 'longpageerror', $wgLang->formatNum( $this->kblength ), $wgLang->formatNum( $wgMaxArticleSize ) ) ); |
| 1463 | + } else { |
| 1464 | + $msg = 'longpage-hint'; |
| 1465 | + $text = wfMsg( $msg ); |
| 1466 | + if( !wfEmptyMsg( $msg, $text ) && $text !== '-' ) { |
| 1467 | + $wgOut->wrapWikiMsg( "<div id='mw-edit-longpage-hint'>\n$1\n</div>", |
| 1468 | + array( 'longpage-hint', $wgLang->formatSize( strlen( $this->textbox1 ) ), strlen( $this->textbox1 ) ) |
| 1469 | + ); |
| 1470 | + } |
1468 | 1471 | } |
1469 | 1472 | } |
1470 | 1473 | |
Index: trunk/phase3/languages/messages/MessagesEn.php |
— | — | @@ -1337,9 +1337,7 @@ |
1338 | 1338 | You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see $1 for details). |
1339 | 1339 | '''Do not submit copyrighted work without permission!'''", |
1340 | 1340 | 'editpage-tos-summary' => '-', # do not translate or duplicate this message to other languages |
1341 | | -'longpagewarning' => "'''Warning:''' This page is $1 kilobytes long; |
1342 | | -some browsers may have problems editing pages approaching or longer than 32kb. |
1343 | | -Please consider breaking the page into smaller sections.", |
| 1341 | +'longpage-hint' => '-', # do not translate or duplicate this message to other languages |
1344 | 1342 | 'longpageerror' => "'''Error: The text you have submitted is $1 kilobytes long, which is longer than the maximum of $2 kilobytes.''' |
1345 | 1343 | It cannot be saved.", |
1346 | 1344 | 'readonlywarning' => "'''Warning: The database has been locked for maintenance, so you will not be able to save your edits right now.''' |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -210,6 +210,10 @@ |
211 | 211 | * When viewing a redirect, the redirect arrow and redirection target are both |
212 | 212 | wrapped in a div that has the class "redirectMsg" so that the redirection |
213 | 213 | arrow can be customized with CSS |
| 214 | +* (bug 21911) Hard coded limit for long page warning removed. New message |
| 215 | + [[MediaWiki:Longpage-hint]] (empty per default) can be used instead. |
| 216 | + Parameters: $1 shows the formatted textsize in Byte/KB/MB, $2 is the raw |
| 217 | + number of the textsize in Byte |
214 | 218 | |
215 | 219 | === Bug fixes in 1.17 === |
216 | 220 | * (bug 17560) Half-broken deletion moved image files to deletion archive |