Index: trunk/phase3/maintenance/language/messages.inc |
— | — | @@ -356,6 +356,10 @@ |
357 | 357 | 'customcssjsprotected', |
358 | 358 | 'ns-specialprotected', |
359 | 359 | 'titleprotected', |
| 360 | + 'virus-badscanner', |
| 361 | + 'virus-badscanner', |
| 362 | + 'virus-scanfailed', |
| 363 | + 'virus-unknownscanner', |
360 | 364 | ), |
361 | 365 | 'login' => array( |
362 | 366 | 'logouttitle', |
Index: trunk/phase3/maintenance/language/messageTypes.inc |
— | — | @@ -313,6 +313,9 @@ |
314 | 314 | 'autocomment-prefix', |
315 | 315 | 'listgrouprights-right-display', |
316 | 316 | 'timezone-utc', |
| 317 | + 'virus-badscanner', |
| 318 | + 'virus-scanfailed', |
| 319 | + 'virus-unknownscanner', |
317 | 320 | ); |
318 | 321 | |
319 | 322 | /** EXIF messages, which may be set as optional in several checks, but are generally mandatory */ |
Index: trunk/phase3/includes/specials/SpecialUpload.php |
— | — | @@ -1515,9 +1515,8 @@ |
1516 | 1516 | |
1517 | 1517 | if ( !$wgAntivirusSetup[$wgAntivirus] ) { |
1518 | 1518 | wfDebug( __METHOD__.": unknown virus scanner: $wgAntivirus\n" ); |
1519 | | - # @TODO: localise |
1520 | | - $wgOut->addHTML( "<div class='error'>Bad configuration: unknown virus scanner: <i>$wgAntivirus</i></div>\n" ); |
1521 | | - return "unknown antivirus: $wgAntivirus"; |
| 1519 | + $wgOut->addHTML( "<div class='error'>" . wfMsg('virus-badscanner') . " <i>$wgAntivirus</i></div>\n" ); |
| 1520 | + return wfMsg('virus-unknownscanner') . " $wgAntivirus"; |
1522 | 1521 | } |
1523 | 1522 | |
1524 | 1523 | # look up scanner configuration |
— | — | @@ -1564,7 +1563,7 @@ |
1565 | 1564 | wfDebug( __METHOD__.": failed to scan $file (code $exitCode).\n" ); |
1566 | 1565 | |
1567 | 1566 | if ( $wgAntivirusRequired ) { |
1568 | | - return "scan failed (code $exitCode)"; |
| 1567 | + return wfMsg('virus-scanfailed', array( $exitCode ) ); |
1569 | 1568 | } else { |
1570 | 1569 | return NULL; |
1571 | 1570 | } |
Index: trunk/phase3/languages/messages/MessagesEn.php |
— | — | @@ -837,6 +837,11 @@ |
838 | 838 | 'titleprotected' => "This title has been protected from creation by [[User:$1|$1]]. |
839 | 839 | The reason given is ''$2''.", |
840 | 840 | |
| 841 | +# Virus scanner |
| 842 | +'virus-badscanner' => "Bad configuration: unknown virus scanner:", |
| 843 | +'virus-scanfailed' => "scan failed (code $1)", |
| 844 | +'virus-unknownscanner' => "unknown antivirus:", |
| 845 | + |
841 | 846 | # Login and logout pages |
842 | 847 | 'logouttitle' => 'User logout', |
843 | 848 | 'logouttext' => '<strong>You are now logged out.</strong> |