* Die gracefully if php has not been compiled with --enable-memory-limit
[lhc/web/wiklou.git] / maintenance / duplicatetrans.php
1 <?php
2 /**
3 * Prints out messages that are the same as the message with the corrisponding
4 * key in the Language.php file
5 *
6 * @package MediaWiki
7 * @subpackage Maintenance
8 */
9
10 require_once('commandLine.inc');
11
12 if ( 'en' == $wgLanguageCode ) {
13 print "Current selected language is English. Cannot check translations.\n";
14 exit();
15 }
16
17 $count = $total = 0;
18 $msgarray = 'wgAllMessages' . ucfirst( $wgLanguageCode );
19
20 foreach ( $$msgarray as $code => $msg ) {
21 ++$total;
22 if ( @$wgAllMessagesEn[$code] == $msg ) {
23 echo "* $code\n";
24 ++$count;
25 }
26 }
27
28 echo "{$count} messages of {$total} are duplicates\n";
29 ?>