summaryrefslogtreecommitdiff
path: root/maintenance/redundanttrans.php
blob: de09686346087ec5007d1afee82f622aea37d35b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<?php
/**
 * Prints out messages that are no longer used.
 *
 * @package MediaWiki
 * @subpackage Maintenance
 */

require_once('commandLine.inc');

if ( 'en' == $wgLanguageCode ) {
	print "Current selected language is English. Cannot check translations.\n";
	exit();
}

$count = $total = 0;
$msgarray = 'wgAllMessages' . ucfirst( $wgLanguageCode );

foreach ( $$msgarray as $code => $msg ) {
	++$total;
	if ( ! array_key_exists( $code, $wgAllMessagesEn ) ) {
		print "* $code\n";
		++$count;
	}
}

print "{$count} messages of {$total} are redundant\n";
?>