summaryrefslogtreecommitdiff
path: root/maintenance/duplicatetrans.php
blob: 89d9cff1c77864fccd4658a01c693e7cb60f3811 (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
29
<?php
/**
 * Prints out messages that are the same as the message with the corrisponding
 * key in the Language.php file
 *
 * @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 ( @$wgAllMessagesEn[$code] == $msg ) {
		echo "* $code\n";
		++$count;
	}
}

echo "{$count} messages of {$total} are duplicates\n";
?>